Graphics Reference
In-Depth Information
2.1.7 Description of transformations in the display pipeline
Now that the basic transformations have been discussed in some detail, the previously described trans-
formations of the display pipeline can be explained in terms of concatenating these basic transforma-
tions. It should be noted that the descriptions of eye space and the corresponding perspective
transformation are not unique. They vary among the introductory graphics texts depending on where
the observer is placed along the z -axis to define eye space, whether the eye space coordinate system is
left- or right-handed, exactly what information is required from the user in describing the perspective
transformation, and the range of visible z -values in image space. While functionally equivalent, the
various approaches produce transformation matrices that differ in the values of the individual elements.
Object space to world space transformation
In a simple implementation, the transformation of an object from its object space into world space is a
series of rotations, translations, and scales (i.e., an affine transformation) that are specified by the user
(by explicit numeric input or by some interactive technique) to place a transformed copy of the object
data into a world space data structure. In some systems, the user is required to specify this transfor-
mation in terms of a predefined order of basic transformations such as scale, rotation around the x -axis,
rotation around the y -axis, rotation around the z -axis, and translation. In other systems, the user may be
able to specify an arbitrarily ordered sequence of basic transformations. In either case, the series of
transformations can be compounded into a single object space to world space transformation matrix.
The object space to world space transformation is usually the transformation that is modified over
time to produce motion. In more complex animation systems, this transformation may include manip-
ulations of arbitrary complexity not suitable for representation in a matrix, such as nonlinear shape
deformations.
World space to eye space transformation
In preparation for the perspective transformation, a rigid transformation is performed on all of the
object data in world space. The transformation is designed so that, in eye space, the observer is posi-
tioned at the origin, the view vector aligns with the positive z -axis in left-handed space, and the up
vector aligns with the positive y -axis. The transformation is formed as a series of basic transformations.
First, the data is translated so that the observer is moved to the origin. Then, the observer's coor-
dinate system (view vector, up vector, and the third vector required to complete a left-handed coordi-
nate system) is transformed by up to three rotations so as to align the view vector with the global
negative z -axis and the up vector with the global y -axis. Finally, the z -axis is flipped by negating
the z -coordinate. All of the individual transformations can be represented by 4
4 transformation
matrices, which are multiplied together to produce a single compound world space to eye space trans-
formation matrix. This transformation prepares the data for the perspective transformation by putting it
in a form in which the perspective divide is simply dividing by the point's z -coordinate.
Perspective matrix multiply
The perspective matrix multiplication is the first part of the perspective transformation. The fundamen-
tal computation performed by the perspective transformation is that of dividing the x - and y -coordinates
by their z -coordinate and normalizing the visible range in x and y to [ 1, รพ 1]. This is accomplished by
using a homogeneous representation of a point and, as a result of the perspective matrix multiplication,
producing a representation in which the fourth element is Z e tan j . Z e is the point's z -coordinate in eye
Search WWH ::




Custom Search