Archived

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

OpenGL Terrain problem

This topic is 4944 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
By the way, does anyone know of any tutorials/articles on terrain tesselation or LOD implementation? I know the basic theory but as for the commonly accepted way of implementing it, i have no idea which is the fastest, most effecient, etc. thanks

Share this post


Link to post
Share on other sites