cloth simulation what make cloth hard to simulate
play

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


  1. Cloth Simulation

  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.

  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

  4. Woven fabric

  5. Knit fabric

  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.

  7. Simulating different materials

  8. World space ✦ Model clothes as triangular mesh of particles in � R 3 ✦ The geometry state of clothes is x ∈ R 3 n

  9. Material space ✦ Treat cloth as a 2-dimensional manifold embedded in . � R 3 ✦ 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).

  10. Equations of motion ✦ Equation of motion: � M¨ x = f int + f ext � mass matrix , R 3 n X3 n M � acceleration of particles, R 3 n x ¨ gravity and contact force, R 3 n f ext � f int cloth internal forces, R 3 n � ✦ Internal forces are derived from potential energy function E ( x ).

  11. Potential energy � ✦ The negative gradient of each potential function defines a type of internal force: � − ∂ E � ∂ x ✦ General form of E(x): � E ( x ) = k 2 C ( x ) T C ( x ) � ✦ The internal force can be computed by T T = − k ∂ C ( x ) f = − ∂ E C ( x ) ∂ x ∂ x

  12. Internal forces ✦ In general, clothes resists motion in four directions stretch compress shear bend in-plane motion out-of-plane motion

  13. Stretch force ✦ Stretch/compress force can be measured by deformation gradient. � ✦ Assuming w is a linear function over each triangle, the gradient of w is constant within each triangle. � ✦ Define energy function using

  14. Shear force ✦ Shear force can be measured by � w T u w v ✦ When the w u and w v are orthogonal, shear force is zero. � ✦ Define energy function for shear force using

  15. Bend force ✦ Bend force is measured between a pair of adjacent triangles. � ✦ Using two geometry relations, we can solve for the bening angle. � sin θ = ( n 1 × n 2 ) · e � cos θ = n 1 · n 2 � ✦ Define energy function using e C ( x ) = θ n 2 n 1 θ

  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. C ( x ) ∂ C ( x ) d = − k d ˙ ∂ x

  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.

  18. Buckling model ✦ Replace bend and compression forces with a single nonlinear model. � ✦ Details in Ko and Choi SIGGRAPH 2002.

  19. Stable but responsive cloth

  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.

  21. Implicit integration ✦ Transfer a second-order ODE to the first-order form. � � x � ⇥ � ⇥ d v = M − 1 f ( x , v ) v dt � ✦ Compute the next state based on the derivative evaluated at the next state. � x � x 0 ⇥ ⇥ � ⇥ v = + h M − 1 f ( x , v ) v v 0 derivative at � next state

  22. Linearize derivative function ✦ Linearize derivative function about the current state. � � ⇥ � v ∂ M − 1 f ( x , v ) � ⇥ � ⇥ � ⇥ ∆ x v v 0 = + � x M − 1 f ( x , v ) M − 1 f 0 ∆ v ⇥ � ∂ v ✦ Compute next state by implicit integration � � ⇥ � ⇥ � ⇥ v 0 + ∆ v x x 0 = + h � M − 1 ( f 0 + ∂ f ∂ x ∆ x + ∂ f v v 0 ∂ v ∆ v ✦ Solve for linear system � � ⇥ � ⇥ I − h M − 1 ∂ f ∂ v − h 2 M − 1 ∂ f f 0 + h ∂ f ∆ v = h M − 1 ∂ xv 0 � ∂ x ✦ Update state x = x 0 + h ( v 0 + ∆ v ) v = v 0 + ∆ v

  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.

  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.

  25. Hybrid collision handling ✦ Beginning of time step: � x 0 , v 0 ✦ Integrate cloth dynamics to advance to intermediate state � x 1 , ¯ v 1 ¯ v 1 / 2 = (¯ x 1 − x n ) /h ✦ Compute average velocity: � ¯ ✦ Apply repulsion and friction to average velocity to get � v 1 / 2 ˜ ✦ Resolve collision by modifying to the final midstep velocity � v 1 / 2 v 1 / 2 ˜ x 1 = x 0 + h v 1 / 2 ✦ Update the final position: � v 1 = ¯ v 1 = v 1 / 2 ✦ Update velocity: if collision ; otherwise v 1

  26. Impulse on discrete representation 2 I ˜ I = 1 + w 2 1 + w 2 2 + w 2 3 v 3 v b = v i + w i (˜ v new v a I/m ) n i v 1 i = 1 , 2 , 3 v 2 = v b − (˜ v new I/m ) n b

  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 ) � d = h − ( x b − w 1 x 1 − w 2 x 2 − w 3 x 3 ) � ✦ The spring based repulsion force is modeled with a spring of stiffness k in the normal direction, n repulsion impulse = kd ∆ t n

  28. Repulsion ✦ Spring repulsion force is limited to a maximum when the objects touch to avoid stiffness system. I r = − min( ∆ tkd, m (0 . 1 d ∆ t − v r ))

  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 � µF N ∆ t ✦ The tangential velocity after friction is applied: v T = max(1 − µF N ∆ t/m , 0) v T | v T |

  30. Collision resolution ✦ Collision processing algorithm is activated when a collision actually occurs. � ✦ If the geometry is approaching, apply a completely inelastic repulsion impulse. Otherwise, apply a spring based repulsion force.

  31. Demo

Recommend


More recommend