Terrain Depth Rendering Woes (screenshots)

Started by
7 comments, last by haro 20 years ago
I am having a problem I cannot seem to solve. In rendering my terrain I am receiving strange graphical artifacts for polygons rendered far away. Occasionally small triangular regions will become transparent and other times small blocks will not be rendered ( just a block of the clear color, which is black ). All poly's are rendered fully opaque ( alpha = 1 ). Depth testing is enabled using LEQUAL. The problem occurs regardless of blending. Here are two screenshots. ScreenShot With Full Hardware Acceleration Same Area Only Hardware Acceleration Disabled Note the black square 'spots' on the left canyon wall in the first screenshot. Also if you look further back their are several triangular regions 'missing'. The regions actually are transparent, the polygons behind them ( which are black ) are being rendered. I turn off hardware acceleration and the scene renders perfectly. I am utterly confused as to what could be causing this. Any help would be much much appreciated. I have considered just creating a perfect far/near ordering of my polygon's and then disabling hardware zbuffering but that seems like such a waste of CPU time. My hardware is a Geforce4 Titanium 4200 using the latest (released 3/15/04) drivers. This is so frustrating. [edited by - haro on March 26, 2004 7:07:04 PM]
Advertisement
My best guess would be a driver issue. Try running it on a different brand of video card, or find an older driver (maybe a few months old) and see if it changes anything. I don''t know if it will help, but I noticed similar artifacts in DeusEx 2 running on a GeForce 5700.

-Madgap
-Madgap
Do you recall what type of scene the artifacts occured in? Was it indoors/outdoors? Was there much occlusion? Relatively large number of poly''s in the scene? Just trying to draw some correlations.
I had some visual artifacts when i installed the latest drivers (56.64). Try turning off the "Conformant Texture Clamp", which for a strange reason is turned on by default. In all the other drivers releases this option was turned off. At least this fixed my problem (flickering geometry when i used VBO).

Hope that helps.

HellRaiZer
HellRaiZer
You didnt state what api your using, but I once had a problem that looked just like that using openGL. It was infact the depth range, so make sure your near/far planes are not too far apart (generally no less than 1 for near plane and around 4096 for far plane).
Please let me know if that fixes your problem.
quote:Original post by X-0ut
You didnt state what api your using, but I once had a problem that looked just like that using openGL. It was infact the depth range, so make sure your near/far planes are not too far apart (generally no less than 1 for near plane and around 4096 for far plane).
Please let me know if that fixes your problem.


Thanks alot. That actually fixed everything completely. How extremely frustrating though, I was simulating 1 unit -> 1 cm. I guess 1 unit just became 1 meter. Is this a well known issue? I''m curious what is causing this issue. 2^12 is such an odd acceptable range. I could understand range issues if it was 2^16 perhaps..
it''s not the far plane, it''s the near plane. 4096 is just an arbitrary value. typically, the far plane value doesn''t influence a lot depth buffer precision, compared to the near plane value. you can set your far plane to 1 000 000 if you like, as long as your near plane has a high enough value (> 1, something like 2 or 3)

go have a look here for a detailed explanation of depth values mapping: http://www.sjbaker.org/steve/omniv/love_your_z_buffer.html
Very informative. I knew it was because of precision errors in the depth buffer, but now I understand why
Excellent article! Thanks for the link, although the webpage was apparently down. I had to use google''s cache of the page.

This topic is closed to new replies.

Advertisement