Graphics Reference
In-Depth Information
interpolation. This is a progression that we've seen before, when discussing
splines in Chapter 22.
Splines are in fact a common solution to the problem of interpolating between
key poses. Fitting one Catmull-Rom spline per vertex produces globally smooth
animation. Vertex-position splines do not address all of the key pose problems,
however. They still require storage proportional to the product of the vertex count
and the number of key poses and require a number of interpolation operations lin-
ear in the vertex count at runtime. Vertex splines require an artist to pose individual
vertices instead of working with higher-level primitives like limbs. Furthermore,
the results can be hard to control.
Because each vertex is animated independently and the vertices are only on
the surface of the character, there are no constraints to preserve volume or surface
area during animation.
35.5.2 Root Frame Motion
Object geometry and vertex animation is typically expressed relative to the root
frame of the object. This means that a walking character will stay at the origin
while its feet swing below the center of mass. To make the character move around
the world we could create an animation in which the vertices all travel away from
that starting position; however, this would require a tremendous amount of redun-
dant animation data. Instead, one typically models the transformation of the object
root. Root transformations are useful for more than just visible objects in the vir-
tual world. Lights, cameras, 3D widgets, and pointers all define their own frames
which may be subject to motion. Throughout this topic, we've constantly worked
with transformations between reference frames, and we've seen several alternative
representations of a 3D reference frame in Chapters 6, 11, and 12:
•4
×
4matrix
•3
3 rotation matrix and translation vector
• Euler angles: roll, yaw, pitch, and translation vector
• Rotation axis, rotation angle, and translation vector
• Unit quaternion and translation vector
×
4 matrix representation is often convenient and is what
most APIs have adopted. Because conversions exist between all of these repre-
sentations, the animation system need not use the same representation as the ren-
dering system. Although the matrix representation is sometimes convenient, the
quaternion-plus-vector representation is often preferred for simulation during ani-
mation and the Euler frame for motion specification of animation.
When choosing a representation, one typically seeks to minimize error and
simplify computations—both for performance and for readability. In animation,
we'll interpolate, differentiate, and integrate expressions containing the reference
frames. For a rotating body, performing those operations on the inherently linear
matrix structure will typically send points along the tangent to the desired sphere
of motion. For small steps, we can correct that error by projecting back onto the
sphere of motion, but small steps are not always possible or efficient. Although
not without their own problems, the quaternion and angle formulations are bet-
ter suited to expressing operations on the surface of a sphere. Among these, the
axis-angle representation presents something of the same problem as the matrix.
In rendering, the 4
×
 
 
Search WWH ::




Custom Search