Lecture 4: Transforms (68)
beckyfeng08

what's r? I know that prof ng said in lecture that it's pointing to the x axis, but where exactly in the axis is it pointing to, since the x axis is an infinitesimally long line, and how is that defined in vector form?

anavmehta12

My intuition behind the world->camera transform is that we transpose the world matrix since we want to invert the rotation and transposing is the same as inverting it. We then matrix multiply by the negated camera position in the world space to get the inverse translation to position the camera back at the origin in the camera space

Boomaa23

Why do we have the 1 in the e point column here? I think it is because e is a point and as such it has to have a 1 in the fourth position in homogeneous coordinates, but I am not sure because I thought r is also a point but it seems to not have a 1 in the fourth element.

Edge7481

@beckyfeng08 seems like the r vector is just a vector orthogonal to u and v and by convention the vector going right is considered positive and on the x-axis. Not sure about the lengths though, probably normalized?

spegeerino

Okay, like some other people, I was confused by this slide the first time I saw it. I sat down and puzzled it out, so here's what I think is going on here. First, e is the eye point, the actual position of the camera in the world. Then we have the view vector v; in standard camera space we define the view direction to be the negative z direction which is why it's negated here (I think it's also normalized, not sure). Then, we have u, which is the "up vector." This vector points in the positive y direction of standard camera space by definition; if we rotate the u vector, we rotate the whole camera view and consequently what we "see" through the camera lens. (I believe this vector is normalized to unit length, but I'm not 100% on that.) Finally, we have this mysterious vector r not mentioned on the slides until here; this is just the "right vector," which by definition points in the positive x direction in standard camera space. The reason that we aren't given r is that we can actually compute it by taking the cross product of v and u (and then normalizing to unit length).

Now that we've done all this setup, we can understand what's going on. (If you understand the 3D-coordinate change matrix on slide 45, then you don't need to read any further.) We want to map points in camera space to world space. Notice that a point (x,y,z,1) in camera space maps to xr + yu + -vz + e, which means we start at the origin e, then travel x units along the line in the direction of r (by definition the positive x direction), then move y units along the u vector which is the positive y direction, and finally z units along -v which points in the positive z direction, which is exactly where we should end up relative to the camera.

This took a long time to type so hopefully it helps someone out!

myxamediyar

I like the new addition of suggesting terms, like look-at transforms or world-to-frame transforms etc. It makes it easier to remember the content and visualize what is actually happening.

You must be enrolled in the course to comment