Polygon Tearing?

Started by
2 comments, last by NotTaxes 22 years, 5 months ago
Hi, can someone help me out here? I am drawing a height-mapped terrain, and this is fine and good. I am then drawing a water-surface at a certain height. The water-surface is just one big square polygon with a semi-transparent texture. Where the water interfaces with the land I am getting a really jagged appearance(looks like 100''s of triangles). I am also getting this whenever a mesh clips into the land (where the mesh intersects, the boundary is triangulated). The land is generated using normalised triangle-strips with a directional light-source coming in at a vector(-1,0,-1). This is in DirectX8.0 Any ideas why this happening and how I could solve it would be appreciated. ''Doing the impossible is kind of fun'' - Walt Disney
'Doing the impossible is kind of fun' - Walt Disney
Advertisement
It sounds like a Z-buffer problem. Basically the precision isn''t high enough to make a clean line where the water meets the land.

You can fix it by making the far clipping plane nearer, which is done when you create your projection matrix.

Hope this helps.

- Pete
Thanks Pete. It worked, but now I''m losing terrain at depth. Will mess with the figures until it comes right.

''Doing the impossible is kind of fun'' - Walt Disney
'Doing the impossible is kind of fun' - Walt Disney
Glad it helped!

Also you can move the near clipping plane away, which will also increase depth accuracy greatly.

- Pete

This topic is closed to new replies.

Advertisement