# Could we dispense the near clipping plane?

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.

• Imagine having a 3d object INSIDE your eye. How would that look like in your opinion? What do your buddies think? Apr 17, 2016 at 11:06
• @Andreas yes but that only how the linear algebra trick works we could use numerous other tricks. Apr 17, 2016 at 11:17
• What other tricks? Apr 17, 2016 at 11:21
• @Andreas we could do spherical projections for example. Just because we have one mathematical model that works does not mean there are no other ways to solve problems. Apr 17, 2016 at 11:50
• Removed my answer Apr 17, 2016 at 14:59

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 fundamental—you don't have to store z/w in the depth buffer—but 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.

• Your comment is clearly about rasterization when the question was specifically about ray tracing. Clipping planes are not relevant to ray tracing. The answer is 'no' you don't need it. Mar 15, 2022 at 1:27

The near clipping plane in rasterizing setups with perspective projection is there to avoid a divide by 0 and bound the possible depths for orthogonal projection.

With a bit of extra math you can make the depth stored in the depth buffer linear again. However you still need the guard against the divide by 0.

In raytracing the near plane can be at 0 no problem. There is nothing technical stopping you from putting it at -10 however (besides that it would be very odd).

• Yes i know this, but wondering if there could be a alternate strategy to avoid division by 0. Apr 14, 2016 at 10:37
• You could avoid divide by zero by pushing in or out values that would cause one. Apr 17, 2016 at 0:24
• @joojaa Raytracing does not divide by zero. Apr 17, 2016 at 15:01
• @Andreas Yes i know that neither does reality ;) Apr 17, 2016 at 15:01
• @joojaa But have you ever tried looking at something that's been pushed through your eyeball? :-) May 4, 2016 at 8:00