1 of 36

Cloth Simulation

An Brief Introduction to Its History and Method

Wenxuan Wu

2 of 36

Outline

  • Motivation and Application
  • Cloth Simulation Models
    • Geometric-based Model
    • Physical-based Model
  • Numerical Solvers
  • Collision Detection
  • Optimization

3 of 36

Motivation

  • Clothes for Gaming
    • Precision vs Real-time
  • Clothes for Design
  • Clothes for Shopping
  • Clothes for Virtual Avatar

4 of 36

Motivation

  • Clothes for Gaming
    • Precision vs Real-time
  • Clothes for Design
  • Clothes for Shopping
  • Clothes for Virtual Avatar

5 of 36

Motivation

  • Clothes for Gaming
    • PC vs Mobile
    • Real-time
  • Clothes for Design
  • Clothes for Shopping
  • Clothes for Virtual Avatar

6 of 36

Motivation

  • Clothes for Gaming
    • PC vs Mobile
    • Real-time
  • Clothes for Design
  • Clothes for Shopping
  • Clothes for Virtual Avatar

7 of 36

Geometric Model

  • Represent folds and creases by geometrical equations.
  • Aim at modeling the appearance of the cloth
  • Not focus on the physical aspects of cloth

8 of 36

Jerry Weil (1986)

  • Surface Approximation Stage
    • Approximate the y position of cloth vertices between two constrained points using curve

9 of 36

Jerry Weil (1986)

  • Iterative Relaxation Stage
    • Assume the distances of a point with its four neighbor is 1
    • Set all exterior points y = - infinity
    • Iteratively update all points position based on constraint vectors

10 of 36

Physical-Based Model

  • Represent cloth as grids
  • Vertices are points with finite mass
  • Forces and energies of points are calculated from the relations with other points

11 of 36

Provot (1995)

  • Spring-Mass System
    • Internal Forces and External Forces
    • Integration: Simple Euler method
    • Dynamic Inverse Constraints

12 of 36

Stretching Model ( 1 / 3 )

  • Stretching
    • Strong Resistance
  • Bending
    • Weak Resistance
  • Shearing
  • Nonlinear Characteristics
    • Friction, Deformation, etc

13 of 36

Bending Model ( 2 / 3 )

  • Stretching
    • Strong Resistance
  • Bending
    • Weak Resistance
  • Shearing
  • Nonlinear Characteristics
    • Friction, Deformation, etc

14 of 36

Shearing Model ( 3 / 3 )

  • Stretching
    • Strong Resistance
  • Bending
    • Weak Resistance
  • Shearing
  • Nonlinear Characteristics
    • Friction, Deformation, etc

15 of 36

Nonlinear Model (Anisotropy) *

16 of 36

Discrete Spring-mass Grid

17 of 36

Müller et al. (2007)

  • Position-based Method
    • Adding constraints to each particle.
    • Use current velocity and position to predict new
    • Solve constraint and calculate current state

18 of 36

Numerical Solvers

  • Linear Methods
    • Euler, Midpoint, Runge-Kutta
    • Verlet Integration
  • Nonlinear Methods
    • Newton-Raphson
    • Gradient Descent
    • Projective Dynamics

19 of 36

Numerical Solvers

  • Linear Methods
    • Euler, Midpoint, Runge-Kutta
    • Verlet Integration
  • Nonlinear Methods
    • Newton-Raphson
    • Gradient Descent
    • Projective Dynamics

20 of 36

Linear Solvers (Verlet Integration)

  • Verlet Integration does not need to consider about velocity when calculate, so is faster

21 of 36

Linear Solvers (Verlet Integration)

  • Verlet Integration use positions to calculate position, alleviating error propagation.

22 of 36

Linear Solvers Demo Time

23 of 36

Nonlinear Solvers

24 of 36

Feel Similar?

  • Position Based Model can also be solved by optimization

25 of 36

Nonlinear Solvers

26 of 36

Gradient Descent (1/3)

  • Pros
    • GPU friendly
    • Very simple
  • Cons
    • 1st-order convergence rate
    • No simulator uses this as it is

27 of 36

Newton-Raphson (2/3)

  • Pros
    • 2rd-order convergence rate
  • Cons
    • How to solve A'f ? High cost!
    • It can fail to converge if x is far from the solution

28 of 36

Newton-Raphson (2/3)

29 of 36

Projective Dynamics (3/3)

  • Pros
    • Fast on CPUs, fast convergence in the first few iterations.
  • Cons
    • Not GPU-friendly, still 1st-order convergence rate.

30 of 36

Nonlinear Solver (Summary)

31 of 36

Collision Detection

  • Broad Phase Collision Detection
    • Spatial Hashing
    • BVH
  • Narrow phase Collision Detection
    • Point to face distance
    • And other tricks

32 of 36

Fun Demo

33 of 36

Grid Spatial Hashing

  • We hash the point into a cell and append it to that cell’s list.
  • Then hash table maps to cells, cells maps to points.
  • For collision detection, just iterate the neighbor of the cell as well as itself.

34 of 36

More tricks

  • Continuous collision detection
  • Substepping
  • Enforce maximal velocity
    • The larger the sub-steps, the larger the limiting velocity!
  • Introduce contact constraints

35 of 36

Collision Response

36 of 36

References

SIGGRAPH Courses & Papers

  • SIGGRAPH 2003 Course: Clothing Simulation and Animation
  • SIGGRAPH 2005 Course: Advanced Topics in Clothing Simulation and Animation

🔷 Course Notes & Lecture Slides

  • 2021 USTC Summer SeminarReal-Time Cloth Simulation on GPU, by Huaming Wang�🔗 Watch on Bilibili
  • Games 104 Lecture 11Modern Game Engine: Cloth Simulation, by Xi Wang�🔗 Watch on Bilibili

🔷 Online Tutorials

🔷 Student Presentation Notes