Camera transform

cosmos 22nd July 2018 at 2:05pm
Camera (computer graphics) Viewing pipeline

Videovid2

  1. First place the camera at origin, and rotates it so that the direction vector coincides with the negative z axis, and the up vector coincides with the y axis. This bit of the transformation is done via the Camera matrix
  2. Convert things in the viewing volume of the camera (which is a Truncated pyramid) to Image space (which is a Cube) in homogeneous coordinates. This is the Viewing transformation
  3. Divide by the fourth component in homogeneous coordinates to get back to Cartesian coordinates in Image space

The camera transform corresponds to these steps (vid)

See Vertex shader, for more, about how it fits into the graphics pipeline

Viewing transformation

After the camera is in the origin is rightly oriented (pointed along the negative z direction, and up direction along y direction), we then vonvert things in the viewing volume of the camera (which is a Truncated pyramid) to Image space (which is a Cube).

This transformation is done so that the Stereographic projection that would have been necessary to project into the image plane in the original space, now becomes a Perpendicular projection in the image space!

This can be done with a 4x4 matrixthis is the beginning of the matrixthis is the rest of the matrix


After the camera transform, one projects points in image space perpendicularly to the xyx-y plane, called the Screen space