I am reading around the subject before I begin programming and I would just like to clear up a couple of points
So far I have established that I need the near and far clipping planes as close together as possible to ensure Z buffer accuracy.
What confuses me is that using gluLookAt I can place the eye anywhere I want, such that can a have:
negative near/negative far plane
negative near/positive far plane
positive near/positive far plane
All with the same distance between the near and far plane.
So does it make any difference to the end result?
I read that you should push the near plane as far out as possible, does this mean to the actual object being drawn or make the near and far plane value as large as possible by placing the eye way back in the Z?
Any help much appreciated
i have never experiment rendering with negative near/far clip plane…
However you say “So far I have established that I need the near and far clipping planes as close together as possible to ensure Z buffer accuracy.”
The real explication is that it’s better to have near and far clip plane as close as possible relatively to the size and complexity of the scene.
having a near clip plane at a distance of 1 and a far clip plane at a distance of 100 for a scene that bound to (0,0,0) to (50,50,50) will give the same precision as having a near clip plane at a distance of 0.1 and a far clip plane at a distance of 10 for a scene that bound to (0,0,0) to (5,5,5).
Thanks for the answer, that aspect is making sense now.
Does anyone know where is the best place to position the near and far plans relative to the eye?
If you are using Ortho projection like your title suggests, it makes no difference where the near/far planes are (can both be negative if you want).
You will get the same precision as long as the difference between near/far is the same.
The only time you need to do the “push the near plane as far out as possible, bring the far in as close a possible” (as hseb said) is when doing perspective projection.
Thanks sqrt[-1], that’s cleared that one up!