Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview...

38
Cloth The Animation of Natural Phenomena Adrien Treuille

Transcript of Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview...

Page 1: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

ClothThe Animation of Natural Phenomena

Adrien Treuille

Page 2: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Overview•Real Cloth

•Properties of Real Cloth

•Cloth Simulation•Properties of Cloth

•sheet of fabric (4)•parameter for stretching (1) (4) •parameter for shearing (4)•parameter for bending (4)•how to set these properties

•wrinkles and crinkles (4)•thickness (4)•non-uniform (4)

•Spring-based Simulation•mesh of springs (1) (2)

•Energy-based•various forms of triangle energy

•Developable Surfaces

•Cloth Collisions•interactions w/ itself (1) (2) (3) (4)•interactions w/ rigid bodies (1) (3)•friction (4)

•Advanced• fluid flow affecting cloth (3)•rendering / texturing of cloth (3)•tearing (3)

Group 1Group 2Group 3Group 4New!

Page 3: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Overview•Real Cloth

•Properties of Real Cloth

•Cloth Simulation•Properties of Cloth

•sheet of fabric (4)•parameter for stretching (1) (4) •parameter for shearing (4)•parameter for bending (4)•how to set these properties

•wrinkles and crinkles (4)•thickness (4)•non-uniform (4)

•Spring-based Simulation•mesh of springs (1) (2)

•Energy-based•various forms of triangle energy

•Developable Surfaces

•Cloth Collisions•interactions w/ itself (1) (2) (3) (4)•interactions w/ rigid bodies (1) (3)•friction (4)

•Advanced• fluid flow affecting cloth (3)•rendering / texturing of cloth (3)•tearing (3)

Group 1Group 2Group 3Group 4New!

Page 4: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

• 2 basic types: woven and knit

• We’ll restrict to woven

• Warp vs. weft

What is cloth?

House, Breen [2000]

Christopher TwiggMarch 4, 2003

Cloth Animation

Page 5: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Warp and Weft

source: Wikipedia

Page 6: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Overview•Real Cloth

•Properties of Real Cloth

•Cloth Simulation•Properties of Cloth

•sheet of fabric (4)•parameter for stretching (1) (4) •parameter for shearing (4)•parameter for bending (4)•how to set these properties

•wrinkles and crinkles (4)•thickness (4)•non-uniform (4)

•Spring-based Simulation•mesh of springs (1) (2)

•Energy-based•various forms of triangle energy

•Developable Surfaces

•Cloth Collisions•interactions w/ itself (1) (2) (3) (4)•interactions w/ rigid bodies (1) (3)•friction (4)

•Advanced• fluid flow affecting cloth (3)•rendering / texturing of cloth (3)•tearing (3)

Group 1Group 2Group 3Group 4New!

Page 7: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

SE1SIGGRAPH 2001 COURSE NOTES PHYSICALLY BASED MODELING

Page 8: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Stretch (Continuum Version)Stretch (Continuum Version)Stretch (Continuum Version)

( , )u v( , )u v x!x!

1u

xS

u

!!

= "!

1u

xS

u

!!

= "!

2 212

( )u vE k S S dudv= +#2 21

2( )u vE k S S dudv= +#

SE11SIGGRAPH 2001 COURSE NOTES PHYSICALLY BASED MODELING

Page 9: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Shear (Continuum Version)Shear (Continuum Version)Shear (Continuum Version)

( , )u v( , )u v x!x!

" "1

cosx x

u v

! !i! "

# $% %= & '% %( )

" "1

cosx x

u v

! !i! "

# $% %= & '% %( )

212

E k dudv!= *21

2E k dudv!= *

SE12SIGGRAPH 2001 COURSE NOTES PHYSICALLY BASED MODELING

Page 10: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Bend (Continuum Version)Bend (Continuum Version)Bend (Continuum Version)

( , )u v( , )u v x!x!

2 212

( )u vE k dudv! != +"2 21

