Zbuffer at a long distance from the camera

Started by
3 comments, last by kevlur 19 years, 11 months ago
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
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.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!
The z-buffer is always used at every distance. It does become less accurate further away. Do you have a picture of the problem?
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.
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.
My name is my sig.

This topic is closed to new replies.

Advertisement