440 likes | 848 Views
Efficient Simulation of Inextensible Cloth. Rony Goldenthal et al. Presenter : SoHyeon Jeong (SoHyeon.Jeong@gmail.com). ACM SIGGRAPH 2007. Movie. Contents. Abstract Introduction Related Work Cloth Model Constrained Dynamics Implicit Constraint Direction(ICD) Step and Project(SAP)
E N D
Efficient Simulation of Inextensible Cloth RonyGoldenthal et al. Presenter : SoHyeonJeong (SoHyeon.Jeong@gmail.com) ACM SIGGRAPH 2007
Contents • Abstract • Introduction • Related Work • Cloth Model • Constrained Dynamics • Implicit Constraint Direction(ICD) • Step and Project(SAP) • Fast Projection Method • Implementation • Results • Discussion
Abstract • A Simulation of Woven Fabrics with LOW Strain • Constrained Lagrangian Mechanics • Fast Projection Method • Resulting algorithms acts as a Velocity Filter Weft Warp Woven Fabric
Algorithm I • Simulationbased-on Elastic Materials • Constraints LagrangianMechanics Rest length Direction : Oscillation occurs Length : Eq(1)
Algorithm II • The problem : • The Solution:to use Constraint at n+1 Direction : Direction : Length : Length :
Algorithm III • However, we don’t know , • Compute Implicitly • Step and Project • Find the closest point • Fast Projection • Find a close point • until it converges • or less than the tolerance
Introduction I • The Problem • Most fabrics do not stretch under their own weight • Unfortunately, Popular cloth solvers allow to Stretch because of Performance Unrealistic 10%↑ Strain The most powerful!! Integrated velocity Inaccuracy + Instability of Discrete Time Integration Force, F or For stability Time Step, h
Introduction II • The Solution • Strain and Strain Rate Limiting Algorithms are required • [Provot 1995] • Our Method to solve • Prohibits Stretching by enforcing Constraint Equations • NOT 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 method’s 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 code’s existing bending, damping, and collision models, to yield accelerated performance
Figure 1 Importance of capturing inextensibility. Simulation results of progressively smaller permissible strain Actual Denim Patch
Related Work I • Broad 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 Hooke’s Law
Related Work II • Implicit Integration [Baraff and Witkin 1998] • Large, stable time steps • Adaptive time stepping • Implicit-Explicit (IMEX) formulation • [Eberhardt 2000], [Boxerman et al. 2003] • Only a subset of forces implicitly • Stretching forces are singled out for special treatment • (Related to this paper’s method) • Problem • Improved performance by allowing stretch of fabrics • Implicit Systems perform many iterations with elastic material stiffness • Timestepping algorithms introduce undesirable numerical damping • Backward Euler & BDF2
Related Work III • An alternative method • To reduce the stiff component and reformulate it as a constraint [Hairer et al. 2002] • Discrete Setting: various iterative or global Algorithms • Iterative Enforcement • Correcting 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 iterations
Related Work IV • Global Enforcement • [House et al. 1996] • Lagrangian Multiplier with CLM to treat stretching • Alleviates the difficulties associated with poor numerical conditioning and artificial damping • Difficulties 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 coefficients • Caused by linearization of constraint equation • Our method : use nonlinear equation
Related 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 Model • Woven Fabrics • A complex mechanical network of interleaving yarn • Material’s warp and weft directions do not stretch perceptively • Quadrangulation • Less edges (2n VS 3n), given n vertices • Subtracting 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 • Stretch • Warp- or weft aligned quad edge maintains its undeformed length l, by enforcing • Other : compatible with existing systems • Shear : fabrics actually perceptibly shear • Bending / collisions / and so on.. Constraint: (1) (2) Its gradient:
Constrained Dynamics • Augmented 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 Mx1 3n x 3n 3n x1 x x - - x 1 x 3n 1 1 x m
Constrained Dynamics • Euler-Lagrange Equation (3) (4)
Discretization • Discretization of Continuous functions • SHAKE and RATTLE • Widely-used family of discretization • Extend the Verlet scheme [Hairer et al. 2002] • Consider a constraint force direction at the beginning of the time step replace with where and are the position and velocity of the mesh at time
Discretization – SHAKE (Failure) There might be solutions even in the case that the matrix cannot be calculated The magnitudes of the moves are proportional to the entries of The gradient directions : : Derivative of C
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 I • Evaluating the constraint direction, at the end of the time step Explicit : n Implicit : n+1 ICD resolves (Q1), (Q2) and (Q4). (Q3) remedied by decreasing the time step
Implicit Constraint Direction II • ICD time steps Explicit Implicit Define To obtain , we need to calculate using
Step and Project • Problems of Solving using Newton’ method • Many unknowns (5n) • Requires the solution of an indefinite linear system • Constraint 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 to • Closest : minimum discretization The L2 norm of the mass-weighted displacement of the mesh as it moves from to S
Newton’s Method • An iterative methodto solve non-linear function • Nonlinear system of equations
Fast Projection Method • Solving SAP using Newton’s method • Each iteration would improve upon a guess for the shortest step • Fast Projection • Also uses a sequence of iterations • But, it relax the requirement of SAP • The closest a close point by taking a sequence of smallest steps
A Step of Fast Projection I • Progressively closer approximations to the constrained position • The (j+1)th step of fast projection extremizes the objective function • Expanding the constraint to first order goal start = tolerance
A Step of Fast Projection II • A 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 solver • Fast projection’s 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 system PARDISO[Schenk and Gartner 2006]
Fast Projection Algorithm • Convergence condition • Until the maximal strain is below a threshold • The constraint may be satisfied up to a given tolerance • FP finds a manifold point, , that is close (not the closest) • Referring Corollary, FP solves C=0 while it approximates F=0 • The FP’s error is acceptable? • First iteration of PF and ICD/SAP is identical • At the end of this first iteration : • Additional PF iteration seek C0 • Since , 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 3 • The effect of fast projection on the residual F • After the first and last iterations of fast projection
Figure 4 • The performance of FP against an implicit treatment of stiff springs • Ex) 1D chain resists stretching, but not bending • (a) permissible strain • (b) Mesh resolution Using 80 vertices and 1% strain, FP achieves a 25X speed up
Draping Cloth • To compare fast projection with • (1) ICD • Is able to use larger timesteps than SHAKE and still converge • Each 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 converge • Extremely 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 5 • Performance • (a) Permissible strain (5041 vertices) • (b) Discretization Resolution (1% permissible strain) • As the stiffness is increased for a cloth mesh • All CLM methods scale equally well, FP is the fastest
Figure 6 • The simulation results using FP and ICD methods • Qualitatively similar results
Figure 7 • FP is capable of producing complex, realistic simulation of cloth
Discussion • Experiment focus • The performance of enforcing inextensibility using CLM • Inextensibility : • [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 handling • Since one filter must execute before the other • Both 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 simulation • First, we execute collision handling last • Second, the constraint is maintained at the end of the time step • errors are not accumulated
Conclusion • The most common fabrics do not stretch visibly • The 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 behavior • Constrained Lagrangian Mechanics • Straightforward filter • Good convergence behavior • Enforcing inextensibility • One immediate and pragmatic approach to fast and realistic fabric simulation