Perspective ZNear plane

Started by
11 comments, last by Silly_con 20 years, 11 months ago
I have heard that the best value for Z-near plane in perspective projection is 1.0f (I heard that with this value you get less clipping problems, and is best for Zbuffer, but I don''t understand much), so I put it in my gluPerspective, but, with this value I can''t come near an object because the camera clip it. It''s true that is the best value, if so, how I can come near and object without clipping it? (I see that in the shotem up games, when you come near a wall, the wall is not clipped, what value is used in this games?) thanks
Advertisement
Let me just rudely explain something.If your near plane is 1.0 that means that the objects will become to clip 1 unit away from the current''s camera position.That''s they get clipped so early.Try setting 0.1 or 0.01 and see the results

The PAIN is coming...this summer!!!In cinemas everywhere.
why should a near plane 1 away from the camara point be any bad? ... if you use 0.1 as near and 1000 as far, your z-test resolution is about one ten-thousands-th worser than if you used 1 for near
our new version has many new and good features. sadly, the good ones are not new and the new ones are not good
ah... and 0 distance cannot be used
our new version has many new and good features. sadly, the good ones are not new and the new ones are not good
then, if you use 1 too, how do you do to come near an object?
Just scale your "world" so that the distance 1 is quite small, then limit your approach to a wall (via some form of collision detection) so that you cannot get near enough for the camera to clip it.

Simple!

It all depends on what sort of game you are making - an indoor FPS can probably get away with a near clipping plane of 0.1 or less, but if you try this on an outdoor environment with a far clipping plane of 1000 or more then you will get z-buffer problems with the further away polygons.
That means that in a game that have indoor and outdoors I have to change the near plane in every level/zone?, like return to castle of wolfenstein that have indoors and outdoors
No, I was meaning "real" outdoor games like flight sims where you can see for a long way, games like RTCW have a very limited draw distance outdoors
*former washington: ''666_1337'' kamikaze-d with ''mig29h carriing 4 at22s equiped with nuclear warheads'' injuring ''Anonymous Poster'' by a splash-damage amount of 50x (times) his life, a ''got hit by crashing aircraft-damage'' of 9x his life and a ''heat-damage'' of other 50x his life @ 2 minutes ago* [connection reset by peer]

...
so he maybe doesn''t think return to castle wolfenstein would be an indoor & outdoor game - for any longer
our new version has many new and good features. sadly, the good ones are not new and the new ones are not good
ah ok, I understand.
This means that I have to scale the world coord units, and use collision detection to avoid the cilping if I use 1.0f znear, but scale up or down?

This topic is closed to new replies.

Advertisement