Archived

This topic is now archived and is closed to further replies.

TheProphet

Crappy striated textures

Recommended Posts

TheProphet    122
Hello, I have a texture problem. I have written a tool and there are some textures problems like this one : http://dgk.free.fr/ss0000.jpg http://dgk.free.fr/ss0001.jpg I think it is not really a problem, but just some bad options in OpenGL. Could someone help me ?

Share this post


Link to post
Share on other sites
Robot Guy    172
It''s probably Z fighting. You have two polygons that are close in depth and the resolution of your z buffer is too low, making z testing a bit iffy.

Try increasing the resolution of the z buffer by either increasing the number of bits allocated to it or by reducing the ratio of your far plane to near plane (i.e. decrease the far plane or increase the near plane) to see if it disappears.

Share this post


Link to post
Share on other sites
rodzilla    133
Are the overlapping polygons facing the same direction ?
Or are they representing both sides of the cloth ?

You could try to enable back (or front if you prefer) face culling in this case.
Modifying the depth buffer parameter will only workaround the problem. Artifacts will still show on low-end/old gfx cards (TNT2...).

Share this post


Link to post
Share on other sites
TheProphet    122
Enabling bacface culling with
glFrontFace(GL_CCW);
glCullFace(GL_BACK);
solves the problem (not entirely since I lose some information, but no matter for the moment).
I think it will be the solution I will buy

Effectively, changing the depth of the zbuffer will only workaround the problem - I have tried.

Thanks

Share this post


Link to post
Share on other sites
TheProphet    122
my program is divided in several parts; some of them need to change the glFrontFace. So here I don''t change the front face definition, I just put it back to its initial value.

And how do you want to choose "depending on the context" ?
If I knew before rendering which face is behind, then I would have had that problem...

Share this post


Link to post
Share on other sites