Sign in to follow this  
takethat

terrain clipping problem

Recommended Posts

takethat    122
I'm having a problem with my terrain. Heres a pic: description of your image Don't mind the weird textures I'm still testing. I've highlighted the problem in red. In that little section it seems it's showing the terrain behind it. When I get closer to that section it fixes itself and looks fine. Other parts of the terrain have this similiar problem when looking at it far away. It's not a problem with my heightmap generation at least I don't think. I'm not using any sort of terrain tesselation. I think this is a DirectX 9 problem. Can someone who has experience point out whats going on and possible remedies.

Share this post


Link to post
Share on other sites
TheAdmiral    1122
Are you using any culling algorithms? How about LOD?
If I had to guess, I'd say you're losing Z-buffer precision, maybe due to a bad projection matrix (in particular, check that your near clipping value is at least 0.25m, assuming realistic scale).

We can't do much other than guess without seeing some code, so could you post the projection matrix setup, heightmap loading, culling and rendering.

Admiral

Share this post


Link to post
Share on other sites
TheAdmiral    1122
Hold on, that doesn't sounds like 'fixed' to me.

16 bits of Z-buffer precision is so much more than enough for this situation. Upping the precision to 32 bits is painting over the cracks. You'll probably find that smaller meshes have the same problem, and there are no 64-bit Z-buffers for you to fall back on.
What is your near clipping value? I'm guessing it's something very small (0.001 or so). This is a common mistake, but it will render your Z-buffer nearly useless. If you're confused, read this article.

Admiral

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this