PDA

View Full Version : Camera (View) Matrix - Help


ajit_kamat
06-14-2005, 03:40 AM
Hi,

I am having hard time understanding the camera (view) matrix:

Ux Vx Nx 0
Uy Vy Ny 0
Uz Vz Nz 0
-E.U -E.V -E.Z 1

How is this matrix constructed?
Why are there dot products in the translation section of this matrix?
How is rotation and translation actually achieved by this matrix?

Cheers,

~Ajit

anubis
06-14-2005, 07:22 AM
U, V and N are generally known as the camera vectors. U is your view vector. the camera looks into this direction. the V vector is a vector you choose. it has to be orthogonal to the U vector. finally the N vector is the cross product of U and V, thus forming a cartesian coordinate system. all that is left is to find out is the translation part... usually it is just the negative of the camera's position.

i don't know what E and Z are... could you clarify on that ? i assume that E is the eye or camera position ?

anubis
06-14-2005, 07:38 AM
assuming that the last part of the translation is actually -E.N your are technically rotating E from camera to world coordinates, taking the negative of each component

ajit_kamat
06-15-2005, 10:55 AM
yep, you are right it should be -E.N. Thank you for the reply.

~Ajit