2( )u vE k dudv! != +"

SE13SIGGRAPH 2001 COURSE NOTES PHYSICALLY BASED MODELING

Page 11: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Overview•Real Cloth

•Properties of Real Cloth

•Cloth Simulation•Properties of Cloth

•sheet of fabric (4)•parameter for stretching (1) (4) •parameter for shearing (4)•parameter for bending (4)•how to set these properties

•wrinkles and crinkles (4)•thickness (4)•non-uniform (4)

•Spring-based Simulation•mesh of springs (1) (2)

•Energy-based•various forms of triangle energy

•Developable Surfaces

•Cloth Collisions•interactions w/ itself (1) (2) (3) (4)•interactions w/ rigid bodies (1) (3)•friction (4)

•Advanced• fluid flow affecting cloth (3)•rendering / texturing of cloth (3)•tearing (3)

Group 1Group 2Group 3Group 4New!

Page 12: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Resitence To...

•Stretching

•Shearing

•Bending

Page 13: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Basic Model

Page 14: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Warp Srings

Page 15: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Weft Springs

Page 16: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Shear Springs

Page 17: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Bend Springs

Page 18: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Overview•Real Cloth

•Properties of Real Cloth

•Cloth Simulation•Properties of Cloth

•sheet of fabric (4)•parameter for stretching (1) (4) •parameter for shearing (4)•parameter for bending (4)•how to set these properties

•wrinkles and crinkles (4)•thickness (4)•non-uniform (4)

•Spring-based Simulation•mesh of springs (1) (2)

•Energy-based•various forms of triangle energy

•Developable Surfaces

•Cloth Collisions•interactions w/ itself (1) (2) (3) (4)•interactions w/ rigid bodies (1) (3)•friction (4)

•Advanced• fluid flow affecting cloth (3)•rendering / texturing of cloth (3)•tearing (3)

Group 1Group 2Group 3Group 4New!

Page 19: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

DiscretizationDiscretizationDiscretization

SE14SIGGRAPH 2001 COURSE NOTES PHYSICALLY BASED MODELING

Page 20: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Triangle EnergyTriangle EnergyTriangle Energy

vv

uu

aa

bb

cc

b!b!

a!a!c!c!

First, compute the affine transformationT that maps:First, compute the First, compute the affineaffine transformation transformationTT that maps: that maps: :T a c

b b

c c

" !

" !

" !

:T a c

b b

c c

" !

" !

" !

SE15SIGGRAPH 2001 COURSE NOTES PHYSICALLY BASED MODELING

Page 21: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Triangle Stretch EnergyTriangle Stretch EnergyTriangle Stretch Energy

vv

uu

aa

bbcc

b!b!

a!a!

c!c!

2 21stretch 2

( )u vE k S S A= +2 21

stretch 2( )u vE k S S A= +

ˆ( ) 1uS T u= "ˆ( ) 1uS T u= "Now compute thestretch energy.Now compute theNow compute thestretch energy.stretch energy.

SE16SIGGRAPH 2001 COURSE NOTES PHYSICALLY BASED MODELING

Page 22: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Triangle Shear EnergyTriangle Shear EnergyTriangle Shear Energy

vv

uu

aa

bb

cc

b!b!

a!a!c!c!

21shear 2

E k A"=21

shear 2E k A"=

1ˆ ˆcos ( ( ) ( ))T u T v" #

= i1ˆ ˆcos ( ( ) ( ))T u T v" #

= iNext compute theshear energy.Next compute theNext compute theshear energy.shear energy.

SE17SIGGRAPH 2001 COURSE NOTES PHYSICALLY BASED MODELING

Page 23: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Triangle Bend EnergyTriangle Bend EnergyTriangle Bend Energy

2bend 2

( )kE A!=2

bend 2( )kE A!=

perpl

"! =

perpl

"! =

Finally compute thebend energy.Finally compute theFinally compute thebend energy.bend energy.

vv

uu

aa

bbcc

""

dd

SE18SIGGRAPH 2001 COURSE NOTES PHYSICALLY BASED MODELING

Page 24: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

A Note About Energy

Page 25: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

• Damping forces turn out to be important both for realism and numerical stability

• Damping forces should

• Act in direction of corresponding elastic force

• Be proportional to the velocity in that direction

Hence, we derive (this should look familiar)

where

Baraff, Witkin [1998] (5)

d = !kdC(x)!C(x)

!x

C(x) =!C(x)

!t=

!C(x)

!x

!x

!t

Direction of force

Christopher TwiggMarch 4, 2003

Cloth Animation

Page 26: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Overview•Real Cloth

•Properties of Real Cloth

•Cloth Simulation•Properties of Cloth

•sheet of fabric (4)•parameter for stretching (1) (4) •parameter for shearing (4)•parameter for bending (4)•how to set these properties

•wrinkles and crinkles (4)•thickness (4)•non-uniform (4)

•Spring-based Simulation•mesh of springs (1) (2)

•Energy-based•various forms of triangle energy

•Developable Surfaces

•Cloth Collisions•interactions w/ itself (1) (2) (3) (4)•interactions w/ rigid bodies (1) (3)•friction (4)

•Advanced• fluid flow affecting cloth (3)•rendering / texturing of cloth (3)•tearing (3)

Group 1Group 2Group 3Group 4New!

Page 27: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Parameters• Given stretch, shear, and bending constants...

• How would you make a wrinkly t-shirt, thick cloth, or non-uniform cloth?

Page 28: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Creating Clothes• How could we create the 3D model the

clothes for a character?

Page 29: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Non-flat ClothNon-flat ClothNon-flat Cloth

Non-flat cloth is strange stuff:Non-flat cloth is strange stuff:Non-flat cloth is strange stuff:

A baseball with no seams?A baseball with no seams?A baseball with no seams?

Wrinkles give strength?Wrinkles give strength?Wrinkles give strength?

Clothing cut out of a volume?Clothing cut out of a volume?Clothing cut out of a volume?

Even 4 Triangles are over-constrained: 16 rest angles, 8 rest lengths. 24 constraints on 15 dofs. Must be consistent!

Even 4 Triangles are over-constrained:Even 4 Triangles are over-constrained: 16 rest angles, 8 rest lengths. 16 rest angles, 8 rest lengths. 24 constraints on 15 24 constraints on 15 dofsdofs.. Must be consistent! Must be consistent!

Convexities that pop?Convexities that pop?Convexities that pop?

SE10SIGGRAPH 2001 COURSE NOTES PHYSICALLY BASED MODELING

Page 30: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Rest Mesh OptionsRest Mesh OptionsRest Mesh Options

Model in 3D

• Clothing already on characters.• Can directly craft desired 3D shape.• Annotate warp/weft directions.• Clothing probably will not locally flatten.

Model in 2D

• Must put clothing on characters• Hire a tailor to get the pattern right.• Sew parts together.• Clothing guaranteed to flatten locally.• Greater realism.

Model in 3DModel in 3D

•• Clothing already on characters. Clothing already on characters.•• Can directly craft desired 3D shape. Can directly craft desired 3D shape.•• Annotate warp/weft directions. Annotate warp/weft directions.•• Clothing probably will not locally flatten. Clothing probably will not locally flatten.

Model in 2DModel in 2D

•• Must put clothing on characters Must put clothing on characters•• Hire a tailor to get the pattern right. Hire a tailor to get the pattern right.•• Sew parts together. Sew parts together.•• Clothing guaranteed to flatten locally. Clothing guaranteed to flatten locally.•• Greater realism. Greater realism.

SE9SIGGRAPH 2001 COURSE NOTES PHYSICALLY BASED MODELING

Page 31: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Overview•Real Cloth

•Properties of Real Cloth

•Cloth Simulation•Properties of Cloth

