Would it be, at least theoretically, possible to render without a near clipping plane? Could raytracing ignore this perchance? Quite many budding 3d artists have a WTF moment the first time they encounter the clipping plane. If this could be avoided then it would be a big win for usability of 3D authoring apps. Its not one of those things a normal artist would think about until explained.
Could we dispense the near clipping plane?
raytracing;clipping
The near clipping plane is a fundamental feature of projective rasterization. To borrow a diagram from Eric Lengyel's Projection Matrix Tricks presentation:The displayed region of clip space (that you can think of rasterization as happening in) is a box which has a near face. This is associated with the near clip plane. But we can push the far clip plane out to infinity, so can we pull the near clip plane in to zero?Mathematically, you absolutely can! The only point that presents a problem is the eye itself: you can get infinitely close to the eye and still resolve to a single point in clip space. However, if you have a triangle that passes through the eye, you still need to clip it, and to clip it you need an actual plane, not a concept like infinitely close to the eye.More critically for the current rasterization pipeline, the perspective divide does fun things with numerical precision. See the line at NDC 0 in the diagram above? It's halfway through the viewing volume in clip space, but not at all near halfway through the view frustum in camera space. In fact, its position depends on the near clip plane's distance to the eye! This means that over half of the depth range in clip space is in that region near the eye. As you get the near clip plane closer and closer to the eye, that plane pulls in even closer and you waste more and more depth range. This isn't necessarily fundamentalyou don't have to store z/w in the depth bufferbut it is convenient. Here's an article from Nathan Reed about depth precision, and a few notes about why the projected z/w depth is useful from Emil Persson.Finally, I'll plug a post in the excellent A trip through the Graphics Pipeline series, which is very interesting and references homogeneous rasterization algorithms which, in theory, could avoid the need to do clipping in projected clip space, which would totally avoid some of these traps.