Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: artefacts with transparency

  1. #1
    Junior Member Newbie
    Join Date
    May 2001
    Location
    aulnay, france
    Posts
    19

    artefacts with transparency

    hi,
    i construct objects 3D composed by severals levels of polygons. each level is a ribbon of gl_triangle_strip.

    i apply transparency to these objects. i can see throw the objects but i have an artefact : separations between each triangle_strip are visible.

    is there something to do with glEdgeFlag() ? (i don't use it )
    how does it works ?

    here is my pseudo-code :

    glBegin(GL_TRIANGLE_STRIP) ;
    for each level {
    Vertices from 1 to 1 ;
    }


    for transparency, i use blending :
    glEnable(GL_BLEND);
    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);


    thanks.
    phanie

  2. #2
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,453

    Re: artefacts with transparency

    If you see the edges between individual triangles or triangle strips, that's an indication for drawing those pixels more than once. This normally happens with polygon antialiasing enabled.
    Disable GL_POLYGON_SMOOTH! This will also increase darwing speed.

    Additionally, to have transparency working correctly for 3D objects you have to watch for the drawing order have to sort triangles in z.

    Search for "transparency" on these forums and you'll find lots of hints.

  3. #3
    Junior Member Newbie
    Join Date
    May 2001
    Location
    aulnay, france
    Posts
    19

    Re: artefacts with transparency

    thanks : )
    phanie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •