15
\$\begingroup\$

I've noticed in almost everything I've read so far that the term "clip space" is prepended with the word "homogeneous". Now I understand that it roughly means "all the same", but I don't understand why there is the express need to say "homogeneous clip space". When is clip space not homogeneous and why do we need to differentiate? And for that matter, what exactly does it mean that we're calling it "homogeneous clip space"? Homogenous in relation to what? In what way are the vertices "all the same"?

\$\endgroup\$

1 Answer 1

30
\$\begingroup\$

Clip space is called homogeneous because the values in it use homogeneous coordinates, i.e. they are in the form [x y z w] instead of [x y z]. In order to get the latter, perspective division must still occur:

 [x y z w]   →   [x/w y/w z/w]
homogeneous     normalized device
clip space      coordinates (NDC)

The reason clipping is performed before perspective division is because divisions are expensive operations. Instead of testing e.g. |x| > 1 in NDC space, we can just test |x| > |w| in homogeneous clip space, which gives exactly the same result, and allows to perform clipping before division.

\$\endgroup\$
3
  • 2
    \$\begingroup\$ Upvoted for explaining why clipping in 4D homogeneous space is cheaper than in 3D NDC space. I think this was first spotted by Jim Blinn and M. E. Newell. Even after clipping, the surviving points undergo this (expensive) perspective division, however, the number of points will now be significantly lesser post-clipping. \$\endgroup\$
    – legends2k
    Commented Nov 16, 2015 at 14:08
  • \$\begingroup\$ What do you mean here by "clipping", or, more precisely, by "clipping is performed"? \$\endgroup\$
    – user50321
    Commented Jan 12, 2017 at 19:55
  • 4
    \$\begingroup\$ "The reason clipping is performed before perspective division is because divisions are expensive operations" wrong. it's because you can't project anything with z<=0. it logically cannot hit the projection plane. this is also why the near plane can't be at 0. everything needs to be infront of the camera. so clipping has to happen before projection. \$\endgroup\$
    – Puddle
    Commented Dec 14, 2019 at 15:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .