Animation techniques show us changes in a
scene according to a preset script. In general, this script describes
how the scene changes across time, and how objects inside the scene
move, deform or vary its color.
For a general introduction on
this topic, read the corresponding chapter to Animation in VIG course
interactive disc.
Armature-based
animation
In the simplest version, the user
specifies how each section of the armature shall move (which has many
fewer points than the mesh of the object we want to deform) in every
key-frame of the animation. Now, for each intermediate frame between
two key-frames, position of the armature's sections is computed using
interpolation, and finally the position of every vertex of the
triangle mesh of the deformed object is computed, using these
armature's sections position. This is used to animate humanoids,
animals, etc. To avoid errors during animation, an association must
be done between vertices of the triangle mesh which are very close to
the joints of sections with more than one of these sections.
See
the corresponding chapter for Animation in the VIG course interactive
disc.
Deformable
models
These methods are an attempt to simulate
the deformation of soft objects that have no armature: human organs
and tissues, collisioning and deformed balls, clothes, etc.
The
most intuitive (and empiric) methods for deformable objects
simulation are based on space deformation. In this case we have a
control mesh (which usually is regular and cubic) that envelopes the
object. The mesh acts as an skeleton for the object. In the simplest
version, user specifies how this control mesh (which has many fewer
points than the mesh to deform) is deformed in every animation
key-frame. Now, for each intermediate frame between key-frames,
position of all vertices of the mesh is computed using interpolation,
and finally the position of vertices of the deforming object's
triangle mesh is calculated from these positions in the control mesh.
In a preprocess step, for each vertex in the mesh we calculate its
corresponding cell in the control mesh, and its coordinates with
respecto to this control mesh (these coordinates may be linear,
baricentric based in a tetrahedra decomposition of cubes of the
original mesh, or based on Splines interpolation, as stated by
Sederberg or Sabine Coquillart). At each frame, and once we have
computed vertex positions of the control mesh, the only thing to do
is, for each vertex in the triangle mesh, compute a new position in
space such that, with respect to new positions of control vertices,
have the same coordinates calculated in the preprocess step.
The
problem is how to deform the control mesh if we do not want to
specify positions for every point in the mesh in every key-frame, as
stated before. The mass and spring based systems provide very
realistic and efficient simulations, and they are a good compromise
between simulation realism and interactivity. Control mesh is
deformed following mass and spring dynamics. Springs have a rest
position wich corresponds to the stable position of the control mesh.
When we are at a balanced state, the sum of forces from all springs
acting against a particular vertex must be zero. If we apply some
force in order to deform the mesh, this sum is not zero anymore, and
thus the mesh is deformed. Another option is: the user (using the
graphical interface) could move or stretch some vertices of the mesh.
In this case, he or she is stretching some of the springs, so the sum
of forces is not zero again, and thus the mesh is deformed. One of
the most used configurations for the control mesh is a uniform cubic
mesh, where each node or vertex of the mesh has 18 springs connected
to:
The 6 neighboring vertices in both senses of each coordinate directions
The 4 neighboring vertices on the diagonal, within a mesh cut going through the vertex and parrallel to plane XY
The 4 neighboring vertices on the diagonal, within a mesh cut going through the vertex and parrallel to plane XZ
The 4 neighboring vertices on the diagonal, within a mesh cut going through the vertex and parrallel to plane YZ
In each
iteration, the sum of forces produced by these 18 springs against
each vertex of the mesh is computed (according with Hook's linear
law, which gives the force of a stretched or compressed spring), and
each vertex is moved in proportion according to the resulting force.
In some cases, more than one iteration of this process is
performed.
If we want an even more realistic behavior, we
shall consider physic-based methods. One of the most known and used
is the finite element method. The result of the simulation is very
realistic, but it can be quite slow; the consequence is that in
general this method is applied only in non real-time animations. The
technique is based on dividing the objects to be animated into
elements (for a realistic animation elements should be small enough
and cover all the object's volume). Deformations at each node of the
mesh are computed, using applied forces. Deformations calculus
(displacement) is based on solving a large system of equations at
each frame.
Behavior
based animation
See Dimitri Terzopoulos'
algorithm, in section 6.3
Morphing
between images
Concepts and detailed algorithms
can be found in the corresponding Animation chapter in the VIG course
interactive disc.
Other interesting resources: