Jump to content
  • Advertisement

Archived

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

kevlur

Zbuffer at a long distance from the camera

This topic is 5304 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

Hi, i use C++/DX9, is there something who can tell me how can i solve this problem: at a long distance from the camera, all objects appear, even if they are covered by terrain; and it seems that at this distance all is trasparent. I think it depends on the fact that zbuffer isn''t used at this distance. Can I use zbuffer also at a long distance from camera, or there is another solution? Thanks Kev

Share this post


Link to post
Share on other sites
Advertisement
Move your near clipping plane farther away.

The distance from the camera to the near planehas more to do with z-buffer accuracy than anything else.

Share this post


Link to post
Share on other sites
The z-buffer is always used at every distance. It does become less accurate further away. Do you have a picture of the problem?

Share this post


Link to post
Share on other sites
Don''t quote me, but I think you can adjust the number of bits to use in the format settings along with the stencil bits to get more accurate results. I remember reading from somewhere that most of the z bits are mainly for things really close up to avoid inconsistant z fighting even if polygons are not directly on top of eachother...? I''d use fog to get rid of this problem, it looks nice too.

Share this post


Link to post
Share on other sites
I would also like to suggest if you have a newer video card to try using the W buffer if your card supports it. That way you have accuracy at both near and far. Barring that, as a previous poster said fogging is a good way to hide the limitations of the Z buffer. You might also look into some depth sorting trees. Not only can you improve your z buffer performance (by drawing the closer things first), but you can also keep from trying to draw objects which are occluded in the first place.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!