PDA

View Full Version : transparency problem with textured trees...



delsydsoft
04-19-2001, 09:34 AM
I'm having a problem with drawing textured trees in my 3d engine. I'm drawing them using two perpendicular quads,and I have the texture_env for the tree texture set to GL_MODULATE.Everything works just fine,with one exception---Sometimes one part of the tree will overlap another part,and erase bits of the tree. I know this is a vague explanation,so I have provided a screenshot: http://www.geocities.com/delsydsoftware/problem.jpg

This problem only happens from some angles.I can provide source if you need it. I'm guessing that it has something to do with the drawing order,but I might be wrong.. http://www.opengl.org/discussion_boards/ubb/smile.gif

DFrey
04-19-2001, 10:04 AM
After a few tries, it finally let me see it. http://www.opengl.org/discussion_boards/ubb/tongue.gif

To me it looks like you didn't disable depth writes when drawing the tree quads.

delsydsoft
04-19-2001, 10:08 AM
You might also want to try http://www.geocities.com/delsydsoftware/problem.html

For some reason,this seems to work better...

DaViper
04-19-2001, 11:22 PM
It seems to be either what DFrey says or you didn't set yyour alpha-blending function or alpha values correct

Chris

DFrey
04-20-2001, 03:34 AM
Right, either disabling depth writes or enabling alpha testing will fix that problem.