Reputation: 262
Trying to get a better Understand on View Transform, using Right Handed Rule. If anyone can help clarify the given slide. For example what is C standing and why is it negative also why is an inverse applied to the matrix, and finally what is the simplest form of these matrices concatenated. Thank you for your time and help!
Upvotes: 0
Views: 60
Reputation: 4877
P = (Px,Py,Pz)
in real world coordinatesu
be the vector pointing "left" (as seen by the camera)v
be the vector pointing "up" (as seen by the camera)w
be the vector pointing "forward" (as seen by the camera)u
, v
and w
are orthogonal, and I assume that we already normalized them (so now we have an orthonormal base)C = (Cx, Cy, Cz)
be the location of the 'eye' of the cameraIf we were to manually translate P
to camera coordinates, it would have been done like this:
Pc = P - C
u
(/v
/w
) component of the point by computing the dot product of u
(/v
/w
) and Pc
P
as seen by the camera are (<Pc,u>,<Pc,v>,<Pc,w>)
, where <x,y>
denotes the dot product of x
and y
And this matches exactly to the given matrices:
| ux uy uz 0 | | 1 0 0 -Cx | | Px |
| vx vy vz 0 | X | 0 1 0 -Cy | X | Py |
| wx wy wz 0 | | 0 0 1 -Cz | | Pz |
| 0 0 0 1 | | 0 0 0 1 | | 1 |
| ux uy uz 0 | | Px - Cx |
= | vx vy vz 0 | X | Py - Cy |
| wx wy wz 0 | | Pz - Cz |
| 0 0 0 1 | | 1 |
| <Pc,u> |
= | <Pc,v> |
| <Pc,w> |
| 1 |
So basically, the big matrix you have there is indeed the one that converts points from absolute coordinates to camera coordinates
Upvotes: 1