0

I'm projecting 3D points with X,Y,Z model coordinates to X,Y image coordinates using a 4x4 perspective view-projection matrix. There is only one model, so it is like a MVP matrix where the M matrix is unity.

Is it possible to extract the coordinates of the position (in model coordinates) of the camera from the view-projection matrix. (i.e. the translation component of the view-matrix)?

Also, what exactly is the meaning of the Z-component in the projected image coordinates (after division by W)? I know it is between -1 and 1 for points between the near and far planes, but is it possible to deduce the distance of the point to the camera (in model coordinates) from it?

tmlen
  • 8,533
  • 5
  • 31
  • 84
  • The Z is the depth and the value used for depth buffer calculations – ratchet freak Oct 16 '14 at 10:43
  • You can multiply the MVP matrix with the inverse projection matrix, and if you model matrix is identity, the result should be the view matrix, so you can look at it's translation components. – Anton Angelov Oct 17 '14 at 07:41

0 Answers0