efficient simulation of inextensible cloth

44
Efficient Simulation of Inextensible Cloth Rony Goldenthal et al. Presenter : SoHyeon Jeong ([email protected]) ACM SIGGRAPH 2007

Upload: mariel

Post on 08-Feb-2016

73 views

Category:

Documents


6 download

DESCRIPTION

Efficient Simulation of Inextensible Cloth. Rony Goldenthal et al. Presenter : SoHyeon Jeong ([email protected]). ACM SIGGRAPH 2007. Movie. Contents. Abstract Introduction Related Work Cloth Model Constrained Dynamics Implicit Constraint Direction(ICD) Step and Project(SAP) - PowerPoint PPT Presentation

TRANSCRIPT

Efficient Simulation of Inextensible Cloth

Efficient Simulation of Inextensible ClothRony Goldenthal et al.

Presenter : SoHyeon Jeong ([email protected])ACM SIGGRAPH 2007Movie

ContentsAbstractIntroductionRelated WorkCloth ModelConstrained DynamicsImplicit Constraint Direction(ICD)Step and Project(SAP)Fast Projection MethodImplementationResultsDiscussion

AbstractA Simulation of Woven Fabrics with LOW StrainConstrained Lagrangian MechanicsFast Projection MethodResulting algorithms acts as a Velocity FilterWeftWarpWoven FabricAlgorithm ISimulationbased-on Elastic MaterialsConstraints LagrangianMechanicsOscillation occursRest length

Direction : Length :

Eq(1)Algorithm IIThe problem :

Direction : Length :

The Solution:to use Constraint at n+1

Direction : Length :

6Algorithm IIIHowever, we dont know ,Compute Implicitly Step and ProjectFind the closest point

Fast ProjectionFind a close pointuntil it convergesor less than the tolerance

Introduction IThe ProblemMost fabrics do not stretch under their own weightUnfortunately, Popular cloth solvers allow to Stretch because of Performance Unrealistic 10% Strain

Inaccuracy + Instability of Discrete Time Integration

Time Step, h Force, FFor stabilityorThe most powerful!!Integrated velocityIntroduction IIThe SolutionStrain and Strain Rate Limiting Algorithms are required [Provot 1995]

Our Method to solveProhibits Stretching by enforcing Constraint EquationsNOT by Integrating internal spring forces

Constraint based method is well-suit to operatein Quasi-Inextensible Regime.

Motivation : [Bridson et al. 2002]Velocity filtering passes

Contributions(2) We summarize the relevant Literature(3) We describe the basic discrete cloth model.(4.1) We propose a novel CLM formulation that is implicit on the constraint gradient.(4.2) We prove that the implicit methods nonlinear equations correspond to a minimization problem(4.3) This result motivates a fast projection method for enforcing inextensibility(4.4) We describe an implementation of fast projection as a simple and efficient velocity filter, as part of a framework that decouples time stepping, inextensibility, and collision passes(5) Consequently, the fast projection method easily incorporates with a codes existing bending, damping, and collision models, to yield accelerated performanceFigure 1

Importance of capturing inextensibility.

Actual Denim PatchSimulation results of progressively smaller permissible strain

Related Work IBroad Surveys on Cloth Simulation[House and Breen 2000; Choi and Ko 2005]

Treating Cloth as an Elastic Material [Terzopoulos et al. 1987][Breen et al. 1994], [Eberhardt et al. 1996][Baraff and Witkin 1998], [Choi and Ko 2002]

To reduce visible stretching,Large elastic moduli or stiff springs Degrading numerical stability

Hookes LawRelated Work IIImplicit Integration [Baraff and Witkin 1998]Large, stable time stepsAdaptive time stepping

Implicit-Explicit (IMEX) formulation [Eberhardt 2000], [Boxerman et al. 2003]Only a subset of forces implicitlyStretching forces are singled out for special treatment(Related to this papers method)

ProblemImproved performance by allowing stretch of fabricsImplicit Systems perform many iterations with elastic material stiffnessTimestepping algorithms introduce undesirable numerical dampingBackward Euler & BDF2

Related Work IIIAn alternative methodTo reduce the stiff component and reformulate it as a constraint [Hairer et al. 2002]Discrete Setting: various iterative or global Algorithms

Iterative EnforcementCorrecting Edge lengths by displacing incident vertices[Provot 1995]Bounding the rate of change of spring length per a time step less than 10% of the current length[Desbrun et al. 1999; Meyer et al. 2001;Fuhrmann et al. 2003;Bridson et al. 2002; 2003]Non-linear Gauss-Seidel: enforce inextensibility on each constraints[Muller et al. 2006]Iterative strain Limiting algorithms behave as Jacobi or Gauss-Seidel[Bridson et al.] Iterative constraint enforcement requires a number of iterationsRelated Work IVGlobal Enforcement[House et al. 1996] Lagrangian Multiplier with CLM to treat stretchingAlleviates the difficulties associated with poor numerical conditioning and artificial dampingDifficulties in handling collision response in [2000]Our Method : Overcome by velocity-filter paradigm to handle inextensibility and complex collision Numerical Drift Exacerbated by the discontinuities introduced during collision responses : overcome by constraint-restoring springs But hard to adjust the spring coefficientsCaused by linearization of constraint equationOur method : use nonlinear equationRelated Work V[Tsiknis 2006]Triangle strain limiting with a global stitching step for stability[Hong et al. 2005]Linearized implicit formulation to improve stability Summary Spring-based/Strain-limiting approach is costly and evenly intractable The alterative : Constraint-based Methods

Cloth ModelWoven FabricsA complex mechanical network of interleaving yarnMaterials warp and weft directions do not stretch perceptively

QuadrangulationLess edges (2n VS 3n), given n verticesSubtracting constraints from positional DOFS : O(n) DOFs remain, corresponding to the normal direction at each vertex (VS zero DOFs for a triangulation)Constraints are linearly independent Full-rank Jacobian treatable by direct solver

Cloth Model StretchWarp- or weft aligned quad edge maintains its undeformed length l, by enforcing

Other : compatible with existing systemsShear : fabrics actually perceptibly shearBending / collisions / and so on..

(1)(2)Its gradient:Constraint:Constrained DynamicsAugmented Lagrangian Equation[Marsden 1999]

: the time-varying 3n-vector of vertex position : time derivative : 3n x 3n mass matrix : the stored energy (e.g. bending, shear, and gravity) : the m-vector of constraints (i-th edge) : the m-vector of Lagrange multipliers

1 x 3n3n x 3n3nx111 x mMx1xx--x

What is augmented lagrangian equation ?

19Constrained DynamicsEuler-Lagrange Equation

(3)(4)DiscretizationDiscretization of Continuous functions

SHAKE and RATTLEWidely-used family of discretizationExtend the Verlet scheme [Hairer et al. 2002]Consider a constraint force direction at the beginning of the time step

where and are the position and velocity of the mesh at time replacewithDiscretization - SHAKE

Discretization SHAKE (Failure)

::

Derivative of CThere might be solutions even in the case that the matrix cannot be calculatedThe gradient directionsThe magnitudes of the moves are proportional to the entries of

Discretization SHAKE (Failure)(Q1) No Solution, R(0) nonsingular

(Q3) Solutions Exist C rank deficient(Q2) Solutions Exist is singular

(Q4) Redundant constraints G rank deficient

Implicit Constraint Direction IEvaluating the constraint direction, at the end of the time step

Explicit : nImplicit : n+1ICD resolves (Q1), (Q2) and (Q4). (Q3) remedied by decreasing the time stepImplicit Constraint Direction IIICD time steps

ExplicitImplicit

Define

To obtain ,we need to calculate using

Step and ProjectProblems of Solving using Newton methodMany unknowns (5n)Requires the solution of an indefinite linear systemConstraint integration in two steps(a) step forward only the potential forces(b) enforce the constraints by projecting onto the constraint manifold

Step and Project II The projected point extrimizes the objective function

The point on the constraint manifold closest toClosest :

minimum

S

discretizationThe L2 norm of the mass-weighteddisplacement of the mesh as it moves from to

Theorem 1 : ICD SAP

Newtons MethodAn iterative methodto solve non-linear function

Nonlinear system of equations

Fast Projection MethodSolving SAP using Newtons methodEach iteration would improve upon a guess for the shortest step

Fast ProjectionAlso uses a sequence of iterationsBut, it relax the requirement of SAPThe closest a close point by taking a sequence of smallest steps

A Step of Fast Projection IProgressively closer approximations to the constrained position

The (j+1)th step of fast projection extremizes the objective function

Expanding the constraint to first order

=startgoaltolerance

A Step of Fast Projection IIA quadratic objective function, whose stationary equations with respect to and are

Substituting (5) into (6), we eliminate and solve a linear system in

Finally,

As with ICD/SAP, a projection step require a linear solverFast projections system, (7), is smaller(25), positive define and sparser.

(5)(6)

(7)

Algorithm 1 Fast Projection

Implementation :Step 3 requires solving a sparse symmetric positive definite linear systemPARDISO[Schenk and Gartner 2006]Fast Projection AlgorithmConvergence conditionUntil the maximal strain is below a thresholdThe constraint may be satisfied up to a given toleranceFP finds a manifold point, , that is close (not the closest)Referring Corollary, FP solves C=0 while it approximates F=0The FPs error is acceptable? First iteration of PF and ICD/SAP is identicalAt the end of this first iteration : Additional PF iteration seek C0Since , increments in x are ,therefore F remains in is considered acceptable in many contexts[Baraff and Witkin 1998; Choi and Ko 2002] halt the Newton process after a single iteration

Figure 3The effect of fast projection on the residual FAfter the first and last iterations of fast projection

Figure 4The performance of FP against an implicit treatment of stiff springsEx) 1D chain resists stretching, but not bending(a) permissible strain(b) Mesh resolution

Using 80 vertices and 1% strain, FP achieves a 25X speed upDraping Cloth To compare fast projection with(1) ICDIs able to use larger timesteps than SHAKE and still convergeEach time step is substantially more expensive than SHAKE(2) SHAKE Uses the accelerating suggested in [Barth et al. 1994] to rebuild the matrix once per step or when it fails to convergeExtremely small timesteps to converge, but each step is relatively small(3) The strain limiting algorithms (Both Jacobi and Gauss-Siedel)Iterates until strain is in the permissible range

Figure 5Performance(a) Permissible strain (5041 vertices)(b) Discretization Resolution (1% permissible strain)As the stiffness is increased for a cloth meshAll CLM methods scale equally well, FP is the fastest

We describe several experiments comparing various stretch enforcement methods. All timings are with reference to a single process on a 2.66GHz Intel Core 2 Duo. One-dimensional chain Our first experiment compares the performance of fast projection against an implicit treatment of stiff springs. We observe the scaling of computational cost as a functionof (a) permissible strain and (b) mesh resolution. The physical setup consists of a chain pinned at the top node and released to free fall under gravity. The simple 1D chain resists stretching, but not bending. In this didactic example, timings refer to MATLABs (sparse) direct solver. Our method shows asymptotically better performance as permissible strain vanishes (see Figure 4a). Likewise, our algorithm exhibits favorable performance as mesh resolution increases (see Figure 4b). Using 80 vertices and 1% strain, the fast projectionmethod achieves a 25 speedup. Note that there exists considerable difficulty in setting spring coefficients a priori to satisfy a given strain limit. For settings more pragmatic than a simple chain, such as the following draping experiment, we are unable (despite considerable effort) to set spring coefficients that achieve a prescribed small strain. This explains why spring methods are often treated with strain-limiting procedures. 39Figure 6The simulation results using FP and ICD methodsQualitatively similar results

Figure 7FP is capable of producing complex, realistic simulation of cloth

Figure 8

DiscussionExperiment focusThe performance of enforcing inextensibility using CLMInextensibility : [Bergou et al. 2006] assumes inextensibility to accelerate bending computation

Adapting the velocity-filtering speed, simplicity, and software modularity

No way to enforce both ideal inextensibility and ideal collision handlingSince one filter must execute before the otherBoth ideals corresponds to sharp constraints combining them in a single pass but , introducing considerable complexity and convergence challenges

Practically, the drawback does not cause artifacts in our simulationFirst, we execute collision handling lastSecond, the constraint is maintained at the end of the time step errors are not accumulatedConclusionThe most common fabrics do not stretch visiblyThe trend is to use stretching formulations based on penalty-springs(a) relaxing realism by allowing 10% strain(b) adapting simple iterative strain and strain-rate algorithms that have poor convergence behaviorConstrained Lagrangian MechanicsStraightforward filterGood convergence behaviorEnforcing inextensibilityOne immediate and pragmatic approach to fast and realistic fabric simulation