Stanford2015 05
Stanford2015 05
Abstract
We propose a novel framework for simulating reduced deformable
bodies that fully accounts for linear and angular momentum conser-
vation even in the presence of collision, contact, articulation, and
other desirable effects. This was motivated by the observation that
the mere excitation of a single mode in a reduced degree of freedom
model can adversely change the linear and angular momentum. Al-
though unexpected changes in linear momentum can be avoided
during basis construction, adverse changes in angular momentum
appear unavoidable, and thus we propose a robust framework that
includes the ability to compensate for them. Enabled by this ability
to fully account for linear and angular momentum, we introduce an
impulse-based formulation that allows us to precisely control the
velocity of any node in spite of the fact that we only have access to
a lower-dimensional set of degrees of freedom. This allows us to
model collision, contact, and articulation in a robust and high visual
fidelity manner, especially when compared to penalty-based forces Figure 1: An articulated reduced deformable body falls down a
that merely aim to coerce local velocities. In addition, we propose a flight of stairs undergoing collision and self-collision. Even with
new “deformable bones” framework wherein we leverage standard simple linear finite elements, the results have high visual fidelity
skinning technology for “bones,” “bone” placement, blending op- due to our new “deformable bones” skinning strategy. We stress
erations, etc. even though each of our “deformable bones” is a fully that this is a pure simulation of a reduced deformable body, and
simulated reduced deformable model. no misleading techniques such as first simulating a rigid body and
then attaching a deformable skin after the fact were employed.
CR Categories: I.3.7 [Computer Graphics]: Three-Dimensional
Graphics and Realism—Animation
ulation dataset [Barbič and James 2005], augmentation of the ba-
Keywords: deformable bodies, elasticity, collisions, skinning, sis with localized displacement vectors [Harmon and Zorin 2013],
model reduction, subspace etc. Regardless of the specific method used, most of the bases con-
structed by these methods are linear and can thus be written in a ma-
1 Introduction trix form. Our method is compatible with all of the aforementioned
approaches yet does not require mass normalization, but does re-
Simulations of deformable objects are known to be both visually quire full column rank. This keeps the framework as general as
interesting and computationally demanding. One way to lessen the possible and enables an example-based reduced-order scheme that
computational expense of these simulations is to use a reduced- we discuss in Section 8.
order (or subspace) model to represent the internal dynamics. The We use a reduced-order approximation of the displacement ~ u =
performance of such a model depends on the size of the subspace r S~q where the columns of S represent particle displacements from
as well as the basis vectors chosen to represent that space. If n is the rest pose ~ x0 . Here ~u and ~x0 have dimensions n by 1, S has
the size of the full-order model, optimal performance benefits are n rows and r columns, and the entries of ~ u, ~
x0 and S are all 3-
achieved when r n and the simulation takes O (rp ) time for vectors. Then, particle positions are given by S~ q+~ x0 , where ~
q is
small values of p. a reduced space vector which when set to a basis vector (i.e. ~ q ∈
Basis construction is a difficult problem and many solutions x0 reconstructing the kth basis
{~e1 , ~e2 , ..., ~er }) results in S~ek + ~
have been proposed, including modal analysis [Pentland and shape. To enable fully unconstrained simulation, we embed this
Williams 1989], a method to include the derivatives of linear system in a rigid frame
modes (i.e. modal derivatives) [Idelsohn and Cardona 1985], mass- ~
weighted principal component analysis (PCA) of an existing sim- ~
x = R(S~
q+~
x0 ) + T (1)
S T MS ~ ~ int + S T R−1 F
q¨ = S T F ~ ext − 2S T MR−1 ω
~R∗
q˙
RS ~
where ~xM is the world space location of the center of mass, ~vi
is the relative velocity of particle i with respect to the center of
−1 ∗ ∗ ∗
T
− S MR ~˙ R + ω
ω ~ Rω~ R R(S~ q+~ xo ) (14)
mass velocity ~v , Ii = mi (~ri∗ )T ~ri∗ is particle i’s contribution to
the inertia tensor, and ω ~ i = ~ri∗~vi /~riT ~ri is the angular velocity of
particle i due to ~vi with respect to the center of mass. The second
equality in Equation 9 is true because ~ri∗~vi = ~ri∗ ω ~ i∗~ri since the
dilational component of ~vi is annihilated by the cross product with
~ri leaving only the rotational component. The summation term in
Equation 9 is the angular momentum of the body with respect to its
center of mass, L ~ body . Thus, one can more rigorously define the
total angular velocity ω~ for the deforming body as
n
def X
~ ≡ I −1
ω ~ i = I −1 L
Ii ω ~ body . (10)
i=1
which can be solved for ~ q¨ because S T MS is symmetric positive Equation 18 minimizes ω ~ 0 since one cannot readily predict the ef-
definite (SPD) as long as our examples are linearly independent. fect of P F~ ext
on the reduced basis (although it is a good start).
Since the mass-weighted column sums of S are ~0, S T projects Combining Equations 17 and 18 into a single projection P converts
MR−1 T ~¨ to zero as long as the row sums of M are equal to the ~ ext into a conservative force with no net translation or rotation.
F
individual masses of the particles. If this is not the case, one could Note that computing S T R−1 P F ~ ext is O (n) since P F~ ext is no
redefine the individual particle masses as the row sums of M in ~ ext
order to satisfy this condition. longer sparse, even if F was. However, we can first rotate the
external forces into object space and then apply the equivalent ap-
Fictitious forces that appear in Equation 14, which we collectively propriate projection along the lines of Equations 17 and 18 in object
call F~rf ict , can be computed efficiently by noting that R−1 ω
~R∗
R space, essentially switching the order of R−1 and P by modifying
P . This allows us to precompute the various O (n) cost terms in
and R −1
~˙ R + ω
ω ∗ ∗
~ Rω ∗
~ R R can be computed by rotating ω ∗
~ R and
S T P so that computing the projected external force in the reduced
~˙ R
ω ∗
into object space. ~ ext , i.e.
space only requires consideration of the sparse entries in F
X h T i −1 ext
4.1 External Forces ~rext =
F S P R f~k (19)
k
k
We sum all the external forces in order to get a net external force,
where S T P k is the kth column of S T P and the summation is
which is used to update the rigid frame as
n only over all non-zero f~kext .
1 X ~ ext
~v˙ = fk (15)
M 4.2 Internal Forces
k=1
n n
~˙ body =
X X
L ~rk∗ f~kext = ~τkext (16) Although one could choose any valid reduced internal force model
k=1 k=1 (such as [Barbič and James 2005; An et al. 2008]), for simplicity
we chose a linearized finite element model
where F~ ext is ideally a sparse vector and thus this summation is not
~ int = −K~
F u˙ = −KS~
u − C~ q˙
q − CS ~ (20)
O (n). When putting the external forces (or impulses) into object
space, one could project away the translational component before- C = αM + βK. (21)
hand
m1 To find the reduced internal force, we project these forces onto the
. basis by pre-multiplying by S T
PF ~ ext = F .. ~v˙
~ ext − (17)
mn ~rint = −S T KS~
F q˙ = −Kr ~
q − S T CS ~ q˙.
q − Cr ~ (22)
where P is a projection matrix that performs this linear operation.
However, this is not necessary since any net translation is already
in the null space of our reduced basis. Similarly, aiming to keep as
5 Collisions and Contact
much of the rotation in R as possible, we could also project away
Starting from the conservation of momentum laws for two bodies,
the rotational component
we can describe the post-collision momenta in terms of the pre-
collision ones
m1 (~r1∗ )T
x˙ k− + (K1 + K2 )~jk = ~
x˙ k+ = ~
~ x˙ k− + K~jk (33a)
K1 = 1/M − ~rk∗ I −1~rk∗ (33b)
n
X
K2 = RSk Ak R−1 + ~rk∗ I −1
mi~ri∗ RSi Ak R−1 (33c)
i=1
that all joint constraints can be satisfied. Similar to [Barbič and Our proposed skinning framework readily mixes reduced de-
Zhao 2011; Kim and James 2011], there may be discontinuities at formable bodies, rigid bodies, and standard kinematic bones.
the boundaries between articulated meshes. Our novel approach This allows an artist, for example, to replace the midsection
of reinterpreting each reduced deformable body as an abstract “de- of a traditionally animated/skinned character with one of our
formable bone” with various dynamically changing shapes allows “deformable bones” and proceed to add elastic and vibrational
us to remedy this with a straightforward skinning-based approach. modes such as “belly jiggle” or even collisions—see Figure 5.
In fact, motivated by the example-based work of [Martin et al.
2011; Schumacher et al. 2012; Coros et al. 2012] as well as
8 Skinning [Koyama et al. 2012; Koyama and Igarashi 2013], one could aug-
ment the basis with example poses sculpted by the artist (such as an
In standard skinning, one has a bone with a shape that may be a indentation caused by being hit in the stomach). Furthermore, this
function of various parameters, and we extend this to the notion of mode could be emphasized by lowering its corresponding eigen-
a “deformable bone” where a traditional kinematic bone is replaced value. Finally, the results are readily blended back in with the
by a reduced deformable model given by Equation 1. Essentially, artist’s performance for the rest of the character. Similar results
our “deformable bone” has a time-dependent shape based on simu- were achieved using a different framework in [Hahn et al. 2012].
lation, yet is similar to existing skinning bones in every other way. Although we have only considered standard linear blend skinning,
Skinning already solves the problem of how to tie multiple parts it would be quite interesting to extend our methodology to a variety
of a character together, so it is very natural to leverage skinning of other skinning models so that a large number of artist tools (and
for reduced deformable models. In addition, work on skinning has thus artists) could be impacted.
already investigated issues such as the number and placement of
bones, blending operations, linear artifacts, etc., and all this be ex- For collisions, the skin particles follow the derivation in [Sifakis
ploited in our “deformable bones” framework. et al. 2007]. For simplicity, consider a skin particle i which de-
pends on two bodies a and b. Then an impulse ~j is conservatively
Using standard rigging software, we assign standard skinning distributed to the bodies using wia~j and wib~j to obtain
weights to a surface mesh based on standard bones. Then, in a
non-standard fashion we propagate these weights into the interior
~ x˙ ia− + wia Ka~j
x˙ ia+ = ~ (43)
elements. Using a threshold, we decompose the mesh into different
subdomains of elements associated with each bone. These thresh- x˙ ib+ = ~
~ x˙ ib− + wib Kb~j. (44)
olds allow for subdomains to overlap, which means that multiple
subdomains can each replicate and incorporate elements from the The skin particle i’s new velocity is then
original simulation mesh (i.e. there is no guarantee of a unique map-
ping from an element on the original mesh to a subdomain). Dur- x˙ is+ = ~
~ x˙ is− + wia wia Ka~j + wib wib Kb~j
ing simulation, each subdomain is simulated independently, with
the addition of about three point constraints inside overlapping re- x˙ is− + Ks~j.
=~ (45)
gions to articulate one subdomain with another. See Figure 6 for an
example decomposition. Using the new skinned particle impulse factor Ks , we can solve
directly for ~j for use in both collisions and self-collisions. See Fig-
For simplicity, we use linear blend skinning, though more complex ure 7.
xis is
methods could be used. The position of particle i on the skin ~
given by
X Using a standard mesh simplification algorithm that can preserve
~xis = wik Rk (Sik ~
qk + ~ k
x0,i ) + ~tk (42) original particle positions (such as [Garland and Heckbert 1997]),
k we build a coarser skin proxy for use in collisions. This new mesh
contains a subset of the original skinned particles with a new topol-
where k iterates through the reduced deformable bodies that con- ogy. In this way, we use geometry to simplify the collision point set
xis , and wik is the skinning weight for
tribute to the skin position of ~ instead of finding points using existing simulation data ([Teng et al.
particle i on body k. The velocity of a skinned particle, ~ x˙ is , can be 2014]). Using a coarser collision proxy is especially useful when
calculated via Equation 3. We assume that the skinning weights for simulating reduced deformable models, where individual particles
particle i sum to one—standard practice for skinning. are not free to move on their own since the degrees of freedom are
Figure 9: Twenty-four reduced deformable fish and twelve rigid seashells are dropped onto a slightly slippery floor. After the pile settles,
a reduced deformable octopus (skinned from 50 “bones”) drops on top of the fish and seashells, eventually settling with its tentacles being
nudged by the flopping fish tails.
basis shapes. In addition to our collision proxies, we build a BD- the skinning weights from the surface onto the tetrahedral volume,
tree (see [James and Pai 2004]) on the skin for further accelerations. thresholding the weights to create a new tetrahedral volume for each
Although skinned bodies have no intrinsic reduced degrees of free- segment, and subsequently re-normalizing the weights over the en-
dom, we would like to express sphere radii in terms of ~ qk for each tire mesh. Rigid joints were created by automatically laying out
“bone” k for efficiency. Thus our radius bound of each skin sphere three point joints in a cross section of the overlapping joint region,
is defined as the maximum of its (maximum contained skinning varying the distance among the three point joints to control rigidity
weight-scaled) “bone” radii over all “bones.” This bound is poten- of the connected “deformable bones.”
tially looser than that in [James and Pai 2004]. The center updates
can be losslessly accelerated by precomputing for each body k a We focused on the algorithmic portions of our implementation and
skinning weight average of rows of Sk , ~x0,k , and ~1k corresponding as such there is much room for optimization to achieve better per-
to each sphere’s contained particles. formance, including parallelization. The timing information in Ta-
ble 2 hints at the main bottleneck in our simulations, which is the re-
9 Results and Discussion duced deformable-reduced deformable collision (and self-collision)
step. This aspect of the system could be optimized by implement-
We provide several examples to illustrate the power of our method, ing or designing alternative acceleration structures for our skinned
noting that each example uses linear finite elements (i.e. linear reduced deformable bodies, perhaps even using a standard kd-tree
elasticity and linear shape functions) with r ≤ 10 unconstrained instead of a BD-tree. The costs of our inertia tensor update and an-
eigenmodes per reduced body unless otherwise specified. Modal gular momentum correction are negligible compared to the cost of
analysis was performed on each reduced body individually; pre- collisions, but they could also be optimized similar to how [An et al.
computation times and other mesh-specific details can be found in 2008] reduced the cost of [Barbič and James 2005]. One could also
Table 1. Skeletons were created by first manually placing standard attempt less frequent updates of the inertia tensor, ignoring ficti-
bones in the rest structures of each mesh and obtaining standard lin- tious forces, and so on to increase speed at the expense of accuracy,
ear skinning weights using Pinocchio ([Baran and Popović 2007]). but doing so may introduce instabilities into the system. Our code
Segmentation into “deformable bones” was then done by mapping currently allows us to run a skinned armadillo with 30k triangles,
19k particles, 21 member “bones,” and 87 point joints with a colli-
sion proxy in the Pachinko scenario at the interactive rate of about
Linear Basis BD- # of # of 7fps on a single core of an Intel Xeon X5680 CPU.
Other
FEM Gen. Tree Bones Particles
Although we have used linear finite elements to simplify our discus-
Bunny 0.73 1.93 0.54 0.22 13 7k
sion, our method can handle non-linear materials as well via [Barbič
Domino 0.0081 0.0151 0.0016 0.0035 1 2.7k
and James 2005]. Our derivations assume a linear basis (i.e. ~ u =
Armadillo 7.60 45.26 6.20 2.02 21 74k
S~q ), so we would require modal derivatives in the basis to reason-
Armadillo ably handle non-linear materials. One could extend the ideas in this
1.14 2.63 1.76 0.39 21 19k
(Coarse) paper to even more complex subspaces, including those with mul-
Fish 0.66 1.91 0.47 0.18 4 10k tiple linear bases. We note that it is straightforward to apply our
Octopus 21.01 320.99 25.76 6.00 50 244k skinning framework to standard finite element models as well—for
example one could use a very low degree of freedom linear full
Table 1: Pre-computation times (in seconds) and complexity details space finite element model attached to a rigid frame via Equation 1
for all of our example meshes. for each ”deformable bone” (or even a very coarse nonlinear finite
# of Collision Reduced-
# of Average # of # of Points of # of # of Surface Self-
Proxy Surface Reduced
Frames Sec/Frame Bones Articulation Particles Particles Collision
Particles Collision
Bunny and 10 Dominoes 600 35.4 23 64 10k 6k - on on
Armadillo and Stairs 400 32.4 21 83 74k 36k - on on
Armadillo with Projectiles 500 4.2 21 83 74k 36k - off off
Armadillos in a Pachinko
650 0.15 21 87 19k 15k 1536 off off
Machine (Each Armadillo)
20 Fish in a Box 480 122.4 80 300 200k 116k 5600 off on
20 Fish in a Box 480 13.38 80 300 200k 116k 5600 off off
24 Fish and 12 Shells 480 81.6 96 360 240k 139k 6720 off on
Fish, Shells, and an Octopus 204 344.4 146 591 484k 240k 11762 on on
Table 2: Timing and mesh sizes for all of our examples, which were run using a single core of an Intel Xeon X5680 CPU. For the Pachinko
example, we set collision, contact, and poststabilization iterations to 1 while setting the iterative articulation tolerance to 0.1. We set collision,
contact, and poststabilization iterations to 5 and our iterative articulation tolerance to 1e-7 for all other examples.
element model). A better friction model than the one we chose to BARBI Č , J., AND JAMES , D. 2010. Subspace self-collision culling.
use could also be investigated in future work. In Proc. of ACM SIGGRAPH 2010, 81:1–81:9.
BARBI Č , J., AND JAMES , D. 2005. Real-time subspace integration I DELSOHN , S. R., AND C ARDONA , A. 1985. A reduction method
of St. Venant-Kirchhoff deformable models. ACM Trans. Graph. for nonlinear structural dynamic analysis. Computer Methods in
(SIGGRAPH Proc.) 24, 3, 982–990. Applied Mechanics and Engineering 49, 3, 253 – 279.
JAMES , D., AND PAI , D. 2004. Bd-tree: Output sensitive collision rographics Association, Aire-la-Ville, Switzerland, Switzerland,
detection for reduced deformable models. ACM Trans. Graph. SCA ’12, 1–8.
(SIGGRAPH Proc.) 23, 393–398.
S HABANA , A. 2005. Dynamics of Multibody Systems. Cambridge
K AUFMAN , D., S UEDA , S., JAMES , D., AND PAI , D. 2008. Stag- University Press.
gered projections for frictional contact in multibody systems.
S IFAKIS , E., S HINAR , T., I RVING , G., AND F EDKIW, R. 2007.
ACM Transactions on Graphics (SIGGRAPH Asia 2008) 27, 5,
Hybrid simulation of deformable solids. In Proc. of ACM SIG-
164:1–164:11.
GRAPH/Eurographics Symp. on Comput. Anim., 81–90.
K AVAN , L., AND Ž ÁRA , J. 2005. Fast collision detection for T ENG , Y., OTADUY, M. A., AND K IM , T. 2014. Simulating ar-
skeletally deformable models. Computer Graphics Forum 24, 3, ticulated subspace self-contact. ACM Trans. Graph. 33, 4 (July),
363–372. 106:1–106:9.
K AVAN , L., C OLLINS , S., Ž ÁRA , J., AND O’S ULLIVAN , C. 2007. T ERZOPOULOS , D., AND W ITKIN , A. 1988. Physically based
Skinning with dual quaternions. In Proceedings of the 2007 models with rigid and deformable components. In Graph. Inter-
Symposium on Interactive 3D Graphics and Games, ACM, New face, 146–154.
York, NY, USA, I3D ’07, 39–46.
W EINSTEIN , R., T ERAN , J., AND F EDKIW, R. 2006. Dynamic
K IM , T., AND JAMES , D. L. 2011. Physics-based character skin- simulation of articulated rigid bodies with contact and collision.
ning using multi-domain subspace deformations. In Proceed- IEEE TVCG 12, 3, 365–374.
ings of the 2011 ACM SIGGRAPH/Eurographics Symposium on
Computer Animation, ACM, New York, NY, USA, SCA ’11, 63–
72.
KOYAMA , Y., AND I GARASHI , T. 2013. View-dependent control
of elastic rod simulation for 3d character animation. In Sympo-
sium on Computer Animation, ACM, J. Chai, Y. Yu, T. Kim, and
R. W. Sumner, Eds., 73–78.
KOYAMA , Y., TAKAYAMA , K., U METANI , N., AND I GARASHI ,
T. 2012. Real-time example-based elastic deformation. In Pro-
ceedings of the ACM SIGGRAPH/Eurographics Symposium on
Computer Animation, Eurographics Association, Aire-la-Ville,
Switzerland, Switzerland, SCA ’12, 19–24.
K RY, P., JAMES , D., AND PAI , D. 2002. Eigenskin: real time large
deformation character skinning in hardware. In Proc. of the ACM
SIGGRAPH Symp. on Comput. Anim., ACM Press, 153–159.
L ALL , S., K RYSL , P., AND M ARSDEN , J. E. 2003. Structure-
preserving model reduction for mechanical systems. Physica D:
Nonlinear Phenomena 184, 1, 304–318.
L EWIS , J., C ORDNER , M., AND F ONG , N. 2000. Pose space
deformations: A unified approach to shape interpolation a nd
skeleton-driven deformation. Comput. Graph. (SIGGRAPH
Proc.), 165–172.
L IU , L., Y IN , K., WANG , B., AND G UO , B. 2013. Simulation
and control of skeleton-driven soft body characters. ACM Trans.
Graph. 32, 6, 215:1–215:8.
M ARTIN , S., T HOMASZEWSKI , B., G RINSPUN , E., AND G ROSS ,
M. 2011. Example-based elastic materials. In ACM SIG-
GRAPH 2011 papers, ACM, New York, NY, USA, SIGGRAPH
’11, 72:1–72:8.
M ETAXAS , D., AND T ERZOPOULOS , D. 1992. Dynamic defor-
mation of solid primitives with constraints. In Proceedings of
the 19th annual conference on Computer graphics and interac-
tive techniques, ACM, New York, NY, USA, SIGGRAPH ’92,
309–312.
P ENTLAND , A., AND W ILLIAMS , J. 1989. Good vibrations:
modal dynamics for graphics and animation. Comput. Graph.
(Proc. SIGGRAPH 89) 23, 3, 215–222.
S CHUMACHER , C., T HOMASZEWSKI , B., C OROS , S., M ARTIN ,
S., S UMNER , R., AND G ROSS , M. 2012. Efficient simulation
of example-based materials. In Proceedings of the ACM SIG-
GRAPH/Eurographics Symposium on Computer Animation, Eu-