Cloth Simulation What make cloth hard to simulate? Due to the - - PowerPoint PPT Presentation

cloth simulation what make cloth hard to simulate
SMART_READER_LITE
LIVE PREVIEW

Cloth Simulation What make cloth hard to simulate? Due to the - - PowerPoint PPT Presentation

Cloth Simulation What make cloth hard to simulate? Due to the thin and flexible nature of cloth, it produces detailed folds and wrinkles, which in turn can lead to complicated self- collisions. Cloth is characterized by strong


slide-1
SLIDE 1

Cloth Simulation

slide-2
SLIDE 2

What make cloth hard to simulate?

  • ✦ Due to the thin and flexible nature of cloth, it produces detailed

folds and wrinkles, which in turn can lead to complicated self- collisions.

✦ Cloth is characterized by strong resistance to stretch and weak

resistance to bending, which leads to a stiff set of equations and thus prohibits the use of large time steps.

slide-3
SLIDE 3

Woven versus knit cloth

✦ The yarns in woven fabric are nearly immobile with very limited

deformations in the yarn structure.

✦ Knit materials consists of interlocked loops which deform and slide

readily with dramatic changes in small-scale structures.

✦ Most research on cloth mechanics has focused on woven cloth.

woven fabric knit fabric

slide-4
SLIDE 4

Woven fabric

slide-5
SLIDE 5

Knit fabric

slide-6
SLIDE 6

Mass-spring versus FEM

✦ Mass-spring system is easy to implementation and cheap to

compute, but is not as accurate.

✦ FEM spatially discretizes a set of PDEs which govern the

deformation in continuum mechanics.

✦ FEM provides a more accurate way to measure complex material

behaviors beyond a simple elastic model.

slide-7
SLIDE 7

Simulating different materials

slide-8
SLIDE 8

✦ Model clothes as triangular mesh of particles in ✦ The geometry state of clothes is

World space

x ∈ R3n R3

slide-9
SLIDE 9

Material space

✦ Treat cloth as a 2-dimensional manifold embedded in . ✦ Capture the rest state of cloth by assigning each particle an

unchanging coordinate (u , v) in the material space.

✦ The mapping between the material space and the world space is

defined by w(u, v). R3

slide-10
SLIDE 10

Equations of motion

✦ Equation of motion:

  • ✦ Internal forces are derived from potential energy function E(x).

M¨ x = fint + fext mass matrix , R3nX3n acceleration of particles, R3n cloth internal forces, R3n gravity and contact force, R3n M ¨ x fint fext

slide-11
SLIDE 11

Potential energy

  • ✦ The negative gradient of each potential function defines a type of

internal force:

  • ✦ General form of E(x):
  • ✦ The internal force can be computed by

E(x) = k 2C(x)T C(x) −∂E ∂x f = −∂E ∂x

T

= −k ∂C(x) ∂x

T

C(x)

slide-12
SLIDE 12

Internal forces

✦ In general, clothes resists motion in four directions

stretch compress shear bend in-plane motion

  • ut-of-plane motion
slide-13
SLIDE 13

Stretch force

✦ Stretch/compress force can be

measured by deformation gradient.

✦ Assuming w is a linear function

  • ver each triangle, the gradient of

w is constant within each triangle.

✦ Define energy function using

slide-14
SLIDE 14

Shear force

✦ Shear force can be measured by ✦ When the wu and wv are orthogonal, shear force is zero. ✦ Define energy function for shear force using

wT

u wv

slide-15
SLIDE 15

Bend force

✦ Bend force is measured between a pair of adjacent triangles. ✦ Using two geometry relations, we can solve for the bening angle.

  • ✦ Define energy function using

n1 n2 e θ

sin θ = (n1 × n2) · e cos θ = n1 · n2 C(x) = θ

slide-16
SLIDE 16

Damping force

✦ Damping force turns out to be important both for realism and

numerical stability.

✦ Damping forces should ✦ act in direction of corresponding elastic force, and ✦ be proportional to the velocity in that direction. d = −kd ˙ C(x)∂C(x) ∂x

slide-17
SLIDE 17

Buckling effect

When we push cloth like this, we expect to see this. But in the mass-spring system, the compression force has to be very stiff to get out-of-plane motion.

slide-18
SLIDE 18

Buckling model

✦ Replace bend and compression

forces with a single nonlinear model.

✦ Details in Ko and Choi

SIGGRAPH 2002.

