0% found this document useful (0 votes)
29 views9 pages

Automatic Rigging and Animation

Uploaded by

pccfreespace
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views9 pages

Automatic Rigging and Animation

Uploaded by

pccfreespace
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

MIT Open Access Articles

Automatic rigging and animation of 3D characters

The MIT Faculty has made this article openly available. Please share
how this access benefits you. Your story matters.

Citation: Ilya Baran and Jovan Popovic. 2007. Automatic rigging and animation of 3D characters.
ACM Trans. Graph. 26, 3, Article 72 (July 2007).

As Published: http://dx.doi.org/10.1145/1276377.1276467

Publisher: Association for Computing Machinery (ACM)

Persistent URL: http://hdl.handle.net/1721.1/100396

Version: Author's final manuscript: final author's manuscript post peer review, without
publisher's formatting or copy editing

Terms of Use: Article is made available in accordance with the publisher's policy and may be
subject to US copyright law. Please refer to the publisher's site for terms of use.
To appear in the ACM SIGGRAPH conference proceedings

Automatic Rigging and Animation of 3D Characters


Ilya Baran∗ Jovan Popović†
Computer Science and Artificial Intelligence Laboratory
Massachusetts Institute of Technology

Abstract
Animating an articulated 3D character currently requires manual
rigging to specify its internal skeletal structure and to define how
the input motion deforms its surface. We present a method for ani-
mating characters automatically. Given a static character mesh and
a generic skeleton, our method adapts the skeleton to the character
and attaches it to the surface, allowing skeletal motion data to an-
imate the character. Because a single skeleton can be used with a
wide range of characters, our method, in conjunction with a library
of motions for a few skeletons, enables a user-friendly animation
system for novices and children. Our prototype implementation,
called Pinocchio, typically takes under a minute to rig a character
on a modern midrange PC.
CR Categories: I.3.7 [Computer Graphics]: Three-Dimensional
Graphics and Realism—Animation
Keywords: Animation, Deformations, Geometric Modeling

1 Introduction Figure 1: The automatic rigging method presented in this paper


