OpenGL Terrain problem

Started by
6 comments, last by Teet635 19 years, 10 months ago
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.
Advertisement
Are you using any form of terrain tessellation or LOD algorithm?
Take back the internet with the most awsome browser around, FireFox
No, I suppose I should look into that then.
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.
Fog is the cheap and nasty way out in a brute force terrain engine.
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
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!
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.
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

This topic is closed to new replies.

Advertisement