PDA

View Full Version : artefacts with transparency



phanie
05-28-2001, 02:01 AM
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.

Relic
05-28-2001, 06:33 AM
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.

phanie
05-29-2001, 01:25 AM
thanks : )