Graphics Reference
In-Depth Information
Figure 8.4. A demonstration of how a view matrix is used to transform a scene into view space.
camera is located in world space, and the subsequent movement of the other objects when
they are converted to view space.
Projection Space
After obtaining the model data in view space, we need to apply a projection. It is quite
common in games and many visualization applications to use a perspective projection
that attempts to mimic the real-world perspective. This is not the only type of projection
though—many CAD packages also support orthographic projections as well. Since the
focus of this topic is on real-time rendering, we will focus on the perspective projection.
While the view matrix defines the location and orientation of the camera viewing the scene,
the projection matrix can be considered to define the camera's other characteristics, such
as the field of view (FOV), the aspect ratio, and the near and far clipping planes to be used.
These parameters define a viewing frustum, which indicates which objects are visible for a
given view position and set of projection characteristics.
This projection matrix will transform our vertices into what is referred to as clip
space. Clip space has been discussed in some detail in Chapter 3, but we can summarize
the concept here. In general, clip space is the frame of reference immediately after the
projection matrix has been applied. If the positions of each vertex are divided by their TV-
component, they will be contained in a space that represents the viewable area of a scene
within the unit cube. This unit cube extends from the origin of this space to +1 and -1 in
Search WWH ::




Custom Search