Title: Large steps in cloth simulation
1Large steps in cloth simulation
David Baraff - Andrew Witkin SIGGraph 1998
Presented by Ohad Barzilay Computer Graphics Lab,
Hebrew University
2Why Cloth Simulation?
- Cloth simulation adds realism
- Cloth simulation is an Open Problem
- Cloth simulation is COOL
3Applications
- Entertainment
- Movies (Special F/X, Animation)
- Video Games (Real-time, FMV)
- Also
- Fashion (Designing, Virtual shows)
4Stuart Little Cloths
5Cloth Problem
- Cloth is a deformable object with complex
behavior. Simulating realistic cloth is hard. - Fooling people is near impossible. People see
cloth in various/extreme conditions all their
lives.
6Cloth Problem
- Simulating realistic looking cloth
- A triangle mesh of particles
- Material properties (mass, flexibility, etc.)
- Reaction to external forces (wind, gravity)
- Collisions (cloth-cloth, cloth-object)
7Cloth Problem
- Mass-Spring System
- Velocities and positions change over time
- Masses triangulated to form mesh
8Solving Method
- Apply external forces
- Gravity
- Viscous Drag
- Wind, etc.
- Apply internal forces
- Stretching
- Shearing
- Bending
9Stretching
- Problem Not enough to hold a shape
10Shearing
- Problem dropping on floor wads up in big mess of
spring spaghetti
11Bending
- Fibers in actual cloth run the length of the
fabric and resist folding and bending - Well stretch a spring across 2 cells (as shown
in next slide)
12Internal Forces Overview
?Stretch Springs
?Shear Springs
?Bend Springs
(All springs are damped, linear springs)
13System Overview
- Particles and forces are in R3
-
- Handles contact geometric constrains in direct
fashion -
-
14Solution Techniques
- Common Differential Equation
- Where
- x (vector) and M (diagonal Matrix) represents
the geometric state mass distrobution of the
cloth. - E (scalar of x) is the Internal Energy, F
(function of x and ) are the External Forces.
15Solution Techniques
- Given an initial condition x(t0) x0
- Find an approximation for x(t0h) for some time
step, h - We must have a way of evaluating the derivative
function ?x(t)/ ?t f(x,t).
16Solution Techniques
Implicit Integration
- Implicit Integration
- Explicit Integration stretch correction
- Semi-implicit Integration stretch correction
17Implicit Integration
- Given the system of ODEs
- The forward Euler method defines
- A backwards Euler method defines
18Implicit Integration
- Let ?xx(t0h)-x(t0) and ? v v(t0h)-v(t0)
- Using a Taylor series expansion for f(x0? x,
v0? v) - With some substitutions
Eq. 1
19Condition Functions
- We need to determine forces and derivatives for
Eq. 1 - Establish condition functions for
- Stretching
- Shearing
- Bending
- Compute forces
20Condition Functions
- Given a condition function C(p)???
- The force on particle, i, is defined as
- Its derivative with respect to particle, j
21Condition Functions
- Damping forces are defined
- Where
22Sparse Matrices
- Dimension is 3n X 3n for n particles
- Most elements are zero
- Connected particles produce non-zero elements
- Non-zero data is stored compactly
- Array of column indices for each row
- Array of columns
- Array of data corresponding to columns
23Sparse Matrices
Rows 0, 1, 3, 5, 7 Columns 0, 1,
3, 2, 3, 1, 2 Data 8, 4, 3, 5, 7,
3, 7
24Sparse Matrices
- For symmetric matrices, dont store anything
below the main diagonal - Arithmetic routines need to be aware of this
25Solving the System
- Form
- Use the conjugate-gradient iterative method to
solve A?vb for ?v - Constraints enforced using a filter function
26Implementation 2
- Derive forces from condition functions
- Use implicit integration
- Solve the linear system iteratively
- Enforce constraints on particles through filter
27Implicit Integration
- More complex mathematically
- Need force derivatives
- Form and solve large linear systems
- Iterative methods used
- Larger time steps possible
28Challenges
- Debugging is VERY difficult
- Huge mistakes can still produce close results
29Challenges
- Collision Detection
- Friction
- Seaming (for clothing)
30Conclusion
- Cloth simulation research is ongoing and
advancing - Real-time simulation of simple cloth is
possible (we give away accuracy for speed)
31 32Checking up close
Movie Speed
Slow Motion
33(No Transcript)
34(No Transcript)
35(No Transcript)
36Statistics Table Map
- Cloth (vertices / triangles)
- 2,602 / 4,944
- Solid (vertices / triangles)
- 322 / 640
- Time/frame
- 2.23
- Time Step (ms) (min / max)
- 16.5 / 33
- Total frames/steps
- 75 / 80
37T H E E N D