•sheet of fabric (4)•parameter for stretching (1) (4) •parameter for shearing (4)•parameter for bending (4)•how to set these properties

•wrinkles and crinkles (4)•thickness (4)•non-uniform (4)

•Spring-based Simulation•mesh of springs (1) (2)

•Energy-based•various forms of triangle energy

•Developable Surfaces

•Cloth Collisions•interactions w/ itself (1) (2) (3) (4)•interactions w/ rigid bodies (1) (3)•friction (4)

•Advanced• fluid flow affecting cloth (3)•rendering / texturing of cloth (3)•tearing (3)

Group 1Group 2Group 3Group 4New!

Page 32: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Springs vs. Constraints

Source: Xavier ProvotDeformation Constraints in a Mass-Spring Model to Describe Rigid Cloth Behavior

Before Simulation Only Springs

Stretch Constraints Stretch+Shear Constraints

Page 33: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

• Popular for interactive applications

• Justification

• Biphasic spring model

•••••••• Plausible dynamics

Avoiding stiffness (2)

Iteration 1 Iteration 2 Iteration 3 (converged)

Linear elastic region

Force

Dis

plac

emen

t

From Desbrun, Meyer, Barr [2000]

Christopher TwiggMarch 4, 2003

Cloth Animation

Page 34: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Developable Surfaces

Page 35: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Figure 2: Schematic of nonconforming variables, located at mid-points of edges between triangles. While continuous at these points,the surface may be discontinuous along the rest of each edge.

and rendering. We therefore couple a “ghost” conforming mesh(with the usual vertex variables) to the simulation, used just for col-lisions and rendering.

Finally, since we impose developability as a hard constraint, we turnto time integration of constrained mechanics. The usual schemes ingraphics unfortunately suffer from strong numerical damping withnonlinear constraints, as energy is erroneously transferred to con-strained modes and projected out. We propose a new second orderaccurate multistep method, based on BDF2 and simple position-based constraint projection. This both reduces numerical damp-ing and speeds projection (since we remain closer to the constraintmanifold), without need for stabilization or velocity projection.

2 Previous Work

Cloth simulation has a long history within computer graphics; wehighlight here just a sampling of the relevant papers from the stand-point of the developable limit.

Provot [1995] worked with mass-spring models, introducing a looseconstraint on edges to not deform by more than 10% with a sim-ple Gauss-Seidel iteration. Bridson et al. [2003] demonstrated im-proved buckling behavior if edges were (loosely) constrained to notcompress at all, just stretch. The critical aspect of this approach,though not identified at the time, was that triangles were left withsome freedom to deform, fortuitously avoiding the locking prob-lem. Of course, this can’t realistically handle the many materialswhich more severely limit strain, and the Gauss-Seidel constraintiteration tends to induce mesh-dependent artifacts. This paper alsomakes use of the robust collision processing algorithm (for con-forming triangle meshes) developed by Bridson et al. [2002] fromearlier work by Provot [1997].

Baraff and Witkin [1998] instead proposed a semi-implicit Back-wards Euler integrator to avoid the stability time step restrictionplaguing explicit time integration of stiff models. Later authors ar-gued that the strong numerical damping present in Backwards Eu-ler was responsible for the fairly smooth appearance of Baraff andWitkin’s results; we suspect a large share of the problem was lock-ing, as very stiff in-plane forces brought the material model closeto developable, causing spurious numerical resistance to bending.

Choi and Ko [2002] introduced the second order accurate BDF2method to cloth simulation, which features much reduced dampingyet still has stiff decay [Ascher and Petzold 1998], of crucial impor-tance for dealing with stiff systems.2 They also fortuitously avoidedlocking with their implicit model of the buckling instability, allow-ing edges in their model to compress easily while still offering stiffresistance to stretch. (This can also be viewed as using biphasicsprings, with lower resistance to compression than stretch.) This

2By contrast, implicit symplectic integrators, such as certain Newmarkschemes, cannot possess stiff decay and thus exhibit objectionable temporalaliasing of high frequency modes into low frequency modes when usinglarge time steps.

is an attractive solution for much of the large-scale motion of thecloth, but the buckling model causes small-scale details to remainimplicit—i.e. not visible in the simulation mesh. Attempts at pro-cedurally adding in the missing detail have met with mixed success(e.g. [Volino and Magnenat-Thalmann 1999; Kang and Cho 2002;Tsiknis 2006]).

More recently Goldenthal et al. [2007] demonstrated an effectiveapproach to constraining a quad-dominant cloth mesh to zero de-formation along the warp and weft directions. They avoid lockingby requiring most of the mesh to use quad elements, and by notconstraining shearing: this leaves enough degrees of freedom toaccurately and beautifully capture many fabrics of interest, but itcannot be extended to the developable no-shear limit or to trianglemeshes. Our new constrained mechanics time integration scheme isa multistep extension of Goldenthal et al.’s fast projection method.

Bergou et al. [2006] introduced the nonconforming elements weuse in the context of deriving a compact stencil for bending forceson conforming meshes; our work generalizes this to use them forin-plane dynamics to solve locking.

Liu et al. [2007] imposed developability as a constraint on con-forming triangle meshes, proving that n triangles give you O(

!n)

degrees of freedom. Unfortunately, those degrees of freedom sufferfrom mesh-dependent artifacts which do not vanish under refine-ment: this is the clearest illustration in the literature of the lockingproblem we face, and motivates why we need a new method.

3 A Nonconforming Element Discretization

We begin with a regular triangle mesh in parameter or “object”space, with the midpoint of each edge i at parameter space posi-tion pi as in figure 2. Each edge variable also has a world spaceposition xi, a velocity vi, etc. Within a triangle with edges i, j, andk, we extend variables with linear interpolation/extrapolation: e.g.from geometric similarity the world space position of the vertex lo-cated at the corner opposite edge i is xj + xk " xi. We can alsophrase this in terms of piecewise linear basis functions {!i}, where!i(p) is 1 all along edge i and zero at the midpoints of all otheredges: x(p) =

P

i xi!i(p).

The mass mi associated with edge i is simply a third of the massof the sum of the masses of the incident triangles; these can beassembled into a diagonal mass matrix M , with each mass repeatedthree times. Newton’s law is then d2x/dt2 = M!1F , where F isa vector of the net forces on each edge.

For a regular elastic material, we could use the usual Galerkin fi-nite element discretization (see Brenner and Scott [2002] for ex-ample), integrating gradients of the nonconforming basis functionsover each triangle as appropriate to get a stiffness matrix, but—crucially—avoiding integrating over the jump discontinuities on theedges between triangles.

However in the developable limit we take, an equivalent but simplerformulation is possible. The deformation gradient in each trian-gle is the gradient of world space position w.r.t. parameter values.For linear elements, this is constant in each triangle; to avoid in-plane deformation, this gradient matrix must be orthogonal, i.e. theworld space pose of each triangle must be a rigid transformationof the parameter space pose. A triangle is rigid if and only if thedistance between any two edge midpoints remains constant, givingthree constraints per triangle of the form

cij(x) = #xi " xj#2 " d2ij = 0 (1)

where dij is the parameter space distance between edge midpointsi and j. We assemble all of these constraints in one column-vector-valued function C(x).

Developable Surfaces

Animating Developable Surfaces using Nonconforming Elements

Elliot English!

University of British ColumbiaRobert Bridson†

University of British Columbia

Figure 1: Frames from an animation of developable cloth, with complex collisions.

Abstract

We present a new discretization for the physics-based animationof developable surfaces. Constrained to not deform at all in-planebut free to bend out-of-plane, these are an excellent approximationfor many materials, including most cloth, paper, and stiffer ma-terials. Unfortunately the conforming (geometrically continuous)discretizations used in graphics break down in this limit. Our non-conforming approach solves this problem, allowing us to simulatesurfaces with zero in-plane deformation as a hard constraint. How-ever, it produces discontinuous meshes, so we further couple thiswith a “ghost” conforming mesh for collision processing and ren-dering. We also propose a new second order accurate constrainedmechanics time integration method that greatly reduces the numer-ical damping present in the usual first order methods used in graph-ics, for virtually no extra cost and sometimes significant speed-up.

CR Categories: I.3.7 [Computer Graphics]: Three-DimensionalGraphics and Realism—Animation

Keywords: cloth, developable surface, finite elements, constraints

1 Introduction

Many deformable surfaces, ranging from most types of cloth to pa-per [Kergosien et al. 1994; Bo and Wang 2007] and stiffer materi-als, are well approximated as developable: they bend out-of-planebut do not visibly stretch or compress in-plane. Even for materialswhich do allow some in-plane deformation, e.g. small amounts ofshearing in a fabric relative to the warp and weft directions, if thesimulator cannot handle the developable limit there are bound to be

!e-mail: [email protected]†e-mail: [email protected]

numerical problems as users attempt to approach it. We thus restrictour attention in this paper to the fully developable case, imposingzero in-plane deformation as a hard constraint, though of course ourtechnique is easily generalized to stretchy or shearable materials.

Unfortunately, standard graphics simulators break down preciselyat this limit. For example, for a triangle mesh with the usual piece-wise linear elements, developability implies that each triangle re-main rigid. For any nontrivial bending this constraint must be vi-olated: the mesh can essentially only crease along straight linesalready present in the mesh as edges: it locks.

The general phenomena of locking, i.e. the inability of a given finiteelement space to approximate solutions [Brenner and Scott 2002;Hauth 2004], was recently brought to light in graphics for volume-conserving volumetric simulations by Irving et al. [2007]. In thedevelopable surface case, Liu et al.’s rigorous analysis shows thata general n-triangle conforming mesh only has O(

!n) degrees of

freedom [2007], with significant mesh-dependent artifacts. Simi-lar arguments show that quad meshes with bilinear elements sufferfrom the same locking problem, as do many higher order polyno-mial elements. For stiff but not fully constrained cloth models, e.g.where edges may change their length slightly, locking manifests asa spurious increased resistance to bending, proportional to the in-plane stiffness rather than the true bending stiffness.

The classic solution to the locking problem for volume-conservingdeformations is to use nonconforming elements [Brenner and Scott2002]. Rather than reduce the number of constraints by averagingover larger regions as Irving et al. propose, finite element practi-tioners traditionally increase the number of variables, by puttingthe variables at the midpoints of edges (in 2D) or faces (in 3D).1

We adopt this approach for the deformable surface case, puttingour position variables at the midpoints of the edges rather than thevertices in the mesh (see figure 2). This now gives us 3e " 9v vari-ables, and to make each linear triangle rigid only implies 3t " 6vconstraints, leaving us with approximately 3v true degrees of free-dom for bending—allowing the method to accurately approximatedevelopable surfaces. The first part of our paper gives the detailson this approach: how to enforce developability, special treatmentof boundary elements, and a simple bending model.

However, the discrete surfaces we work with are nonconforming,i.e. no longer necessarily continuous: adjacent triangles only haveto meet at the midpoint of the common edge, not necessarily at ver-tices. This clearly poses a problem for robust collision processing

1This may be identified as the lowest order Crouzeix-Raviart element.

Page 36: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Developable Surfaces

Page 37: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Question• Cloth and Hair..

• How can we detect collisions?

• Data structures?

• Algorithms?

• How do we handle collisions?

Page 38: Cloth - Carnegie Mellon Computer Graphicsgraphics.cs.cmu.edu/courses/15-869/lec/06/lec06.pdfOverview •Real Cloth •Properties of Real Cloth •Cloth Simulation •Properties of

Course Evaluations