Graphics Reference
In-Depth Information
This array representation for the motion equations matches both the indexed
trimesh representation and many real-time rendering APIs, so it is a natural way
to approach mesh animation.
One alternative is to leave the interpolation equation (Equation 35.4) unmod-
ified and instead redefine the input and output. For example, we could define a
function X ( t ) describing the state of the system as a very long column comprising
the positions of all vertices, instead of a 3-vector-valued function defining a single
position:
X ( t )= x 0 ( t ) y 0 ( t ) z 0 ( t )
x n 1 ( t ) y n 1 ( t ) z n 1 ( t ) T .
...
(35.6)
Note that nothing in our derivation depends on how components are arranged
within the vector. Therefore, any two state vectors obeying the same convention
can be linearly combined and the components will correspond along the appropri-
ate axes. This representation works well when extending the linear interpolation
to splines and, as shown later in this chapter in numerical integration schemes.
The chosen interpolation algorithm will simply treat its input and output as a sin-
gle very high-dimensional point, even though we consider it to be a concatenated
series of mesh vertices.
Another alternative is to redefine the position function as a matrix,
x 0 ( t ) x 1 ( t )
...
x n 1
y 0 ( t ) y 1 ( t )
...
y n 1
X ( t )=
.
(35.7)
z 0 ( t ) z 1 ( t )
...
z n 1
1
1
...
1
This representation works well with the matrix representation of coordinate trans-
formations because we can compute transformations of the form M
·
X ( t ) , where
M is a 4
4 matrix.
Each of these representations could be implemented with exactly the same
layout in memory. The difference in choice of representation affects the theoretical
tools we can bring to bear on animation problems and the practical interface to the
software implementation of our algorithms. In practice, representations analogous
to each of these have specific applications in animation for different tasks.
In closing, consider the state of our evolving interpolation algorithm. Although
the vertex motion is continuous under linear interpolation, there are several
remaining problems with this simple key pose interpolation strategy.
×
• The vertex motion has has C 0 continuity. This means that although posi-
tions change continuously, the magnitude of acceleration of the vertices is
zero at times between poses, and infinite at the time of the key poses. Using
a spline with C 1 or higher continuity can improve this (see Figure 35.8).
• The animation does not preserve volume. Consider key poses of a char-
acter and the character rotated 180 about an axis. Linear, or even spline,
interpolation will cause the character to flatten to a line and then expand
into the new pose, rather than turning.
• The walk cycle doesn't adapt to the underlying surface on which the char-
acter is walking. If the character walks up a hill or stairs, then the feet will
either float or penetrate the ground.
• Animations are smooth within themselves, but the transitions between dif-
ferent animations will still be abrupt.
Search WWH ::




Custom Search