#### Archived

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

# Typical Near and Far plane values?

This topic is 5996 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

In a typical 3d first person shooter, what is the near and far plane values? what about in a landscape engine? I recently changed mine from 1000.0f to 100.0f for the far planes. im also wondering if a near plane of 0.0f makes that much of a difference from a 1.0f. because i dont notice anything different as far as clipping is concerned. thanks.

##### Share on other sites
There is no standard. It really depends on what you need. Also keep in mind that your unit scale will likely be different from others. What do I mean? Well, does 1.0f = 1 foot, 1 meter, 100 meters, 1000 meters? It's up to you. So the values for near and far clip planes will have different meaning depending on your scale.

[edited by - Expendable on February 11, 2003 11:51:50 AM]

##### Share on other sites
http://www.sjbaker.org/steve/omniv/love_your_z_buffer.html

Making your z-near value too small rips resolution out of your z-buffer. Go to the little javascript z-buffer simulation and see how the z-buffer resolution changes as z-near goes from 1.0 to 0.01

z-far doesn''t seem to affect it much.

##### Share on other sites
with a "hacked" projection matrix, you don''t even need a far plane, it can be at infinity. Take the formula for an ordinary projection matrix (can be found in the DXSDK docs) and take the limit when farplane -> infinity. You will only lose a few percent of Z resolution. The near plane is important though, keep it as far away as you can before stuff starts clipping.

##### Share on other sites
Setting ur Z buffer near clipping plane to 0.0f might result in rendering order not looking proper wich in turn has the effect wich would be the same as not having Z Buffering turned on .

##### Share on other sites
THanks.
i pretty much understood everything.
(other than the question of "why a smaller near plane value results in poorer z-resolution?").

The main thing is this...how can i set the scale?
in other words, how can i set 1.0f to be equal to 100 meters or 100 feet???

where in my code setup is all this determined?

##### Share on other sites
OpenGL have no sense of units. One OpenGL-unit can be whatever you want it to be. If you say that one OpenGL-unit is one foot long, then a far clip plane of 100 will be 100 feet away from the viepwoint. You don''t set this up in the code, you set it up in your head.

##### Share on other sites
I don''t know where I got OpenGL from, probably because I though for a second this was the OpenGL forum. Sorry for that. Anyways, I assume the same applies for Direct3D or whatever API you use.

##### Share on other sites
a 10 meter by 10 meter by 10 meter cube, with the camera 10 meter away looks exactly the same as a 1 feet by 1 feet by 1 feet cube, with the camera 1 feet away

My Site

##### Share on other sites
I figured this as much.
BUT, i read alot of posts with specific unit formats, such as feet or meters or whatever. Why dont they just say units instead of meter or whatever? (was that clear to understand?)

• 9
• 17
• 10
• 11
• 18