allowed us to implement an easy-to-use animation system, which
Modeling in 3D is becoming much easier than before. User-friendly we called Pinocchio. In this example, the triangle mesh of a jolly
systems such as Teddy [Igarashi et al. 1999] and Cosmic Blobs cartoon character is brought to life by embedding a skeleton inside
(http://www.cosmicblobs.com/) have made the creation it and applying a walking motion to the initially static shape.
of 3D characters accessible to novices and children. Bringing these
static shapes to life, however, is still not easy. In a conventional
skeletal animation package, the user must rig the character man- function. To make the optimization problem computationally feasi-
ually. This requires placing the skeleton joints inside the charac- ble, we first embed the skeleton into a discretization of the charac-
ter and specifying which parts of the surface are attached to which ter’s interior and then refine this embedding using continuous op-
bone. The tedium of this process makes simple character animation timization. The skin attachment is computed by assigning bone
more difficult than it could be. weights based on the proximity of the embedded bones smoothed
We envision a system that eliminates this tedium to make an- by a diffusion equilibrium equation over the character’s surface.
imation more accessible for children, educators, researchers, and Our design decisions relied on three criteria, which we also used
other non-expert animators. For example, a child should be able to to evaluate our system:
model a unicorn, click the “Quadruped Gallop” button, and watch
the unicorn start galloping. To support this functionality, we need • Generality: A single skeleton is applicable to a wide vari-
a method (as shown in Figure 1) that takes a character, a skeleton, ety of characters: for example, our method can use a generic
and a motion of that skeleton as input, and outputs the moving char- biped skeleton to rig an anatomically correct human model,
acter. The missing portion is the rigging: motion transfer has been an anthropomorphic robot, and even something that has very
addressed in prior work [Gleicher 2001]. little resemblance to a human.
Our algorithm consists of two main steps: skeleton embedding
and skin attachment. Skeleton embedding computes the joint posi- • Quality: The resulting animation quality is comparable to
tions of the skeleton inside the character by minimizing a penalty that of modern video games.

∗ e-mail:
• Performance: The automatic rigging usually takes under one
[email protected] minute on an everyday PC.
† e-mail: [email protected]
A key design challenge is constructing a penalty function that pe-
nalizes undesirable embeddings and generalizes well to new char-
acters. For this, we designed a maximum-margin supervised learn-
ing method to combine a set of hand-constructed penalty functions.
To ensure an honest evaluation and avoid overfitting, we tested our
algorithm on 16 characters that we did not see or use during devel-
opment. Our algorithm computed a good rig for all but 3 of these
characters. For each of the remaining cases, one joint placement
hint corrected the problem.
We simplify the problem by making the following assumptions.
The character mesh must be the boundary of a connected volume.

1
To appear in the ACM SIGGRAPH conference proceedings

The character must be given in approximately the same orientation the legs of the character in Figure 1 would be too short if a skeleton
and pose as the skeleton. Lastly, the character must be proportioned extraction algorithm were used.
roughly like the given skeleton.
We introduce several new techniques to solve the automatic rig- Template Fitting Animating user-provided data by fitting a tem-
ging problem: plate has been successful in cases when the model is fairly similar
to the template. Most of the work has been focused on human mod-
• A maximum-margin method for learning the weights of a lin- els, making use of human anatomy specifics, e.g. [Moccozet et al.
ear combination of penalty functions based on examples, as 2004]. For segmenting and animating simple 3D models of charac-
an alternative to hand-tuning (Section 3.3). ters and inanimate objects, Anderson et al. [2000] fit voxel-based
volumetric templates to the data.
• An A∗ -like heuristic to accelerate the search for an optimal
skeleton embedding over an exponential search space (Sec-
Skinning Almost any system for mesh deformation (whether sur-
tion 3.4).
face based [Lipman et al. 2005; Yu et al. 2004] or volume based
• Use of Laplace’s diffusion equation to generate weights for at- [Zhou et al. 2005]) can be adapted for skeleton-based deformation.
taching mesh vertices to the skeleton using linear blend skin- Teichmann and Teller [1998] propose a spring-based method. Un-
ning (Section 4). This method could also be useful in existing fortunately, at present, these methods are unsuitable for real-time
3D packages. animation of even moderate size meshes. Because of its simplicity
and efficiency (and simple GPU implementation), and despite its
Our prototype system, called Pinocchio, rigs the given charac- quality shortcomings, linear blend skinning (LBS), also known as
ter using our algorithm. It then transfers a motion to the character skeleton subspace deformation, remains the most popular method
using online motion retargetting [Choi and Ko 2000] to eliminate used in practice.
footskate by constraining the feet trajectories of the character to the Most real-time skinning work, e.g. [Kry et al. 2002; Wang et al.
feet trajectories of the given motion. 2007], has focused on improving on LBS by inferring the char-
acter articulation from multiple example meshes. However, such
2 Related Work techniques are unsuitable for our problem because we only have a
Character Animation Most prior research in character anima- single mesh. Instead, we must infer articulation by using the given
tion, especially in 3D, has focused on professional animators; very skeleton as an encoding of the likely modes of deformation, not just
little work is targeted at novice users. Recent exceptions include as an animation control structure.
Motion Doodles [Thorne et al. 2004] as well as the work of Igarashi To our knowledge, the problem of finding bone weights for LBS
et al. on spatial keyframing [2005b] and as-rigid-as-possible shape from a single mesh and a skeleton has not been sufficiently ad-
manipulation [2005a]. These approaches focus on simplifying an- dressed in the literature. Previous methods are either mesh reso-
imation control, rather than simplifying the definition of the artic- lution dependent [Katz and Tal 2003] or the weights do not vary
ulation of the character. In particular, a spatial keyframing system smoothly along the surface [Wade 2000], causing artifacts on high-
expects an articulated character as input, and as-rigid-as-possible resolution meshes. Some commercial packages use proprietary
shape manipulation, besides being 2D, relies on the constraints to methods to assign default weights. For example, Autodesk Maya 7
provide articulation information. The Motion Doodles system has assigns weights based solely on the vertex proximity to the bone,
the ability to infer the articulation of a 2D character, but their ap- ignoring the mesh structure, which results in serious artifacts when
proach relies on very strong assumptions about how the character the mesh intersects the Voronoi diagram faces between logically
is presented. distant bones.
Skeleton Extraction Although most skeleton-based prior work 3 Skeleton Embedding
on automatic rigging focused on skeleton extraction, for our prob-
lem, we advocate skeleton embedding. A few approaches to the Skeleton embedding resizes and positions the given skeleton to fit
skeleton extraction problem are representative. Teichmann and inside the character. This can be formulated as an optimization
Teller [1998] extract a skeleton by simplifying the Voronoi skele- problem: “compute the joint positions such that the resulting skele-
ton with a small amount of user assistance. Liu et al. [2003] use ton fits inside the character as nicely as possible and looks like the
repulsive force fields to find a skeleton. In their paper, Katz and Tal given skeleton as much as possible.” For a skeleton with s joints (by
[2003] describe a surface partitioning algorithm and suggest skele- “joints,” we mean vertices of the skeleton tree, including leaves),
ton extraction as an application. The technique in Wade [2000] is this is a 3s-dimensional problem with a complicated objective func-
most similar to our own: like us, they approximate the medial sur- tion. Solving such a problem directly using continuous optimiza-
face by finding discontinuities in the distance field, but they use it tion is infeasible.
to construct a skeleton tree. Pinocchio therefore discretizes the problem by constructing a
For the purpose of automatically animating a character, however, graph whose vertices represent potential joint positions and whose
skeleton embedding is much more suitable than extraction. For ex- edges are potential bone segments. This is challenging because the
ample, the user may have motion data for a quadruped skeleton, graph must have few vertices and edges, and yet capture all poten-
but for a complicated quadruped character, the extracted skeleton tial bone paths within the character. The graph is constructed by
is likely to have a different topology. The anatomically appropriate packing spheres centered on the approximate medial surface into
skeleton generation by Wade [2000] ameliorates this problem by the character and by connecting sphere centers with graph edges.
techniques such as identifying appendages and fitting appendage Pinocchio then finds the optimal embedding of the skeleton into
templates, but the overall topology of the resulting skeleton may this graph with respect to a discrete penalty function. It uses the
still vary. For example, for the character in Figure 1, ears may discrete solution as a starting point for continuous optimization.
be mistaken for arms. Another advantage of embedding over ex- To help with optimization, the given skeleton can have a lit-
traction is that the given skeleton provides information about the tle extra information in the form of joint attributes: for example,
expected structure of the character, which may be difficult to ob- joints that should be approximately symmetric should be marked as
tain from just the geometry. So although we could use an existing such; also some joints can be marked as “feet,” indicating that they
skeleton extraction algorithm and embed our skeleton into the ex- should be placed near the bottom of the character. We describe the
tracted one, the results would likely be undesirable. For example, attributes Pinocchio uses in a supplemental document[Baran and

2
To appear in the ACM SIGGRAPH conference proceedings

Figure 2: Approximate Medial Sur- Figure 3: Packed Spheres Figure 4: Constructed Graph Figure 5: The original and
face reduced quadruped skeleton

Popović 2007a]. These attributes are specific to the skeleton but are spheres. In fact, this step typically takes less than 1% of the time of
independent of the character shape and do not reduce the generality the entire algorithm.
of the skeletons.
Graph Construction The final discretization step constructs the
3.1 Discretization edges of the graph by connecting some pairs of sphere centers (Fig-
Before any other computation, Pinocchio rescales the character to ure 4). Pinocchio adds an edge between two sphere centers if the
fit inside an axis-aligned unit cube. As a result, all of the tolerances spheres intersect. We would also like to add edges between spheres
are relative to the size of the character. that do not intersect if that edge is well inside the surface and if
that edge is “essential.” For example, the neck and left shoulder
Distance Field To approximate the medial surface and to facili- spheres of the character in Figure 3 are disjoint, but there should
tate other computations, Pinocchio computes a trilinearly interpo- still be an edge between them. The precise condition Pinocchio
lated adaptively sampled signed distance field on an octree [Frisken uses is that the distance from any point of the edge to the surface
et al. 2000]. It constructs a kd-tree to evaluate the exact signed dis- must be at least half of the radius of the smaller sphere, and the
tance to the surface from an arbitrary point. It then constructs the closest sphere centers to the midpoint of the edge must be the edge
distance field from the top down, starting with a single octree cell endpoints. The latter condition is equivalent to the requirement that
and splitting a cell until the exact distance is within a tolerance τ of additional edges must be in the Gabriel graph of the sphere centers
the interpolated distance. We found that τ = 0.003 provides a good (see e.g. [Jaromczyk and Toussaint 1992]). While other conditions
compromise between accuracy and efficiency for our purposes. Be- can be formulated, we found that the Gabriel graph provides a good
cause only negative distances (i.e. from points inside the character) balance between sparsity and connectedness.
are important, Pinocchio does not split cells that are guaranteed not Pinocchio precomputes the shortest paths between all pairs of
to intersect the character’s interior. vertices in this graph to speed up penalty function evaluation.
3.2 Reduced Skeleton
Approximate Medial Surface Pinocchio uses the adaptive dis-
tance field to compute a sample of points approximately on the The discretization stage constructs a geometric graph G = (V, E)
medial surface (Figure 2). The medial surface is the set of C 1 - into which Pinocchio needs to embed the given skeleton in an op-
discontinuities of the distance field. Within a single cell of our oc- timal way. The skeleton is given as a rooted tree on s joints. To
tree, the interpolated distance field is guaranteed to be C 1 , so it is reduce the degrees of freedom, for the discrete embedding, Pinoc-
necessary to look at only the cell boundaries. Pinocchio therefore chio works with a reduced skeleton, in which all bone chains have
traverses the octree and for each cell, looks at a grid (of spacing been merged (all degree two joints, such as knees, eliminated), as
τ ) of points on each face of the cell. It then computes the gradient shown in Figure 5. The reduced skeleton thus has only r joints.
vectors for the cells adjacent to each grid point—if the angle be- This works because once Pinocchio knows where the endpoints of
tween two of them is 120◦ or greater, it adds the point to the medial a bone chain are in V , it can compute the intermediate joints by
surface sample. We impose the 120◦ condition because we do not taking the shortest path between the endpoints and splitting it in ac-
want the “noisy” parts of the medial surface—we want the points cordance with the proportions of the unreduced skeleton. For the
where skeleton joints are likely to lie. For the same reason, Pinoc- humanoid skeleton we use, for example, s = 18, but r = 7; with-
chio filters out the sampled points that are too close to the character out a reduced skeleton, the optimization problem would typically
surface (within 2τ ). Wade discusses a similar condition in Chap- be intractable.
ter 4 of his thesis [2000]. Therefore, the discrete skeleton embedding problem is to find
the embedding of the reduced skeleton into G, represented by an r-
Sphere Packing To pick out the graph vertices from the medial tuple v = (v1 , . . . , vr ) of vertices in V , which minimizes a penalty
surface, Pinocchio packs spheres into the character as follows: it function f (v) that is designed to penalize differences in the embed-
sorts the medial surface points by their distance to the surface (those ded skeleton from the given skeleton.
that are farthest from the surface are first). Then it processes these
points in order and if a point is outside all previously added spheres, 3.3 Discrete Penalty Function
adds the sphere centered at that point whose radius is the distance The discrete penalty function has great impact on the generality and
to the surface. In other words, the largest spheres are added first, quality of the results. A good embedding should have the propor-
and no sphere contains the center of another sphere (Figure 3). tions, bone orientations, and size similar to the given skeleton. The
Although the procedure described above takes O(nb) time in the paths representing the bone chains should be disjoint, if possible.
worst case (where n is the number of points, and b is the final num- Joints of the skeleton may be marked as “feet,” in which case they
ber of spheres inserted), worst case behavior is rarely seen because should be close to the bottom of the character. Designing a penalty
most points are processed while there is a small number of large function that satisfies all of these requirements simultaneously is

3
To appear in the ACM SIGGRAPH conference proceedings

difficult. Instead we found it easier to design penalties indepen- Good embeddings (pi ’s):
dently and then rely on learning a proper weighting for a global Bad embeddings (qi ’s):
penalty that combines each term. b2

The Setup We represent the penalty function f as a linear com-


Pk
bination of k “basis” penalty functions: f (v) = i=1 γi bi (v).
Pinocchio uses k = 9 basis penalty functions constructed by hand. Best Γ
They penalize short bones, improper orientation between joints,
length differences in bones marked symmetric, bone chains shar-
ing vertices, feet away from the bottom, zero-length bone chains, Margin
improper orientation of bones, degree-one joints not embedded
at extreme vertices, and joints far along bone-chains but close in
the graph [Baran and Popović 2007a]. We determine the weights 0 b1
Γ = (γ1 , . . . , γk ) semi-automatically via a new maximum margin
approach inspired by support vector machines.
Figure 6: Illustration of optimization margin: marked skeleton em-
Suppose that for a single character, we have several example em-
beddings in the space of their penalties (bi ’s)
beddings, each marked “good” or “bad”. The basis penalty func-
tions assign a feature vector b(v) = (b1 (v), . . . , bk (v)) to each
example embedding v. Let p1 , . . . , pm be the k-dimensional fea-
ture vectors of the good embeddings and let q1 , . . . , qn be the fea- Learning Procedure The problem of finding the optimal Γ does
ture vectors of the bad embeddings. not appear to be convex. However, an approximately optimal Γ
is acceptable, and the search space dimension is sufficiently low
Maximum Margin To provide context for our approach, we re- (9 in our case) that it is feasible to use a continuous optimization
view the relevant ideas from the theory of support vector ma- method. We use the Nelder-Mead method [Nelder and Mead 1965]
chines. See Burges [1998] for a much more complete tuto- starting from random Γ’s. We start with a cube [0, 1]k , pick random
rial. If our goal were to automatically classify new embeddings normalized Γ’s, and run Nelder-Mead from each of them. We then
into “good” and “bad” ones, we could use a support vector ma- take the best Γ, use a slightly smaller cube around it, and repeat.
chine to learn a maximum margin linear classifier. In its sim- To create our training set of embeddings, we pick a training set
plest form, a support vector machine finds the hyperplane that of characters, manually choose Γ, and use it to construct skeleton
separates the pi ’s from the qi ’s and is as far away from them embeddings of the characters. For every character with a bad em-
as possible. More precisely, if Γ is a k-dimensional vector with bedding, we manually tweak Γ until a good embedding is produced.
kΓk = `1, the classification margin of the´best hyperplane normal to We then find the maximum margin Γ as described above and use
Γ is 12 minn T m T
i=1 Γ qi − maxi=1 Γ pi . Recalling that the total this new Γ to construct new skeleton embeddings. We manually
T
penalty of an embedding v is Γ b(v), we can think of the maxi- classify the embeddings that we have not previously seen, augment
mum margin Γ as the one that best distinguishes between the best our training set with them, and repeat the process. If Γ eventually
“bad” embedding and the worst “good” embedding in the training stops changing, as happened on our training set, we use the found
set. Γ. It is also possible that a positive margin Γ cannot be found, in-
In our case, however, we do not need to classify embeddings, dicating that the chosen basis functions are probably inadequate for
but rather find a Γ such that the embedding with the lowest penalty finding good embeddings for all characters in the training set.
f (v) = ΓT b(v) is likely to be good. To this end, we want Γ to For training, we used 62 different characters (Cosmic Blobs
distinguish between the best “bad” embedding and the best “good” models, free models from the web, scanned models, and Teddy
embedding, as illustrated in Figure 6. We therefore wish to max- models), and Γ was stable with about 400 embeddings. The weights
imize the optimization margin (subject to kΓk = 1), which we we learned resulted in good embeddings for all of the characters in
define as: our training set; we could not accomplish this by manually tuning
n m the weights. Examining the optimization results and the extremal
min ΓT qi − min ΓT pi . embeddings also helped us design better basis penalty functions.
i=1 i=1
Although this process of finding the weights is labor-intensive,
Because we have different characters in our training set, and be- it only needs to be done once. According to our tests, if the basis
cause the embedding quality is not necessarily comparable between functions are carefully chosen, the overall penalty function gener-
different characters, we find the Γ that maximizes the minimum alizes well to both new characters and new skeletons. Therefore,
margin over all of the characters. a novice user will be able to use the system, and more advanced
Our approach is similar to margin-based linear structured classi- users will be able to design new skeletons without having to learn
fication [Taskar et al. 2003], the problem of learning a classifier that new weights.
to each problem instance (cf. character) assigns the discrete label
3.4 Discrete Embedding
(cf. embedding) that minimizes the dot product of a weights vec-
tor with basis functions of the problem instance and label. The key Computing a discrete embedding that minimizes a general penalty
difference is that structured classification requires an explicit loss function is intractable because there are exponentially many em-
function (in our case, the knowledge of the quality of all possible beddings. However, if it is easy to estimate a good lower bound on
skeleton embeddings for each character in the training set), whereas f from a partial embedding (of the first few joints), it is possible to
our approach only makes use of the loss function on the training la- use a branch-and-bound method. Pinocchio uses this idea: it main-
bels and allows for the possibility of multiple correct labels. This tains a priority queue of partial embeddings ordered by their lower
possibility of multiple correct skeleton embeddings prevented us bound estimates. At every step, it takes the best partial embedding
from formulating our margin maximization problem as a convex from the queue, extends it in all possible ways with the next joint,
optimization problem. However, multiple correct skeleton embed- and pushes the results back on the queue. The first full embedding
dings are necessary for our problem in cases such as the hand joint extracted is guaranteed to be the optimal one. This is essentially
being embedded into different fingers. the A* algorithm on the tree of possible embeddings. To speed up

4
To appear in the ACM SIGGRAPH conference proceedings

the process and conserve memory, if a partial embedding has a very


high lower bound, it is rejected immediately and not inserted into
the queue.
Although this algorithm is still worst-case exponential, it is fast
on most real problems with the skeletons we tested. We considered
adapting an approximate graph matching algorithm, like [Gold and
Rangarajan 1996], which would work much faster and enable more
complicated reduced skeletons. However, computing the exact op-
timum simplified penalty function design and debugging.
The joints of the skeleton are given in order, which induces an
order on the joints of the reduced skeleton. Referring to the joints
by their indices (starting with the root at index 1), we define the
parent function pR on the reduced skeleton, such that pR (i) (for
1 < i ≤ r) is the index of the parent of joint i. We require that the Figure 7: The embedded skeleton after discrete embedding (blue)
order in which the joints are given respects the parent relationship, and the results of embedding refinement (dark red)
i.e. pR (i) < i.
Our penalty function (f ) can be expressed as the sum of inde-
pendent functions of bone chain endpoints (fi ’s) and a term (fD )
function can be much simpler than the discrete penalty function.
that incorporates the dependence between different joint positions.
The continuous penalty function g that Pinocchio tries to minimize
The dependence between joints that have not been embedded can
is the sum of penalty functions over the bones plus an asymmetry
be ignored to obtain a lower bound on f . More precisely, f can be
penalty:
written as:
r r s
X
g(q1 , . . . , qs ) = αA g A (q1 , . . . , qs ) +
X X
f (v1 , . . . , vr ) = fi (vi , vpR (i) ) + fD (v1 , . . . , vi ). gi (qi , qpS (i) )
i=2 i=2 i=2

A lower bound when the first k joints are embedded is then: where pS is the parent function for the unreduced skeleton (anal-
k k
ogous to pR ). Each gi penalizes bones that do not fit inside the
X X surface nicely, bones that are too short, and bones that are oriented
fi (vi , vpR (i) ) + fD (v1 , . . . , vi ) +
differently from the given skeleton: gi = αS giS + αL giL + αO giO .
i=2 i=2
X Unlike the discrete case, we choose the α’s by hand because there
+ min fi (vi , vpR (i) ) are only four of them [Baran and Popović 2007a].
vi ∈V
{i>k|pR (i)≤k} Any continuous optimization technique [Gill et al. 1989] should
produce good results. Pinocchio uses a gradient descent method
If fD is small compared to the fi ’s, as is often the case for us, the that takes advantage of the fact that there are relatively few inter-
lower bound is close to the true value of f . actions. As a subroutine, it uses a step-doubling line search: start-
Because of this lower bound estimate, the order in which joints ing from a given point (in R3s ), it takes steps in the given opti-
are embedded is very important to the performance of the optimiza- mization direction, doubling step length until the penalty function
tion algorithm. High degree joints should be embedded first be- increases. Pinocchio intersperses a line search in the gradient di-
cause they result in more terms in the rightmost sum of the lower rection with line searches in the gradient direction projected onto
bound, leading to a more accurate lower bound. For example, our individual bones. Repeating the process 10 times is usually suffi-
biped skeleton has only two joints of degree greater than two, so cient for convergence.
after Pinocchio has embedded them, the lower bound estimate in-
cludes fi terms for all of the bone chains. 4 Skin Attachment
Because there is no perfect penalty function, discrete embedding
The character and the embedded skeleton are disconnected until
will occasionally produce undesirable results (see Model 13 in Fig-
skin attachment specifies how to apply deformations of the skeleton
ure 9). In such cases it is possible for the user to provide manual
to the character mesh. Although we could make use of one of the
hints in the form of constraints for reduced skeleton joints. For ex-
various mesh editing techniques for the actual mesh deformation,
ample, such a hint might be that the left hand of the skeleton should
we choose to focus on the standard linear blend skinning (LBS)
be embedded at a particular vertex in G (or at one of several ver-
method because of its widespread use. If vj is the position of vertex
tices). Embeddings that do not satisfy the constraints are simply not
considered by the algorithm. j, Ti is the transformation of the ith bone, and wji is the weight of
the ith boneP for vertex j, LBS gives the position of the transformed
3.5 Embedding Refinement vertex j as i wji Ti (vj ). The attachment problem is finding bone
Pinocchio takes the optimal embedding of the reduced skeleton weights wi for the vertices—how much each bone transform affects
found by discrete optimization and reinserts the degree-two joints each vertex.
by splitting the shortest paths in G in proportion to the given skele- There are several properties we desire of the weights. First of
ton. The resulting skeleton embedding should have the general all, they should not depend on the mesh resolution. Second, for the
shape we are looking for, but typically, it will not fit nicely inside results to look good, the weights need to vary smoothly along the
the character. Also, smaller bones are likely to be incorrectly ori- surface. Finally, to avoid folding artifacts, the width of a transi-
ented because they were not important enough to influence the dis- tion between two bones meeting at a joint should be roughly pro-
crete optimization. Embedding refinement corrects these problems portional to the distance from the joint to the surface. Although
by minimizing a new continuous penalty function (Figure 7). a scheme that assigns bone weights purely based on proximity to
For the continuous optimization, we represent the embedding of bones can be made to satisfy these properties, such schemes will
the skeleton as an s-tuple of joint positions (q1 , . . . , qs ) in R3 . Be- often fail because they ignore the character’s geometry: for exam-
cause we are dealing with an unreduced skeleton, and discrete op- ple, part of the torso may become attached to an arm. Instead, we
timization has already found the correct general shape, the penalty use the analogy to heat equilibrium to find the weights. Suppose we

5
To appear in the ACM SIGGRAPH conference proceedings

Figure 8: Top: heat equilibrium for two bones. Bottom: the result
of rotating the right bone with the heat-based attachment
Figure 10: A centaur pirate with a centaur skeleton embedded looks
at a cat with a quadruped skeleton embedded
treat the character volume as an insulated heat-conducting body and
force the temperature of bone i to be 1 while keeping the tempera-
ture of all of the other bones at 0. Then we can take the equilibrium
temperature at each vertex on the surface as the weight of bone i at
that vertex. Figure 8 illustrates this in two dimensions.
Solving for heat equilibrium over a volume would require tes-
sellating the volume and would be slow. Therefore, for simplic-
ity, Pinocchio solves for equilibrium over the surface only, but at
some vertices, it adds the heat transferred from the nearest bone.
i
The equilibrium over the surface for bone i is given by ∂w ∂t
=
i i i
∆w + H(p − w ) = 0, which can be written as

−∆wi + Hwi = Hpi , (1)

where ∆ is the discrete surface Laplacian, calculated with the Figure 11: The human scan on the left is rigged by Pinocchio and is
cotangent formula [Meyer et al. 2003], pi is a vector with pij = 1 posed on the right by changing joint angles in the embedded skele-
if the nearest bone to vertex j is i and pij = 0 otherwise, and H is ton. The well-known deficiencies of LBS can be seen in the right
the diagonal matrix with Hjj being the heat contribution weight of knee and hip areas.
the nearest bone to vertex j. Because ∆ has units of length−2 , so
must H. Letting d(j) be the distance from vertex j to the nearest
bone, Pinocchio uses Hjj = c/d(j)2 if the shortest line segment 5.1 Generality
from the vertex to the bone is contained in the character volume Figure 9 shows our 16 test characters and the skeletons Pinocchio
and Hjj = 0 if it is not. It uses the precomputed distance field to embedded. The skeleton was correctly embedded into 13 of these
determine whether a line segment is entirely contained in the char- models (81% success). For Models 7, 10 and 13, a hint for a single
acter volume. For c ≈ 0.22, this method gives weights with similar joint was sufficient to produce a good embedding.
transitions to those computed by finding the equilibrium over the These tests demonstrate the range of proportions that our method
volume. Pinocchio uses c = 1 (corresponding to anisotropic heat can tolerate: we have a well-proportioned human (Models 1–4, 8),
diffusion) because the results look more natural. When k bones are large arms and tiny legs (6; in 10, this causes problems), and large
equidistant from vertex j, heat contributions from all of them are legs and small arms (15; in 13, the small arms cause problems). For
used: pj is 1/k for all of them, and Hjj = kc/d(j)2 . other characters we tested, skeletons were almost always correctly
Equation (1) is a sparse linear system, and the left hand side embedded into well-proportioned characters whose pose matched
matrix −∆ + H does not depend on i, the bone we are interested the given skeleton. Pinocchio was even able to transfer a biped
in. Thus we can factor the system once and back-substitute to find walk onto a human hand, a cat on its hind legs, and a donut.
the weights for each bone. Botsch et al. [2005] show how to use The most common issues we ran into on other characters were:
a sparse Cholesky solver to compute the factorization for this kind • The thinnest limb into which we may hope to embed a bone
of system. Pinocchio uses the TAUCS [Toledo 2003] library for has a radius of 2τ . Characters with extremely thin limbs often
this computation. Note also that the weights wi sum P to 1 for each fail because the the graph we extract is disconnected. Reduc-
vertex: if we sum (1) over i, we get (−∆ + H) i wi = H · 1, ing τ , however, hurts performance.
which yields i wi = 1.
P
It is possible to speed up this method slightly by finding vertices • Degree 2 joints such as knees and elbows are often positioned
that are unambiguously attached to a single bone and forcing their incorrectly within a limb. We do not know of a reliable way
weight to 1. An earlier variant of our algorithm did this, but the im- to identify the right locations for them: on some characters
provement was negligible, and this introduced occasional artifacts. they are thicker than the rest of the limb, and on others they
are thinner.
5 Results Although most of our tests were done with the biped skeleton,
We evaluate Pinocchio with respect to the three criteria stated in we have also used other skeletons for other characters (Figure 10).
the introduction: generality, quality, and performance. To ensure
an objective evaluation, we use inputs that were not used during 5.2 Quality
development. To this end, once the development was complete, we Figure 11 shows the results of manually posing a human scan us-
tested Pinocchio on 16 biped Cosmic Blobs models that we had not ing our attachment. Our video [Baran and Popović 2007b] demon-
previously tried. strates the quality of the animation produced by Pinocchio.

6
To appear in the ACM SIGGRAPH conference proceedings

1. 2. 3. 4. 5. 6.

7. 8. 9. 10. 11. 12.

13. 14. 15. 16.

Figure 9: Test Results for Skeleton Embedding

Model 3 10 11 Mean isting techniques, it allows a user to go from a static mesh to an


Number of Vertices 19,001 34,339 56,856 33,224 animated character quickly and effortlessly. We have shown that
Discretization Time 10.3s 25.8s 68.2s 24.3s using this method, Pinocchio can animate a wide range of charac-
Embedding Time 1.4s 29.1s 5.7s 5.2s ters. We also believe that some of our techniques, such as finding
Attachment Time 0.9s 1.9s 3.2s 1.8s LBS weights and using examples to learn the weights of a linear
Total Time 12.6s 56.8s 77.1s 31.3s combination of penalty functions, can be useful in other contexts.
We have several ideas for improving Pinocchio that we have not
Table 1: Timings for three representative models and the mean over yet tried. Discretization could be improved by packing ellipsoids
our 16 character test set instead of spheres. Although this is more difficult, we believe it
would greatly reduce the size of the graph, resulting in faster and
higher quality discrete embeddings. Animation quality can be im-
The quality problems of our attachment are a combination of the proved with a better skinning model [Kavan and Žára 2005] (al-
deficiencies of our automated weights generation as well as those though possibly at the cost of performance). One approach would
inherent in LBS. A common class of problems is caused by Pinoc- be to use a technique [Wang et al. 2007] that corrects LBS errors by
chio being oblivious to the material out of which the character is using example meshes, which we could synthesize using slower, but
made: the animation of both a dress and a knight’s armor has an more accurate deformation techniques. A more involved approach
unrealistic, rubbery quality. Other problems occur at difficult ar- would be automatically building a tetrahedral mesh around the em-
eas, such as hips and the shoulder/neck region, where hand-tuned bedded skeleton and applying the dynamic deformation method of
weights could be made superior to those found by our algorithm. Capell et al. [2002]. Combining retargetting with joint limits should
eliminate some artifacts in the motion. A better retargetting scheme
5.3 Performance could be used to make animations more physically plausible and
Table 1 shows the fastest and slowest timings of Pinocchio rigging prevent global self-intersections. Finally, it would be nice to elim-
the 16 models discussed in Section 5.1 on a 1.73 MHz Intel Core inate the assumption that the character must have a well-defined
Duo with 1GB of RAM. Pinocchio is single-threaded so only one interior.
core was used. We did not run timing tests on denser models be- Beyond Pinocchio’s current capabilities, an interesting problem
cause someone wishing to create real-time animation is likely to is dealing with hand animation to give animated characters the abil-
keep the triangle count low. Also, because of our volume-based ap- ity to grasp objects, type, or speak sign language. The variety of
proach, once the distance field has been computed, subsequent dis- types of hands makes this challenging (see, for example, Models 13,
cretization and embedding steps do not depend on the given mesh 5, 14, and 11 in Figure 9). Automatically rigging characters for fa-
size. cial animation is even more difficult, but a solution requiring a small
For the majority of models, the running time is dominated by amount of user assistance may succeed. Combined with a system
the discretization stage, and that is dominated by computing the for motion synthesis [Arikan et al. 2003], this would allow users to
distance field. Embedding refinement takes about 1.2 seconds for begin interacting with their creations.
all of these models, and the discrete optimization consumes the rest
of the embedding time. 7 Acknowledgments
We thank Yeuhi Abe and Eugene Hsu for help with motion cap-
6 Conclusion and Future Work ture. Thanks to Soonmin Bae, Inna Baran, Frédo Durand, Sylvain
We have presented the first method for automatically rigging an Paris, Ariel Shamir, Daniel Vlasic, and Robert Wang for their help-
unfamiliar character for skeletal animation. In conjunction with ex- ful feedback. Thanks to Emily Whiting for narrating the video. We

7
To appear in the ACM SIGGRAPH conference proceedings

thank Dragomir Anguelov for the human meshes. We would also JAROMCZYK , J. W., AND T OUSSAINT, G. T. 1992. Relative
like to thank Solidworks for the permission to use Cosmic Blobs neighborhood graphs and their relatives. Proceedings of IEEE
models. This work was supported by a grant from Solidworks Cor- 80, 9 (Sept.), 1502–1517.
poration. The first author was also supported by an NSF Graduate
Research Fellowship. K ATZ , S., AND TAL , A. 2003. Hierarchical mesh decomposition
using fuzzy clustering and cuts. ACM Transactions on Graphics
References 22, 3 (Aug.), 954–961.
A NDERSON , D., F RANKEL , J. L., M ARKS , J., AGARWALA , A., K AVAN , L., AND Ž ÁRA , J. 2005. Spherical blend skinning: A real-
B EARDSLEY, P., H ODGINS , J., L EIGH , D., RYALL , K., S UL - time deformation of articulated models. In ACM SIGGRAPH
LIVAN , E., AND Y EDIDIA , J. S. 2000. Tangible interaction + Symposium on Interactive 3D Graphics and Games, 9–16.
graphical interpretation: a new approach to 3d modeling. In Pro-
ceedings of ACM SIGGRAPH 2000, Annual Conference Series, K RY, P. G., JAMES , D. L., AND PAI , D. K. 2002. EigenSkin:
393–402. Real time large deformation character skinning in hardware. In
Symposium on Computer Animation (SCA), 153–160.
A RIKAN , O., F ORSYTH , D. A., AND O’B RIEN , J. F. 2003. Mo-
L IPMAN , Y., S ORKINE , O., L EVIN , D., AND C OHEN -O R , D.
tion synthesis from annotations. ACM Transactions on Graphics
2005. Linear rotation-invariant coordinates for meshes. ACM
22, 3 (July), 402–408.
Transactions on Graphics 24, 3 (Aug.), 479–487.
BARAN , I., AND P OPOVI Ć , J., 2007. Penalty func- L IU , P.-C., W U , F.-C., M A , W.-C., L IANG , R.-H., AND O UHY-
tions for automatic rigging and animation of 3d characters. OUNG , M. 2003. Automatic animation skeleton using repulsive
http://people.csail.mit.edu/ibaran/penalty.pdf. force field. In 11th Pacific Conference on Computer Graphics
and Applications, 409–413.
BARAN , I., AND P OPOVI Ć , J., 2007. Pinocchio results video.
http://people.csail.mit.edu/ibaran/pinocchio.avi. M EYER , M., D ESBRUN , M., S CHR ÖDER , P., AND BARR , A. H.
2003. Discrete differential-geometry operators for triangulated
B OTSCH , M., B OMMES , D., AND KOBBELT, L. 2005. Efficient 2-manifolds. In Visualization and Mathematics III. Springer-
linear system solvers for mesh processing. In IMA Conference Verlag, Heidelberg, 35–57.
on the Mathematics of Surfaces, 62–83.
M OCCOZET, L., D ELLAS , F., M AGNENAT-T HALMANN , N., B I -
B URGES , C. 1998. A Tutorial on Support Vector Machines for ASOTTI , S., M ORTARA , M., FALCIDIENO , B., M IN , P., AND
Pattern Recognition. Data Mining and Knowledge Discovery 2, V ELTKAMP, R. 2004. Animatable human body model recon-
2, 121–167. struction from 3d scan data using templates. In CapTech Work-
shop on Modelling and Motion Capture Techniques for Virtual
C APELL , S., G REEN , S., C URLESS , B., D UCHAMP, T., AND Environments, 73–79.
P OPOVI Ć , Z. 2002. Interactive skeleton-driven dynamic defor- N ELDER , J., AND M EAD , R. 1965. A simplex method for function
mation. ACM Transactions on Graphics 21, 3 (Aug.), 586–593. minimization. Computer Journal 7, 308–313.
C HOI , K.-J., AND KO , H.-S. 2000. Online motion retargetting. TASKAR , B., G UESTRIN , C., AND KOLLER , D. 2003. Max-
Journal of Visualization and Computer Animation 11, 5 (Dec.), margin markov networks. In Advances in Neural Information
223–235. Processing Systems (NIPS 2003).

F RISKEN , S. F., P ERRY, R. N., ROCKWOOD , A. P., AND J ONES , T EICHMANN , M., AND T ELLER , S. 1998. Assisted articulation of
T. R. 2000. Adaptively sampled distance fields: A general rep- closed polygonal models. In Computer Animation and Simula-
resentation of shape for computer graphics. In Proceedings of tion ’98, 87–102.
ACM SIGGRAPH 2000, Annual Conference Series, 249–254.
T HORNE , M., B URKE , D., AND VAN DE PANNE , M. 2004. Mo-
tion doodles: an interface for sketching character motion. ACM
G ILL , P. E., M URRAY, W., AND W RIGHT, M. H. 1989. Practical
Transactions on Graphics 23, 3 (Aug.), 424–431.
Optimization. Academic Press, London.
T OLEDO , S., 2003. TAUCS: A library of sparse linear solvers,
G LEICHER , M. 2001. Comparing contraint-based motion editing version 2.2. http://www.tau.ac.il/∼stoledo/taucs.
methods. Graphical Models 63 (Aug.), 107–134.
WADE , L. 2000. Automated generation of control skeletons for use
G OLD , S., AND R ANGARAJAN , A. 1996. A graduated assignment in animation. PhD thesis, The Ohio State University.
algorithm for graph matching. IEEE Transactions on Pattern
Analysis and Machine Intelligence 18, 4, 377–388. WANG , R., P ULLI , K., AND P OPOVI Ć , J. 2007. Real-time
enveloping with rotational regression. ACM Transactions on
I GARASHI , T., M ATSUOKA , S., AND TANAKA , H. 1999. Teddy: Graphics 26, 3. In press.
A sketching interface for 3d freeform design. In Proceedings of Y U , Y., Z HOU , K., X U , D., S HI , X., BAO , H., G UO , B., AND
ACM SIGGRAPH 1999, Annual Conference Series, 409–416. S HUM , H.-Y. 2004. Mesh editing with poisson-based gradient
field manipulation. ACM Transactions on Graphics 23, 3 (Aug.),
I GARASHI , T., M OSCOVICH , T., AND H UGHES , J. F. 2005. 644–651.
As-rigid-as-possible shape manipulation. ACM Transactions on
Graphics 24, 3 (Aug.), 1134–1141. Z HOU , K., H UANG , J., S NYDER , J., L IU , X., BAO , H., G UO , B.,
AND S HUM , H.-Y. 2005. Large mesh deformation using the
I GARASHI , T., M OSCOVICH , T., AND H UGHES , J. F. 2005. Spa- volumetric graph laplacian. ACM Transactions on Graphics 24,
tial keyframing for performance-driven animation. In Sympo- 3 (Aug.), 496–503.
sium on Computer Animation (SCA), 107–115.

You might also like