slide-19
SLIDE 19

Stable but responsive cloth

slide-20
SLIDE 20

Integration issues

✦ In general, cloth stretches little if at all in the plane. ✦ To counter this, we generally have large in-plane stretch forces,

which requires a high stiffness coefficient.

✦ Since explicit integrators suffer from this stiff system, an implicit

integrator is used to achieve larger time steps.

slide-21
SLIDE 21

Implicit integration

✦ Transfer a second-order ODE to the first-order form.

  • ✦ Compute the next state based on the derivative evaluated at the

next state.

d dt x v ⇥ =

  • v

M−1f(x, v) ⇥ x v ⇥ = x0 v0 ⇥ + h

  • v

M−1f(x, v) ⇥

derivative at next state

slide-22
SLIDE 22

Linearize derivative function

✦ Linearize derivative function about the current state.

  • ✦ Compute next state by implicit integration
  • ✦ Solve for linear system
  • ✦ Update state
  • v

M−1f(x, v) ⇥ =

  • v0

M−1f0 ⇥ + ∂

  • v

M−1f(x, v) ⇥ ∂ x v ⇥

  • ∆x

∆v ⇥

  • x

v ⇥ =

  • x0

v0 ⇥ + h

  • v0 + ∆v

M−1(f0 + ∂f

∂x∆x + ∂f ∂v∆v

  • I − hM−1 ∂f

∂v − h2M−1 ∂f ∂x ⇥ ∆v = hM−1

  • f0 + h ∂f

∂xv0 ⇥ x = x0 + h(v0 + ∆v) v = v0 + ∆v

slide-23
SLIDE 23

Collision and constraints

✦ Collision is the bottleneck of simulation due to a large number of

collision points.

✦ Interpenetrating is very obvious and difficult to correct after the

fact.

✦ Use repulsion forces and and impulses to handle collision.

slide-24
SLIDE 24

Practical collision handling

✦ Bridson et al proposed an efficient

and robust method to handle collisions.

✦ Use repulsion forces to deal with

this vast majority of collisions in a simple and efficient manner.

✦ Use a more expensive but

completely robust method to stop the few that remain.

slide-25
SLIDE 25

Hybrid collision handling

✦ Beginning of time step: ✦ Integrate cloth dynamics to advance to intermediate state ✦ Compute average velocity: ✦ Apply repulsion and friction to average velocity to get ✦ Resolve collision by modifying to the final midstep velocity ✦ Update the final position: ✦ Update velocity: if collision ; otherwise

x0, v0 ¯ x1, ¯ v1 ¯ v1/2 = (¯ x1 − xn)/h ˜ v1/2 ˜ v1/2 v1/2 x1 = x0 + hv1/2 v1 = v1/2 v1 = ¯ v1

slide-26
SLIDE 26

Impulse on discrete representation

v1 v2 v3 va vb ˜ I = 2I 1 + w2

1 + w2 2 + w2 3

vnew

b

= vb − (˜ I/m)n vnew

i

= vi + wi(˜ I/m)n i = 1, 2, 3

slide-27
SLIDE 27

Repulsion

✦ Repulsion forces dramatically reduce the number of collisions by

pushing away vertices that are in close proximity.

✦ Ensure that pieces of the cloth are well separated at a distance on

the order of this cloth thickness.

✦ The repulsion force is proportional to the overlap, d, beyond the

cloth thickness h (e.g. 1mm )

  • ✦ The spring based repulsion force is modeled with a spring of

stiffness k in the normal direction, n d = h − (xb − w1x1 − w2x2 − w3x3) kd∆tn repulsion impulse =

slide-28
SLIDE 28

Repulsion

✦ Spring repulsion force is limited to a maximum when the objects

touch to avoid stiffness system. Ir = − min(∆tkd, m(0.1d ∆t − vr))

slide-29
SLIDE 29

Friction

✦ Use Coulomb’s model for friction, both static and kinetic, with a

single friction parameter μ.

✦ The normal force is defined as the negative of the repulsion force,

so the friction impulse is

✦ The tangential velocity after friction is applied:

vT = max(1 − µFN∆t/m |vT | , 0)vT µFN∆t

slide-30
SLIDE 30

Collision resolution

✦ Collision processing algorithm is activated when a collision actually

  • ccurs.

✦ If the geometry is approaching, apply a completely inelastic

repulsion impulse. Otherwise, apply a spring based repulsion force.

slide-31
SLIDE 31

Demo