PDA

View Full Version : Weird artifact at polygon intersections



rigmutton
04-11-2002, 06:05 AM
I have a very rudimentary game, a shooter above simple terrain. To simulate water, I am drawing a translucent (alpha blended) texture-mapped plane at a given height parallel to the xz-plane.

My terrain is defined as a collection of triangle strips, not sexy, but serviceable. The problem I'm having is that at the intersections, strange triangular effects are occurring; the boundary seems to have a "saw-like" appearance. Rotating the image widens and compresses the length of the "teeth".

Is there a solution anyone can recommend for this aside from deeper tesselation of the terrain? Would switching to NURBS produce smoother intersections? Any tips anyone has would be greatly appreciated, pointers to code examples even more so =)

- Steve

Obliviator
04-11-2002, 06:26 AM
are you using enough bits for your depth buffer?

switching to nurbs won't help you, because when drawing, you have to tesselate your nurbs into triangles and you will have the same problem again.

rigmutton
04-11-2002, 06:42 AM
Wow, that was it exactly. I had the near plane in my gluPerspective call too close to zero. That made all the difference, thanks!

- Steve