OpenGL Terrain problem
http://www.pitt.edu/~matst103/test.jpg
Ok, while rendering my terrain from a heightmap file, I am using an ugly brute force method using triangle strips. As I zoom in and out towards the small hill in the picture above, it becomes distorted as in the first picture, but at random times it will look ok as in the second picture. I am guessing this has something to do with the depth testing, but I am somewhat of a beginner to OpenGL and am wondering what if anything short of using some different rendering method I could do to correct this problem. Any suggestions would be greatly appreciated.
Odds are those are ztest accuracy problems because you have your far clipping plane set too far away. I''ve read of a solution but don''t remember it off the top of my head...you may want to do a search on the graphics theory forum.
quote:Original post by Silex
Odds are those are ztest accuracy problems because you have your far clipping plane set too far away.
No no no... not far plane to far -- near plane too near.
While the distance to the far plane does affect Z-buffer resolution, it does not affect it nearly as much as the distance to the near plane. In fact, in a standard technique for rendering shadows (z-fail shadow volumes), the far plane is set at infinity.
John Bolton
Page 44 Studios
Current project: NHL Faceoff 2005 PS2
Yes that was it exactly. After the comment about changing the zfar, I noticed the znear was 0.1f, dont ask me why, i think it was just leftover from nehe''s basecode i started this project with, but either way, thanks, got the problem fixed.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement