Results 1 to 7 of 7

Thread: lamer alpha blending question

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2001
    Location
    France
    Posts
    28

    lamer alpha blending question

    Here it is : I'm currently rendering transparent objects with alpha testing, meaning it's fully transparent (invisible) or fully opaque. I'd like to smooth a bit the edges by enabling alpha blending, and for other evident purposes too.
    But to render correctly I have to Z sort all the polys. So, as I have to consider geometry as a polygon soup (mostly outdoors), what technique should I use (octree, bsp, ...) ?

    I thought about object Z-Sorting rather than polys, but my method is not worth it as it will not render correctly big flat objects (as multiple transparents ceilings for example) unless I split them into tiny parts. (and convex)

    Any help, suggestions, and/or links would be greatly appreciated !

    Lolo

  2. #2
    Super Moderator OpenGL Guru imported_dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,966

    Re: lamer alpha blending question

    A BSP tree will solve these issues.

    Most BSP algorithms you'll see sort to the polygon level, but once you understand them you'll see you can use them to sort objects which are separated by planes too.

  3. #3
    Junior Member Newbie
    Join Date
    Aug 2001
    Location
    France
    Posts
    28

    Re: lamer alpha blending question

    Hummm, I thought I would get a more explanative (is this english ?) answer ...
    I asked this because I've always heard that bsp was for indoors environment (easy to use axis aligned separating planes), and I intended to use outdoor. Could you argument a bit more, why not using octrees ? Could you explain a bit more for object sorting using bsp ?

    thx, Lolo

  4. #4
    Super Moderator OpenGL Guru imported_dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,966

    Re: lamer alpha blending question

    I assumed you knew what a BSP was.

    BSP's are not just for interiors. They are a general sorting mechanism.

    You can place objects in the leaves and sort them at runtime during a full traversal of the tree, testing against the eyepoint.

    Many paople are confused about BSPs because they have read about Quake style useage and think that's it.

  5. #5
    Junior Member Newbie
    Join Date
    Aug 2001
    Location
    France
    Posts
    28

    Re: lamer alpha blending question

    Yes, now that you tell me to consider the general algorithm, I can understand how I'll do this. But all my problems with this BSP will be when I'll have to split objects into 2 meshes among a separating plane ... I hate tesselation.
    This technique will work for convex objects, but I'll have to use a secondary bsp for non convexes meshes, won't I ?

  6. #6
    Junior Member Newbie
    Join Date
    Aug 2001
    Location
    France
    Posts
    28

    Re: lamer alpha blending question

    And you did not answer abot octrees, maybe you didn't experienced by yourself ? I have to know which one will be the faster at runtime before implementing

  7. #7
    Super Moderator OpenGL Guru imported_dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,966

    Re: lamer alpha blending question

    An octree will speed a ray caster or maybe fast collision. It's suited to quickly finding objects in a complex scene which are close to a specific region. I don't think it is as much use for a general 3D sort. IMO BSP is better.

    For a convex object you just split the leaf it occupies with a well chosen plane, then throw the split halves into their respective leaves generated by the new plane equation. It's really simple. You can try and pick planes which don't split primitives, or just approximately bin at the triangle, my feeling is you might get away with a rough split.

    Repeat until concave (or thereabouts).


    [This message has been edited by dorbie (edited 01-16-2002).]

Similar Threads

  1. Replies: 3
    Last Post: 06-16-2011, 12:51 PM
  2. alpha blending without modifying destination alpha
    By GordAllott in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 09-21-2009, 04:15 AM
  3. Source Alpha Blending without an Alpha Buffer
    By niallm in forum OpenGL ES
    Replies: 1
    Last Post: 06-18-2009, 02:51 AM
  4. Alpha Blending Question
    By azcoder in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 12-27-2002, 04:49 PM
  5. Blending, alpha testing, clipping performance question...
    By MarcusL in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 05-07-2001, 10:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean