[vtk-developers] Depth buffer and near plane clipping
Paul Harris
harris.pc at gmail.com
Tue Nov 3 01:51:04 EST 2009
Hi all,
Could someone please explain to me this bit of code from vtkRenderer.cxx,
about line 1162
if (range[0] < this->NearClippingPlaneTolerance*range[1])
{
range[0] = this->NearClippingPlaneTolerance*range[1];
}
I've been thinking about it, in relation to this bug report:
http://public.kitware.com/Bug/view.php?id=7823
I'm interested in WHY the decision has been made to "push" the near-field
clipping plane out further when the depth range is too broad.
Why don't we bring the far-field clipping plane back towards us, and clip
the stuff that is a long way away?
If we do that, then what should range[1] be reset to when range[0] is zero
? (ie we have objects at or behind the camera, I would expect to see all
the objects immediately in front of the camera).
I find it annoying when you have an object close to the camera (but not
behind the camera) that is clipped when you also have object a long long way
away. My focus is on the near-field object, not the far-field object, yet
it is the one that is 'punished'.
The Tolerance for 16-bit depth buffers is set to 0.001, which seems
arbitrary to me. Is this a value based on experience rather than
calculated?
thanks,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20091103/6ae6529b/attachment.html>
More information about the vtk-developers
mailing list