Viewing
- This is chapter 5 of the book.
- Viewing is the process of transforming 3D objects onto a fixed 2D screen.
- Viewing is almost completely accomplished by matrix - matrix and matrix vector multiplications.
- This is the real applied linear algebra chapter.
- Typically
- Models are created in their own coordinate system. The modeling coordinate system
- Models are combined into a world coordinate system
- This is usually viewed from a camera coordinate system
- Which is transformed to NDC to DC by the process we have seen.
-
- When building a scene
- Move the models to the proper location in world coordinates.
- This is normally done with scales, rotates and translate.
- Place the camera in world coordinates
- Transform the entire scene to camera coordinates.
- Apply a lens transformation
- We normally work in homogeneous coordinate systems.
- More on this later, but for now, (x,y,z,1)
- Most camera transformations imply a view frustum
- The basic model is a pinhole-camera
- Along with a near plane and a far plane.
- The goal is to project items in the view volume onto the near plane.
-
- As rays shoot off into the distance, the view frustum is created.
- The near plane is used to throw away items too close to the viewer
- The far plane is used to eliminate objects too far in the distance to be seen.
- A prospective projection can be employed to map this strange shape to the NDC cube.
- This allows distant objects to appear smaller.
- And parallel lines going into the distance merge.
- At other times, in an orthographic projection, the z coordinate is just discarded.
- And parallel lines remain parallel.
- But there is no depth queue from prospective.