Lecture 18: Kinematics and Animation: Animation of 3D Models
Lecture 18: Kinematics and Animation: Animation of 3D Models
Animation of 3D Models
Figure 1: King Kong (from Visions in B & W)
In the early days of cinema 3D animation was
achieved using a physical 3D model which was
adjusted by hand to create each individual frame
of the animation. The classic example of the use
of this technique was in the movie King Kong
(1933), in which the model of Kong was only
about one foot high. Animation created by this
technique is still popular, a recent example being
Wallace and Gromit.
Computer support systems for animation be-
gan to appear in the late 1970s, and the rst com-
puter generated 3D animated full length lm was
Toy Story (1995). Although completely created
using the computer, Toy Story, and other modern
3D animation lms are still enormously costly in
human time. Fully automatic animation is still a long way off, but computer tools to support tools have devel-
oped rapidly. These remove much of the tedious work of the animator, and allow the creation of spectacular
special effects. Basic approaches are: (i) Physical Models; (ii) Procedural Methods and (iii) Keyframing.
Physical models
This approach is suitable for inanimate objects or effects where there is a simple tractable physical model.
Two examples are: bouncing balls and cars driving on rough roads. In both these cases the movement can be
calculated simply using Newtonian mechanics. In other cases composite models can be applied, such as spring
mass damper arrays for animating uttering ags or particle systems for creating re smoke or water.
Procedural models
The behaviour of an object is not modelled at all, but described as a procedure. The description often takes the
form of a script. This kind of approach is appropriate for easily dened behaviours in inanimate objects. One
example is crack propagation in glass or concrete, which can be used in a variety of effects. Crack propagation
is difcult to model physically, since it is inuenced by non-uniform material properties, but easy to describe
procedurally since cracks tend to follow common patterns.
Keyframes
Keyframing was a traditional method in hand drawn animation where the senior animator drew the key frames
at time intervals of around one second, and some stooge would then laboriously draw all the in-between frames.
Systems have evolved in which the computer calculates a number of in between positions to effect a smooth
movement between the two keyframes. These can be specied using, for example, spline curves to dene a path
of motion for some particular points on the moving object. However, even this process is difcult to automate
while maintaining a plausible movement. In particular it is necessary to (broadly) observe physical laws.
One method to constrain an animation of human or animal gures is to use a jointed skeletons. The skeleton
is made up of a set of links. Each link in the chain is rigid, and the movement is constrained by the degree of
freedom at each joint. The skeleton can be eshed out in any way to create the animated gure. One early
example was Luxo Jr. (1987) created by Pixar (http://www.pixar.com/shorts/ljr/theater/short 320.html). This
was hailed as the rst computer generated 3D animation to have the same natural appearance as the older hand
crafted animation. However, it still needed considerable human input to create appealing plausible movements.
The reason for this is that movements of humans and animals follow rather complex patterns which are difcult
to describe.
Interactive Computer Graphics Lecture 18 1
Figure 2: Galloping Horse by Eadweard Muybridge (1878)
The complexity of movement was rst obesrved by Eadweard Muybridge using a set of synchronised
cameras to capture frames separated by very short time intervals. His work was intended to create animted
photographs, and was a forerunner of the modern cinema. His most famous set of photographs shows the
various stages of a horse galloping (showing for the rst time that all four legs do leave the ground at one point)
and illustrates just how complex the movement actually is.
The complexity of natural movement makes it difcult to specify for computer based animation systems.
For this reason it is cheaper to used motion capture in lm special effects. Two recent examples of this were
Gollum, in The Lord of the Rings trilogy, and King Kong in the 2005 (not quite as good) remake of the
classic 1933 lm. In both cases an actor is lmed making the required movements. Then key points are tracked
throughout the sequence, and used to control the computer models movements. In the case of King Kong the
actor spent time at a zoo studying the movements made by gorillas, so that he could then imitate them. This
was a cheaper process than trying to specify them in a computer readable form.
Kinematics
Figure 3: Articulated
Chain for a Leg
Although motion capture is an effective way of collecting complex information
about movement, it is still very human intensive and therefore costly. Thus there
is still considerable interest in studying the movement of jointed chains. The work
also applies to the mechanics of robot movement and is called kinematics. One
of the most interesting current problems is the study of inverse Kinematics. Here
we specify the movement path of say one point on a chain (for example the foot in
gure 3) and then try to reconstruct the movement of all other points that create that
movement given certain constraints or possibly the need to minimise the motion as
a whole. Normally the links of the articulated chain are taken as rigid, and the
joints are constrained by the degrees of freedom they support. Three examples of
joints found in the body are illustrated in Figure 4.
(a) Hinge: 1 degree
of freedom
(b) Saddle: 2 degrees of
freedom
(c) Socket: 3 degrees
of freedom
Figure 4: Different types of Joints (images from www.shockfamily.net)
Interactive Computer Graphics Lecture 18 2
Euler Angles
At any joint we can specify the orientation of one link relative to the other by the Euler angles. These encode
pitch, roll and yaw. The links are xed in length (rigid), so the position of end of the chain is completely dened
by a set of Euler angles. For the leg shown in Figure 3 we have 3(hip) + 1(knee) + 1 (ankle) = 5 variables (Euler
Angles) to determine the end point.
Euler was the rst mathematician to prove that any rotation of 3D space could be achieved by three inde-
pendent rotations. The rotations could be performed in many ways, but the usual convention is to: (i) Rotate
about Z; (ii) Rotate about X and (iii) Rotate about Z (again) The complete Euler rotation matrix is therefore:
Cos() Sin() 0 0
Sin() Cos() 0 0
0 0 1 0
0 0 0 1
1 0 0 0
0 Cos() Sin() 0
0 Sin() Cos() 0
0 0 0 1
Cos() Sin() 0 0
Sin() Cos() 0 0
0 0 1 0
0 0 0 1
This formulation is not very intuitive, so to see what is happening consider transforming a vector w lying along
the z axis.
The rst rotation matrix will not change the vector w at all. In this case it turns the u and v directions about
the w direction. This would be equivalent to a roll, or the rotation of an image about its centre if w were the
viewing direction. The second matrix can rotate w to point to any position in the y-z plane as shown in Figure
5(a), where the axis system is viewed from along the positive z axis.
(a) Euler Rotation 2 (b) Euler Rotation 3
Figure 5: Euler Angles
The last rotation about the z axis can make the projection of w point in any direction in the x-y plane as
shown in Figure 5(b). Thus the combined transformation can orient w in any direction in the 3D space with the
u and v directions aligned in any direction.
Forward Kinematics
Figure 6: Forward Kinematics
Forward kinematics is used in robot control. Given a specication of
the Euler angles of each joint or an articulated robot arm we calculate
the position and orientation of its end point. This is a well posed
problem and can be solved by matrix transformations of space similar
to the ones that we have already seen in use - for example in rst
person shoot em ups.
We dene a coordinate system at the start of a chain and at each
joint as shown in Figure 6. Each new coordinate system is dened in
the co-ordinate system of the previous joint. Thus the position C
i
and
the direction vectors [u
i
, v
i
, w
i
] of frame i are dened using the frame
i 1 coordinate system. C
i
and [u
i
, v
i
, w
i
] can be calculated simply
using the Euler rotation matrix R
E
:
u
i
= [1, 0, 0]R
E
v
i
= [0, 1, 0]R
E
w
i
= [0, 0, L
i1
]R
E
where L
i1
is the length of link i 1.
Interactive Computer Graphics Lecture 18 3
We can express positions and directions in frame i in the coordinate system of frame i 1 by a matrix
transformation, which is the inverse of the viewing transformation discussed earlier in the course. This can be
found by inspection and veried by multiplying out.
u
x
u
y
u
z
0
v
x
v
y
v
z
0
w
x
w
y
w
z
0
C
x
C
y
C
z
1
u
x
v
x
w
x
0
u
y
v
y
w
y
0
u
z
v
z
w
z
0
C u C v C w 1
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
To extend this to a whole chain we denote the transformation from frame i to frame i 1 as:
T
i1
i
=
u
i
x
u
i
y
u
i
z
0
v
i
x
v
i
y
v
i
z
0
w
i
x
w
i
y
w
i
z
0
C
i
x
C
i
y
C
i
z
1
Then the complete forward transformation (using pre-multiplication) can be seen to be:
T
0
n
=
0
i=n
T
i1
i
Inverse Kinematics
For graphics applications we want the opposite process. We wish to specify some path for the end point of the
chain, and calculate the relative positions of all the other links. This is an ill posed problem (there are innitely
many solutions for some chains). Hence we need to nd a constrained solution minimising for example, the
joint movements.
We would like to use inverse kinematics to calculate in-between frames. For example, to generate ten
frames of a leg movement, we dene the ten steps that make up the foot movement, and estimate the changes
in the Euler angles of the rest of chain that implement those changes. In the simple articulated leg chain there
are ve Euler angles. The constrained angles are initialised to zero. One way to solve the problem is to use
gradient descent.
Let E be the distance between the end point and its target. For each Euler angle we nd dE/d using
forward kinematics, replacing with + and calculating E. We then update the angles using:
t
=
t1
dE
d
Applying gradient descent with small steps should nd a solution that involves only small joint movements.
However, over time it is still possible that a skeleton will reach an implausible pose. One approach is to
constrain the optimisation to avoid poor poses. Poor pose is difcult to dene, and needs analysis of videos of
actual motion. This is a current topic for research.
Summary
Currently human intervention is a necessary part of creating realistic living model animation, either using
motion capture or expert animator input. Physical modelling and procedural methods are successful in creating
movements in inanimate objects. Inverse kinematics can take some of the burden out of model animation
simulating living creatures, but is limited and is an interesting current research area.
Interactive Computer Graphics Lecture 18 4