I am curious to what standard values I should use to create a camera's projection matrix, as well as if certain measurements need to be taken if I want to represent a very small world or a very big world and make it feel natural.

What values (field-of-view, nearplane, farplane) to construct a projection matrix should be used if:

  • 1 unit to represent 1 meter?
  • 1 unit to represent 1 cm?
  • 1 unit to represent 100 meter?

What values should be used for the near and far planes depends entirely on your scene. It doesn't matter what units you're using, as long as the near and far planes are specified in the same units as everything else.

  • Set the field of view to whatever you think looks good.

  • Set the near plane as far as you can get away with - as far as you can make it without causing obvious clipping when the camera gets close to a wall, etc.

  • The far plane setting doesn't matter very much. Set it as far as you need to fit your scene, or even make it infinite (which generates a perfectly valid projection matrix; counterintuitively, it can even be more precise than a finite one, over most of the depth range).

  • 1
    \$\begingroup\$ Just note that Z buffer will be distributed between near/far clipping planes and too big span can cause Z-fighting on distant objects. In that case you would need to allocate more bits to Z buffer (24, 32) or reduce the scale. \$\endgroup\$ – Kromster says support Monica May 20 '13 at 4:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.