On the beat!: timing and tension for dynamic characters.
ABSTRACT Dynamic simulation is a promising complement to kinematic motion synthesis, pa rticularly in cases where sim ulated characters need to respond to unpredictable interactions. Moving b eyond simple ragdoll effects, though, requires dynamic control. The main issue with dynamic control is that there are no standardized techniques that allow an animator to precisely specify the timing of the motion while still providing na tural response to exter nal disturbances. The few proposed techniques that address this prob lem are based on heuristically or manually tuning proportionalderivative (PD) control parameters and do not gen eralize easily. We propose an approach to dynamic character control that is able to hon or timing constraints, to provide natural looking motion and to allow for realistic response to perturbations. Our appro ach uses traditional PD control to interpolate between keyframes. The key innovation is that the parameter s of the PD controllers are computed for each joint analytically. By continuously updating these parameters over time, the controller is able to respond naturally to both external perturbations and changes in the state of the char acter.
 International Journal of Life Science. 01/2013;

Conference Paper: Misconceptions of PD control in animation
[Show abstract] [Hide abstract]
ABSTRACT: In this paper, we address certain misconceptions that have been perpetuated in the animation practice and research for quite some time related to the proportionalderivative (PD) control of physicsbased systems. Because in animation we often think in terms of targeting keyframes, we tend to forget that PD control, in its simple form, has a very specific asymptotic behavior that approaches zero (or an offset) with zero velocity as time approaches infinity. We pay particular attention to the issue of introducing a "desired" or "end" velocity term in the equation of a proportionalderivative controller, and discuss how this term should be interpreted and how it relates to feedforward control rather than an end derivative problem.Proceedings of the 11th ACM SIGGRAPH / Eurographics conference on Computer Animation; 07/2012 
Conference Paper: Misconceptions of PD control in animation
[Show abstract] [Hide abstract]
ABSTRACT: In this paper, we address certain misconceptions that have been perpetuated in the animation practice and research for quite some time related to the proportionalderivative (PD) control of physicsbased systems. Because in animation we often think in terms of targeting keyframes, we tend to forget that PD control, in its simple form, has a very specific asymptotic behavior that approaches zero (or an offset) with zero velocity as time approaches infinity. We pay particular attention to the issue of introducing a "desired" or "end" velocity term in the equation of a proportionalderivative controller, and discuss how this term should be interpreted and how it relates to feedforward control rather than an end derivative problem.Proceedings of the ACM SIGGRAPH/Eurographics Symposium on Computer Animation; 07/2012
Page 1
Eurographics/ ACM SIGGRAPH Symposium on Computer Animation (2007)
D. Metaxas and J. Popovic (Editors)
On the Beat! Timing and Tension for Dynamic Characters
Brian Allen, Derek Chu, Ari Shapiro and Petros Faloutsos
Department of Computer Science
University of California, Los Angeles
Abstract
Dynamic simulation is a promising complement to kinematic motion synthesis, particularly in cases where sim
ulated characters need to respond to unpredictable interactions. Moving beyond simple ragdoll effects, though,
requires dynamic control. The main issue with dynamic control is that there are no standardized techniques that
allow an animator to precisely specify the timing of the motion while still providing natural response to exter
nal disturbances. The few proposed techniques that address this problem are based on heuristically or manually
tuning proportionalderivative (PD) control parameters and do not generalize easily.
We propose an approach to dynamic character control that is able to honor timing constraints, to provide natural
looking motion and to allow for realistic response to perturbations. Our approach uses traditional PD control
to interpolate between keyframes. The key innovation is that the parameters of the PD controllers are computed
for each joint analytically. By continuously updating these parameters over time, the controller is able to respond
naturally to both external perturbations and changes in the state of the character.
Categories and Subject Descriptors (according to ACM CCS): I.3.7 [Computer Graphics]: ThreeDimensional
Graphics and Realism
1. Introduction
The acceptance of physical simulation as a standard compo
nent in interactive entertainment and “serious” games brings
great possibilities to character animation. Although recent
work has made significant progress in the simulation of dy
namic characters, current control methods are difficult to use
and require significant tuning for proper behavior. In this pa
per, we provide a practical solution to two troubling facets
of physical characters: natural response to perturbations and
precise timing control.
Small physical disturbances are a ubiquitous part of ev
eryday life, from being bumped while queuing at the store
to a shooting foul while playing basketball. Animation with
natural responses to such perturbation “sells” the physical
ity of a character. Overly stiff or loose reactions break the
viewer’s suspension of disbelief.
Despite their promise, dynamic characters have seen lim
ited use in interactive simulations outside of simple ragdoll
behavior. A key impediment is that developers and anima
tors have been asked to sacrifice a significant amount of
control compared to kinematic animation. The advantage
of physicality– natural response to perturbation– becomes a
weakness when precisely timed motion is needed. Of course,
traditional kinematic animation has no such limitation, but
neither such a capacity. Control over the timing of motion is
often critical for interactive applications– catching a ball, for
example, is problematic if you cannot guarantee the hand’s
location when the ball arrives. To solve these issues, we
present a method to drive a dynamic character by physical
interpolation of keyframes.
Redefining the dynamics control problem as one of phys
ical interpolation proves to be quite flexible. We describe
three applications built on physical interpolation: pose con
trol, keyframe animation, and tracking motion capture.
2. Overview
Our approach to dynamic character control is able to provide
naturallooking motion while honoring timing constraints
and providing realistic response to perturbation. We use tra
ditional proportionalderivative (PD) feedback controllers to
interpolate between keyframes in a manner analogous to
classickeyframeanimation.Ingeneral,PDcontrollerscom
pute the magnitude of the control torque τ around a joint for
Copyright c ? 2007 by the Association for Computing Machinery, Inc.
Permission to make digital or hard copies of part or all of this work for personal or class
room use is granted without fee provided that copies are not made or distributed for
commercial advantage and that copies bear this notice and the full citation on the first
page. Copyrights for components of this work owned by others than ACM must be hon
ored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on
servers, or to redistribute to lists, requires prior specific permission and/or a fee. Re
quest permissions from Permissions Dept, ACM Inc., fax +1 (212) 8690481 or email
permissions@acm.org.
SCA 2007, San Diego, California, August 04  05, 2007
c ? 2007 ACM 9781595936244/07/0008 $ 5.00
Page 2
B. Allen, D. Chu, A. Shapiro & P. Faloutsos / On the Beat! Timing and Tension for Dynamic Characters
each timestep as
τ = ks(ˆθ−θ)+kd(ˆ ω−ω),
(1)
whereˆθ and ˆ ω are the desired position and angular velocity,
θ and ω the current position and angular velocity, and ksand
kdthe parameters that specify the trajectory of the joint’s
motion.
The key innovation of our approach is that the parameters
of the PD equation, ks and kd, are updated in a principled
manner for each joint axis and for each control timestep.
By continuously altering the PD parameters, the controller is
able to respond both to changes in the state of the character
and to external perturbations, all while maintaining timing
constraints.
Many prior dynamic control systems in computer graph
ics have used PD control, and each has needed some method
for choosing the parameters. The most common approach in
computer graphics has been to carefully “tune” the parame
ters until the desired motion trajectory is obtained.
A key drawback to this common approach is that it sim
ply cannot support more than one motion with timing re
quirements.Toillustrate,supposeananimatorwishes achar
acter’sarmtoswingfrompositionAtoBinonesecond(Fig
ure 1, upper). In typical usage, the userwould need trialand
error to find appropriate (ks,kd) parameters for this motion
timing. If the next step of the animation required the arm to
swing from B to C, the (ks,kd) tuned for the previous swing
now also define the timing of the second swing as well. The
user has no control over timing without breaking the previ
ous (hard won) timing from A to B. It is important to realize
that, even in this extremely simple example, there is sim
ply no single (ks,kd) that will satisfy this animator’s modest
needs.
Indeed, the difficulty of manually choosing PD parame
ters does not end there. If the character wishes to perform
the same armswing with the same timing as before, but now
with a bent elbow (Figure 1, lower), the previous handtuned
(ks,kd) parameters will no longer suffice. This is because
the composite inertia of the arm has changed– the bent arm
needs less torque to swing than the straightened arm.
In addition to the timing, the animator is also likely to
wish to control shape of the trajectory for the armswing.
With a PD controller, the character of the motion trajec
tory is determined by the ratio of kd: ks. An underdamped
controller, with too low a ratio, will cause the arm to oscil
late unnaturally. But increasing the ratio too much yields an
overdamped controller, which moves too slowly and gives
the impression of a character moving underwater. The com
promise ratio produces an armswing that is fast, smooth
and does not oscillate. This motion is said to be critically
damped. However, the critically damped ratio between ks
and kddepends on the moment of inertia at the joint, which
inturn depends on the limb’s composite inertia. With so
A
B
C
D
A
B
CD
Figure 1: The character demonstrates a simple, singleaxis
rotation with two arm positions. The moment of inertia at the
shoulder joint changes dramatically with the bent elbow.
many varying dependencies, handtuning PD controllers can
be a daunting task.
Our approach is to eliminate handtuning and heuristic
methods to determine the PD parameters, and instead com
pute them analytically. As was demonstrated with the simple
example of a character swinging a bent arm, any method to
automatically compute the PD parameters must first deter
mine the composite inertia of all controlled links. In our ap
proach, we descend the character’s articulated hierarchy and
recursively calculate and store each link’s composite iner
tia. The implementation, described in Section 4.2, is efficient
and absolutely critical to PD control with timing.
An additional complication to PD control is that the con
trol torque is computed (1) for each joint in isolation. This
introduces error, since the torque from each joint has a di
rect effect on every other joint in the hierarchy. To account
for this effect, we use parenttorque compensation– that is,
each joint is computed with the knowledge of the net torque
of its parent joints. This approach is an efficient approxima
tion that provides more precise control and is described in
Section 4.4.
c ? Association for Computing Machinery, Inc. 2007.
Page 3
B. Allen, D. Chu, A. Shapiro & P. Faloutsos / On the Beat! Timing and Tension for Dynamic Characters
0
A (0.0s)
5
10
15
20
25
30
35
B (1.0s)
Pose (Time)
C (1.75s)D (2.25s)
ks (Nm/rad)
Straight Arm
Bent Arm
Figure 2: The proportional parameters (ks) used to drive the
examples shown in Figure 1.
Arbitrary trajectories, such as motion capture data, can
also be tracked using this lowlevel controller. By sampling
the motion data, a target keyframe is created and given as
input to the lowlevel controller. Setting a keyframe based
on the motion data in the nearfuture provides a principled
means of determining muscle tension, similar to the torque
based model proposed in [YCP03].
Our approach to control provides several advantages: tim
ing support, dynamic interpolation, and natural response
with principled tension control.
A key feature of our approach is that timing control re
mains possible even when the character is subject to un
known perturbations. Thus ourapproach offers dynamic ani
mation the reliability and specifiability familiar to kinematic
animation. This combination of control and support for in
teraction is of critical importance to realtime games. Sec
ondly, our method yields natural dynamic responses to per
turbations. The user specifies the tension of the response by
designating the time allowed before the character returns to
the target trajectory. By providing tension control in human
readable units (seconds), tension control becomes intuitive
and complements the general focus on precise timing.
3. Background
Currently, the dominant approaches to dynamic con
trol for realtime animation are roboticsderived con
trollers [Woo98, FvdPT01a] and tracking of motion cap
ture [ZH99]. While roboticsderived controllers have
been shown to perform a surprising variety of mo
tions [HWBO95], they also require a surprising amount
of work for each new behavior. To ameliorate this bur
den, much effort has gone into reusing kinematic anima
tion approaches, especially motion capture, for the control
of physically simulated characters. [RGBC96] describes an
approach to generate physically plausible transitions that
stitch together disparate motion data. Transitions are found
that minimize the applied torque, which is computed us
ing an inverse dynamics algorithm [BP92] that determines
composite inertia in a recursive manner similar to ours.
[MZW99, WJM06] report that worldspace error, instead
of jointspace error, provides more stable tracking with a
wider range of control parameters. Weinstein et al [WGF06]
provides a feedbackbased trajectory tracking scheme that
uses a similar analytical formulation to ours to guarantee
single timestep error elimination. The focus is exclusively
tracking, however, and perturbation response is not consid
ered. [ZH99,ZH02,ZMCF05] use stiff feedback controllers
to track the motion capture trajectory in jointlocal space.
[ZMCF05, SPF03] consider circumstances where the orig
inal motion was no longer reachable due to an obstruc
tion or large perturbation; although we detect such cases,
our approach does not attempt to handle failure circum
stances. [ZH02] handles reaction to perturbation by switch
ing to heuristically determined control parameters that re
quire human “tuning.”
To provide control after a perturbation, [ZH02,ZMCF05]
use an inertiascaled proportionalderivative controller. This
formulation scales the calculated torque by the mass of the
joint’s outboard link. We follow a similar approach, but
compute the composite inertia of all links distal to the joint
being controlled. Much more accurate control torque is pos
sible if the correct composite inertia is used. Note that prior
works, such as [ZH99], have suggested using composite in
ertia in control, but, to our knowledge, the details required to
compute the composite inertia have not been provided in the
computer graphics literature.
Lee and Terzopoulos [LT06] describe a biomechanical ap
proach to tension control based on modeling multiple antag
onistic muscles. Their approach produces highquality mo
tion with controllable levels of tension, and even demon
strates tracking of motion capture data. However, it is un
clear how or even if such detailed modeling could be scaled
to control entire characters in realtime.
Neff and Fiume [NF02] provide an approach to automat
ically computing the PD control parameters, which is the
basis of our physical interpolation approach. However, their
approach is limited to posetopose transitions by design,
and it remains unclear how it might be used to interpolate
between general keyframes (with nonzero end velocities)
or track motion capture.
Tension control has also been examined specifically in
the context of tracking motion capture data. Zordan and
Hodgins [ZH02] provide a heuristic rule for determining
the proportionalderivative parameters for perturbation re
sponse.Yinetal[YCP03]suggestobtainingthetensionlevel
from an estimation of muscle activation, where activation is
derived from joint torque computed using inverse dynamics.
This is directly analogous to our handling of tension during
motion tracking, and is a direct result of hightorques being
derived from highstiffness control parameters.
c ? Association for Computing Machinery, Inc. 2007.
Page 4
B. Allen, D. Chu, A. Shapiro & P. Faloutsos / On the Beat! Timing and Tension for Dynamic Characters
Both inverse dynamics [YCP03] and very stiff feedback
controllers [ZH02] provide excellent solutions to the prob
lem of tracking motion, but such tracking suffers from being
too precise– natural responses to perturbations are lost. In
fact, both of these approaches resort to PD control for per
turbation response.
4. Physical Interpolation of KeyFrames
Our control approach is based on the ability to drive a char
acter’s joint to a specified keyframe. For our purposes, a
keyframe, or “physical keyframe,” is a tuple of desired
jointpositionˆθ, desired jointvelocity ˆ ω and target time ˆ t:
γ = (ˆθ, ˆ ω,ˆ t). The control approach described in this sec
tion allows an animator to specify a set of keyframes di
rectly analogous to traditional splinebased kinematic inter
polation. Additionally, this lowlevel approach can be used
to track existing motion trajectories, as described in Sec
tion 5.3.
The torque of the ith joint τi targeting the kth key
frame γk= (ˆθk, ˆ ωk,ˆ tk) is computed using the proportional
derivative controller (1). During the controller update cycle,
the PD control parameters, ksand kd, are calculated to match
the timing of the next keyframe. The function ψ(·) is used
to compute these parameters and is defined as
(ks,kd) = ψ(D(q),γk) = ψ(D(q),(ˆθk, ˆ ωk,ˆ tk)),
where D(q) is the combined inertia tensor of the outboard
body segments, and depends on the current state of the char
acter q. Calculating ψ requires determining the composite
moment of inertia (Section 4.2), the scalar moment (Sec
tion 4.3), and compensating for the effect of parent joint’s
torque (Section 4.4). An example of the output of ψ(·) for a
simple keyframe animation is provided in Figure 3.
(2)
4.1. ProportionalDerivative Parameters
The method of automatic calculation of the proportional
derivative parameters using ψ, defined in (2), is a major ele
ment of this paper’s contribution. ψ provides the parameters
that allow a particular joint to reach its target state in time
ˆ t, using the PD controller from (1). This can be written as a
secondorder ordinary differential equation in θ, with˙θ = ω
and m as the moment of inertia about the joint axis,
m¨θ−ks(ˆθ−θ)−kd(ˆ ω−ω) = 0.
The analytical solution provides the basis for determining ψ.
In particular, the difference between the desired θ and ω and
the system’s actual state is reduced in the shortest time when
the system is critically damped. This requires the parame
ters to satisfy k2
inertia around the axis of applied torque [Bar98]. With this
constraint, a simpler parameterization can be derived using
the desired timeˆ t to eliminate a given fraction of the error f.
A reasonable value for f is 0.9, which reduces the error to
10% in time td[Bar98].
(3)
s − 4 m kd= 0, where m is the moment of
0
2
4
6
8
10
12
Y(0.1s) M(1.1s)C(1.85s) A(2.35s)
Pose(time)
0
0.5
1
1.5
2
2.5
ks(Nm/rad)
kd (Nms/rad)
ks (Nm/rad)
kd (Nms/rad)
Figure 3: The character moves through a series of poses in
time to a popular song. The poses targeted are arm positions
for the letters YMCA (see supplemental video). Through
out the animation, each controller update calculates ψ(·) →
(ks,kd). The calculated values for the character’s shoulder
joint change with each timestep to ensure correct timing
throughout the animation. Manually determining these val
ues, even for a single joint, would be difficult.
Since the decay rate of the error is exponential when crit
ically damped, the number n of time constants needed to
eliminatethefraction f oftheerrorisn=−1/ln(f)[BD91].
This determines the time constant, λ, needed to reduce the
error adequately in time ˆ t: λ =ˆ t/n.
τ =m
λ2(ˆθ−θ)+2m
λ(ˆ ω−ω).
(4)
This approach is directly analogous to the secondorder dif
ferential equation describing the decay of constraint error in
Barzel and Barr [BB88], but rather than attempting to elimi
nate the error in one timestep, our method reaches the target
state in ˆ t seconds and provides support for a nonzero target
firstderivative.
4.2. Composite Inertia Tensor
To determine the moment m in (4) the composite inertia ten
sor of outboard links is needed. Inertia tensors sum nat
urally, so Di..n= ∑n
for joints i through n. However, this expression holds only
for inertia tensors in the same coordinate system. Dynamics
simulators typically store each link’s inertia tensor in link
local coordinates for efficiency and convenience, so conver
sion to a consistent frame is required.
The recursive NewtonEuler formulation, proposed
by [LWP80], is efficient [Lil93] and easy to implement. For
each connecting joint in the articulated object, transform the
child’s inertia tensor into the parent’s coordinate frame, and
replace the parent’s inertia tensor with the sum of parent and
child. By starting the recursion at each endeffector and en
suring to accumulate over each joint once, the composite in
ertia for each link is compute in O(n) time.
j=iDj is the composite inertia tensor
c ? Association for Computing Machinery, Inc. 2007.
Page 5
B. Allen, D. Chu, A. Shapiro & P. Faloutsos / On the Beat! Timing and Tension for Dynamic Characters
ci
p
R
parent link i1
child link i
i d
i
i
si
Figure 4: This schematic shows the geometrical elements
used by (5) to transformthe inertia tensor of the ith child link
into the parent link’s (i−1)th coordinate frame, and by (7)
to calculate the moment around joint axis si. The transfor
mation from child to parent is a translation piand rotation
Ri. In the child’s linklocal origin, the position vector of the
centerofmass is ciand the position vector of the joint is di.
To perform the transformation from child to parent, the
coordinate system transform is decomposed into a rotation
matrix, R, and the linear distance from the child’s to the par
ent’s coordinate frame p. The position vector of the center of
mass in the child’s coordinate frame is c. The child’s inertia
tensor D is transformed to its parent’s coordinate frame D?
by
D?= RDRT−M([p][Rc]+[Rc][p]+[p][p]),
(5)
where M is the scalar mass of the child link and [·] is the
notation for the skewsymmetric matrix defined by u×v =
[u]v, or equivalently,
[u] =
0
uz
−uz
0
ux
uy
−ux
0
−uy
.
(6)
Using this expression, a composite inertia tensor Dii..nfor
link i can be computed recursively, from distal to proximal.
Thecompositetensorisexpressedintheithlink’scoordinate
frame, and combines its own and all of its outboard links’
inertia, from i to the distalend link n.
4.3. Moment of Inertia about the Joint Axis
With the composite inertia tensor of the ith joint in link
local coordinates Dii..navailable, we can compute the mo
ment of inertia about the ith joint’s axis of torque siusing
the parallelaxis theorem as
mi= si·Dii..nsi+Mi..n
???(ci..n
i
−di)×si
???
2,
(7)
where ci..n
and Mi..nthe combined scalar mass of the ith link and all
child links, diis the vector from the link’s coordinate frame
to the joint, and siis a unit vector. Both ci..n
i
is the vector from the combined center of mass
i
and Mn..ican
be computed during the same recursive traversal from end
effectors to the root that is used to compute Dii..n(see Sec
tion 4.2), keeping the timecomplexity at O(n).
4.4. ParentTorque Compensation
The computation of ψ in each controller update provides a
precise estimate of the torque needed to reach the target key
frame at the appropriate time. To improve its accuracy, each
joint estimates how the combined torque of all inboard (par
ent) joints will affect it. The joint then is able to compensate
for the induced acceleration on its axis of rotation, si. The
total angular acceleration applied to joint i in world coordi
nates is
i−1
∑
j=0
where Gw
local coordinates to world coordinates, mjis the moment of
composite inertia (7), and τjis the computed scalar torque
around the jth joint from (4).
The required torque to compensate for the applied angular
acceleration aiis that acceleration projected onto the joint
axis in world coordinates,
ui= ai·(Gw
With the addition of this term, we obtain the final expression
for the control torque of the ith joint, so (4) becomes,
τi=mi
ai=
τj
mjGw
jsj,
(8)
jis the transformation matrix from the jth link
jsi).
(9)
λ2(ˆθi−θi)+2mi
λ( ˆ ωi−ωi)+ai·(Gw
jsi).
(10)
This final torque is applied to the joint as long as τi< τmax,
i.e., as long as the computed torque is below the maximum
allowed torque for the joint. If the torque exceeds τmax, then
the character is not strong enough to match the desired mo
tion. A failure message can be communicated to the control
ling application, and [ZMCF05,SPF03] suggest approaches
to handling such conditions.
4.5. Efficiency of Control
The full process of calculating the control torque consists of
two passes through articulated link hierarchy and is summa
rized in Algorithm 1. First, the composite inertia pass, de
scribed in Section 4.2, recursively descends from each end
effector toward the root, visiting each link once to accumu
late the composite inertia for the current state, D(q). Sec
ond, the torque is computed once for each joint in (10) is
computed once for each joint, accumulating the link’s an
gular acceleration aifollowing the hierarchy from root to
endeffector.
5. Applications
5.1. KeyFrame Animation
We have described a method to physically interpolate key
frames. It is simple to integrate this lowlevel controller into
c ? Association for Computing Machinery, Inc. 2007.
Page 6
B. Allen, D. Chu, A. Shapiro & P. Faloutsos / On the Beat! Timing and Tension for Dynamic Characters
Algorithm 1ComputeControlTorque(q,γ) → τ
for all links l, descending do
if parent(l) exists then
Dl← Dl+transformInertia(Dparent(l),l) {see (5)}
end if
j = outboardJointOfLink(l)
aj← 0
end for
for all joints i, ascending do
l ← outboardLinkOfJoint(i)
(ksi,kdi) ← ψ(Dl,γi)
mi← moment(Dl,i) {see (7)}
ui← parentTorque(i,ai) {see (9)}
τi← PD(ql,mi,ksi,kdi,γi,ui) {see (10)}
τi← min(τi,τmax)
for all joints c in children(l) do
ac← ac+transform(τi/mi,c) {see (8)}
end for
end for
return τ
a traditional keyframe animation system. As detailed in Al
gorithm1,therequiredinputtothesystemisthecurrentstate
vector q and a vector of the target keyframes (γ1,γ2,...).
The motion between keyframes is specified by the first
derivatives ˆ ω, analogous to Hermite spline interpolation, and
determined by the dynamics of PD control.
5.2. Pose Control
If a set of target keyframes specifies all the controllable
degreesoffreedomforaparticulartime,thenthatsetofkey
frames is said to define a pose. Dynamic controllers of sur
prising complexity [FvdPT01b, HWBO95, vKF94, YLv07]
have been built by creating a finitestate machine (FSM) that
controls the target pose. Our physical interpolation system
supports this approach directly through a simple scripting
system.
As an example of simple control, the supplementary video
includes an animation of a skeleton conducting Beethoven’s
Fifth Symphony. The controlling script demonstrates the
power of the approach– only target (pose, time) tuples are
specified.Itshouldbenotedthatnootherparametersarepro
vided to the system and no “handtuning” has taken place.
Below is an excerpt of the script.
...
skeleton.setTargetPose( “ArmsFront”, 0.3 )
skeleton.setTargetPose( “ArmsUp”, 0.3 )
skeleton.setTargetPose( “Out”, 0.3 )
skeleton.setTargetPose( “UpBeat”, 0.4 )
skeleton.setTargetPose( “DownBeat”, 0.545 )
skeleton.setTargetPose( “UpBeat”, 0.545 )
...
0
5
10
15
20
25
0 5 10 15 20
0
0.5
1
1.5
2
2.5
3
3.5
ks(Nm/rad)
kd (Nms/rad)
Time (s)
Right Shoulder ks
Right Shoulder kd
Left Shoulder ks
Left Shoulder kd
Figure 5: The output of ψ(·) for the Xaxis of the left and
right shoulders during the conducting motion shown in the
supplementary video.
The parameters for the character’s shoulder joints gener
ated by this script are shown in Figure 5.
5.3. Tracking Motion Capture
A variety of approaches to tracking motion capture has been
proposed in animation literature, with the most common be
ing stiff PD control [ZH02,ZMCF05], and inverse dynam
ics [YCP03]. Our approach also uses PD control, building
directly on the physical keyframe interpolation control de
scribed (Section 4).
At each control timestep, a desired keyframe γ is cre
ated by sampling the motion capture data. This keyframe
contains joint velocity, which be obtained from the motion
capture data by using the finite difference between frames.
5.3.1. Perturbation Response
When a perturbation to the character is detected (such as an
unexpected collision), a parameter δ controls the stiffness of
the response by specifying the time, in seconds, to resolve
the perturbation and return the character’s motion to the mo
tion capture trajectory.
On disturbance, a new keyframe vector γt+δis created by
sampling the motion capture data at time (t +δ). Targeting
γt+δguarantees that the perturbation response will be com
pleted by time t +δ. During this δ second window, the mo
tion capture is no longer tracked and only the new keyframe
at t +δ is used.
The δ parameter allows a principled, knownunits (sec
onds) parameter for controlling the response stiffness.
6. Results
With our method, the animator need only specify a set of
keyframes containing desired position, velocity and timing
information. In Figure 6 (top row), a character catches a
c ? Association for Computing Machinery, Inc. 2007.
Page 7
B. Allen, D. Chu, A. Shapiro & P. Faloutsos / On the Beat! Timing and Tension for Dynamic Characters
moving ball based on a single keyframe with timing infor
mation.Inthebottomrow,thecharacter’sarmrespondstoan
external disturbance and still catches the ball at the correct
time, without requiring any additional effort or information
from the animator.
In Figure 7, we compare our method to a manually tuned
PD controller. The two characters go through four key
frames following the popular “YMCA” dance. The manually
tuned system has been adjusted to reach the “Y” keyframe
at the appropriate time. As expected, the timing of the subse
quent keyframes is off. It is worth noting that in the case of
the manually tuned system, it took a fairly experienced stu
dent several minutes to get the timing of the “Y” keyframe
correct. Using our approach, the user has only to specify the
desired time of the keyframe.
In Figure 8, we compare our method to a “locally” crit
ically damped PD controller that does not account for the
composite inertia of the articulated chain. This method has
been widely used, such as in [ZH02, ZMCF05]. The two
characters conduct the opening movement of Beethoven’s
Fifth Symphony by interpolating between twelve poses. Our
approach provides natural looking motion with correct tim
ing.
6.1. Implementation
The results provided used a character model with 39
degreesoffreedom and humanlike limblengths, masses,
and moments of inertia. We used the DANCE animation
environment [SFNTH05] with the Open Dynamics En
gine [Smi07] for forwarddynamics simulation and collision
detection.
7. Discussion and Limitations
The described approach to dynamic character control em
phasizes practical utility and naturallooking motion. Since
PD control is equivalent to a spring force, using a PD
controller to resolve error from perturbation is equiva
lent to the parallelelastic element of the Hilltype muscle
model [ZW90], providing a representation of passive neu
romotor feedback [YCP03]. This approximation may not
be sufficiently accurate for demanding applications. In par
ticular, muscle stiffness is known to be a nonlinear func
tion of a variety of factors, most importantly extension
length [WC00]. In addition, PD control is wellknown to
exhibit steadystate error in the presence of external forces
(such as gravity). As our approach is based on PD control, it
also suffers from such errors and keyframe targets may not
be reached precisely.
Our approach for compensating for parent torque, in Sec
tion 4.4, uses only a single pass from the root to end
effectors. Although efficient, the algorithm does not take
into account subsequent effects of child torques on parent
joints. An O(n3) algorithm that simultaneously solves for
the torque at all joints is described as Method 3 in [WO82].
An additional complication to our recursive formula
tion is that it assumes the character has a fixed base
serving as root. This assumption suffices for upperbody
motion, since the torso dominates the mass of the sys
tem and provides an approximately fixed platform. The
fixedroot assumption is particularly wellsuited for sys
tems using balanceassisting root springs to stabilize the
character [vL95,WJM06,SCAF07]. However, the proposed
method is not appropriate for determining control parame
ters for support limbs.
Perturbations that are sufficiently strong and close to a tar
get keyframe will require unnaturally large joint torques to
meet the timing constraint. In these cases, we apply a per
joint limit on torque (see τmaxin Section 4.4). A single, time
invariant, perjoint limit does not accurately model maxi
mum muscle exertion, since a variety of additional factors
are known [WC00], such as fatigue.
8. Conclusion
We have presented an approach to controlling the timing and
apparent stiffness of motion using PD control for dynamic
characters. An animator specifies a set of keyframes and
the associated timing information. Our system automatically
computes the proportional and derivative parameters of the
PD controller. The resulting parameters yield control torques
that honor the timing of the provided keyframes even when
the character is disturbed by external forces. The resulting
character motion exhibits natural stiffness. The proposed ap
proach is efficient, straightforward to implement, and en
tirely automatic.
Acknowledgments
The authors thank the anonymous reviewers for their sug
gestions and comments, and Demetri Terzopoulos and Sung
Hee Lee for many helpful discussions and suggestions. BBC
Radio and the Internet Archive graciously provided to the
public domain the performance of Beethoven’s Fifth Sym
phony used in the supplemental video. The work in this pa
perwaspartiallysupportedbyNSFgrantNo.CCF0429983.
We thank Intel Corp., Microsoft Corp., ATI Corp., and
AGEIA Corp. for their generous support through equipment
and software grants.
References
[Bar98]
[BB88]
dynamic constraints. Computer Graphics 22, 4 (August 1988),
179–188.
[BD91]BOYCE W. E., DIPRIMA R. C.:
of Robot Manipulators: A Cartesian Tensor Approach, 1st ed.
Springer, 1991.
BARUH H.: Analytical Dynamics. McGrawHill, 1998.
BARZEL R., BARR A. H.: A modeling system based on
Dynamic Analysis
c ? Association for Computing Machinery, Inc. 2007.
Page 8
B. Allen, D. Chu, A. Shapiro & P. Faloutsos / On the Beat! Timing and Tension for Dynamic Characters
[BP92]
Equations and Boundary Value Problems, 5th ed. Wiley and
Sons, 1992.
[FvdPT01a]FALOUTSOS P., VAN DE PANNE M., TERZOPOU
LOS D.: Composable controllers for physicsbased character
animation. In Proceedings of ACM SIGGRAPH 2001 (Aug.
2001), Computer Graphics Proceedings, Annual Conference Se
ries, pp. 251–260.
[FvdPT01b]FALOUTSOS P., VAN DE PANNE M., TERZOPOU
LOS D.: The virtual stuntman: Dynamic characters with a reper
toire of autonomous motor skills. Computers & Graphics 25, 6
(2001), 933–953.
[HWBO95]HODGINS J. K., WOOTEN W. L., BROGAN D. C.,
O’BRIEN J. F.: Animating human athletics. In SIGGRAPH ’95:
Proceedings of the 22nd annual conference on Computer graph
ics and interactive techniques (1995), ACM Press, pp. 71–78.
[Lil93]LILLY K. W.: Efficient Dynamic Simulation of Robotic
Mechanisms, 1st ed. Kluwer Academic Publishers, 1993.
[LT06]LEE S.H., TERZOPOULOS D.: Headsup!Biomechanical
modeling and neuromuscular control of the neck. ACM Trans.
Graph. 25, 3 (2006), 1188–1198.
[LWP80]LUH J. Y. S., WALKER M. W., PAUL R. P. C.: On
line computational scheme for mechanical manipulators. Trans.
ASME, J. Dynamic Systems, Measurement and Control 102, 2
(1980), 69–76.
[MZW99]MATARI´C M. J., ZORDAN V. B., WILLIAMSON
M. M.: Making complex articulated agents dance. Autonomous
Agents and MultiAgent Systems 2, 1 (1999), 23–43.
[NF02]NEFF M., FIUME E.: Modeling tension and relaxation for
computer animation. In SCA ’02: Proceedings of the 2002 ACM
SIGGRAPH/Eurographics Symposium on Computer Animation
(2002), ACM Press, pp. 81–88.
[RGBC96]ROSE C., GUENTER B., BODENHEIMER B., COHEN
M. F.: Efficient generation of motion transitions using space
time constraints. In SIGGRAPH ’96: Proceedings of the 23rd
annual conference on Computer graphics and interactive tech
niques (New York, NY, USA, 1996), ACM Press, pp. 147–154.
[SCAF07]SHAPIRO A., CHU D., ALLEN B., FALOUTSOS P.: A
dynamic controller toolkit. In The 2nd Annual ACM SIGGRAPH
Sandbox Symposium on Videogames (2007).
[SFNTH05]SHAPIRO A., FALOUTSOS P., NGTHOWHING V.:
Dynamic animation and control environment. In GI ’05: Pro
ceedings of the 2005 conference on Graphics interface (2005),
pp. 61–70.
[Smi07]SMITH R.: Open dynamics engine. http://www.ode.org/,
2007.
[SPF03]SHAPIRO A., PIGHIN F. H., FALOUTSOS P.:
brid control for interactive character animation.
cific Conference on Computer Graphics and Applications (2003),
pp. 455–461.
[vKF94]
up toys for animation. In Proceedings of Graphics Interface ’94
(1994), pp. 208–215.
[vL95]
tion for balanced locomotion.
BALAFOUTIS C., PATEL R.:
Elementary Differential
Hy
In 11th Pa
VAN DE PANNE M., KIM R., FIUME E.: Virtual wind
VAN DE PANNE M., LAMOURET A.: Guided optimiza
In Eurographics Workshop on
Computer Animation and Simulation ’95 (1995), Terzopoulos D.,
Thalmann D., (Eds.), SpringerVerlag, pp. 165–177.
[WC00] WINTERS J., CRAGO P.: BiomechanicsandNeuralCon
trol of Posture and Movement. Springer New York, 2000.
[WGF06]WEINSTEIN R., GUENDELMAN E., FEDKIW R.:
Impulsebased pd control for joints and muscles. In Sketches,
Proceedings of ACM SIGGRAPH (2006).
[WJM06]WROTEK P., JENKINS O. C., MCGUIRE M.: Dynamo:
Dynamic datadriven character control with adjustable balance.
In Sandbox 06: Proceedings of the 2006 ACM SIGGRAPH Video
Games Symposium (2006).
[WO82]WALKER M. W., ORIN D. E.: Efficient dynamic com
puter simulation of robotic mechanisms. Journal of Dynamic
Systems, Measurement, and Control 104 (1982), 205–211.
[Woo98]WOOTEN W.: Simulation of Leaping, Tumbling, Land
ing and Balancing Humans. PhD thesis, Georgia Institute of
Technology, 1998.
[YCP03]YIN K., CLINE M. B., PAI D. K.: Motion perturbation
based on simple neuromotor control models. In PG ’03: Pro
ceedings of the 11th Pacific Conference on Computer Graphics
and Applications (2003), IEEE Computer Society, p. 445.
[YLv07]YIN K., LOKEN K., VAN DE PANNE M.: SIMBICON:
Simple biped locomotion control. ACM Trans. Graph. (2007).
[ZH99]ZORDAN V. B., HODGINS J. K.: Tracking and modi
fying upperbody human motion data with dynamic simulation.
In In Proceedings of Computer Animation and Simulation ’99
(September 1999).
[ZH02]ZORDAN V. B., HODGINS J. K.: Motion capturedriven
simulations that hit and react. In In Proceedings of the 2002
ACM SIGGRAPH/Eurographics symposium on Computer ani
mation (2002), ACM Press, pp. 89 – 96.
[ZMCF05]ZORDAN V. B., MAJKOWSKA A., CHIU B., FAST
M.: Dynamic response for motion capture animation. ACM
Trans. Graph. 24, 3 (2005), 697–701.
[ZW90]ZAJAC F., WINTERS J.:
movement systems: Joint and body segmental dynamics, muscu
loskeletal actuation, and neuromuscular control. Multiple Muscle
systems, JM Winters and SLY Woo editors. Springer Verlag, New
York (1990), 121–148.
Modeling musculoskeletal
c ? Association for Computing Machinery, Inc. 2007.
Page 9
B. Allen, D. Chu, A. Shapiro & P. Faloutsos / On the Beat! Timing and Tension for Dynamic Characters
Figure 6: A character catches a red ball at the specified time both undisturbed (top) and when disturbed by a dynamic object
(bottom).
Figure 7: Snapshots from characters performing the YMCA “dance.” Our method (top) vs. PD controllers using constant,
manually tuned parameters (bottom).
Figure 8: Snapshots from characters conducting Beethoven’s 5th. Our method (top) vs. critically damped PD controllers cal
culated using only singlelink inertia (bottom).
c ? Association for Computing Machinery, Inc. 2007.
View other sources
Hide other sources
 Available from Ari Shapiro · May 21, 2014
 Available from psu.edu