math & physics
ajit_kamat at June 14th, 2005 05:40 — #1
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?
anubis at June 14th, 2005 09:22 — #2
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 at June 14th, 2005 09:38 — #3
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 at June 15th, 2005 12:55 — #4
yep, you are right it should be -E.N. Thank you for the reply.