Comp259 / Spring 2002 Samir Naik 2/6/02

Slides:



Advertisements
Similar presentations
Time averages and ensemble averages
Advertisements

Numeric Integration Methods Jim Van Verth Red Storm Entertainment
Four Five Physics Simulators for a Human Body Chris Hecker definition six, inc.
Formal Computational Skills
Rigid Body Dynamics Jim Van Verth
Physics 430: Lecture 17 Examples of Lagrange’s Equations
1cs533d-winter-2005 Notes  Assignment 1 is not out yet :-)  courses/533d-winter-2005.
Predicting the Drape of Woven Cloth Using Interactive Particles David E. Breen Donald H. House Michael J. Wonzy.
A Digital Laboratory “In the real world, this could eventually mean that most chemical experiments are conducted inside the silicon of chips instead of.
1 Computer Graphics Physical simulation for animation Case study: The jello cube The Jello Cube Mass-Spring System Collision Detection Integrators.
LINCS: A Linear Constraint Solver for Molecular Simulations Berk Hess, Hemk Bekker, Herman J.C.Berendsen, Johannes G.E.M.Fraaije Journal of Computational.
Integration Techniques
Dynamics of Articulated Robots Kris Hauser CS B659: Principles of Intelligent Robot Motion Spring 2013.
1cs533d-winter-2005 Notes  Please read O'Brien and Hodgins, "Graphical modeling and animation of brittle fracture", SIGGRAPH '99 O'Brien, Bargteil and.
Notes Assignment questions… cs533d-winter-2005.
1cs533d-term Notes  Braino in this lecture’s notes about last lectures bending energy…
1Notes. 2 Building implicit surfaces  Simplest examples: a plane, a sphere  Can do unions and intersections with min and max  This works great for.
1Notes. 2 Triangle intersection  Many, many ways to do this  Most robust (and one of the fastest) is to do it based on determinants  For vectors a,b,c.
MAT 594CM S10Fundamentals of Spatial ComputingAngus Forbes Week 2 : Dynamics & Numerical Methods Goal : To write a simple physics simulation Topics: Intro.
1cs533d-winter-2005 Notes  More optional reading on web for collision detection.
Interactive Animation of Structured Deformable Objects Mathieu Desbrun Peter Schroder Alan Barr.
Ch. 7: Dynamics.
Game Physics Chris Miles. The Goal To learn how to create game objects with realistic physics models To learn how to simulate aspects of reality in order.
1 Geometry A line in 3D space is represented by  S is a point on the line, and V is the direction along which the line runs  Any point P on the line.
UNC Chapel Hill S. Redon - M. C. Lin Rigid body dynamics II Solving the dynamics problems.
Stable Cloth Animation By Matthew Fisher. Overview Choose Underlying Model Define Equations of State Integrate Equations of State –Deal With Explosions.
Articulated Body Dynamics The Basics Comp 768 October 23, 2007 Will Moss.
1cs533d-winter-2005 Notes  More reading on web site Baraff & Witkin’s classic cloth paper Grinspun et al. on bending Optional: Teran et al. on FVM in.
1cs533d-term Notes  list Even if you’re just auditing!
Cloth Simulation CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005.
1cs533d-term Notes. 2 Poisson Ratio  Real materials are essentially incompressible (for large deformation - neglecting foams and other weird composites…)
1cs533d-winter-2005 Notes  Assignment 2 instability - don’t worry about it right now  Please read D. Baraff, “Fast contact force computation for nonpenetrating.
1Notes. 2 Time integration for particles  Back to the ODE problem, either  Accuracy, stability, and ease-of- implementation are main issues  Obviously.
1cs426-winter-2008 Notes. 2 Velocity fields  Velocity field could be a combination of pre-designed velocity elements E.g. explosions, vortices, …  Or.
Dynamics 101 Jim Van Verth Red Storm Entertainment
3.7. O THER G AME P HYSICS A PPROACHES Overview of other game engine physics approaches.
Writing a Hair Dynamics Solver Tae-Yong Kim Rhythm & Hues Studios
Faking Dynamics of Cloth Animation for Animated Films Fabian Di Fiore Expertise Centre for Digital Media Hasselt University, Belgium
Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
Erin Catto Blizzard Entertainment Numerical Integration.
Haptics and Virtual Reality
Numerical Integration and Rigid Body Dynamics for Potential Field Planners David Johnson.
Large Steps in Cloth Simulation - SIGGRAPH 98 박 강 수박 강 수.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Optimization & Constraints Add mention of global techiques Add mention of calculus.
 d.s. wu 1 Penalty Methods for Contact Resolution interactive contact resolution that usually works pi david s wu.
Advanced Computer Graphics Rigid Body Simulation Spring 2002 Professor Brogan.
University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Particle Systems.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Physics for Games Spring 2012.
CS 527 – Computer AnimationOctober 17, 2006 Estimating Cloth Simulation Parameters from Video Kiran S. Bhat, Christopher D. Twigg, Jessica K. Hodgins,
Particle Systems. Applications Particle systems are broadly defined for: Explosion Cloth Fluid And more… It is integrated into many animation software,
CS274 Spring 01 Lecture 7 Copyright © Mark Meyer Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
Game Technology Animation V Generate motion of objects using numerical simulation methods Physically Based Animation.
Rick Parent - CIS682 Rigid Body Dynamics simulate basic physics of an object subject to forces Keyframing can be tedious - especially to get ‘realism’
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Computer Graphics Imaging Ying Zhu Georgia State University Lecture 29 Soft Bodies and Rigid Bodies.
Physics of Hair Maxim Bovykin.
Advanced Computer Graphics Rigid Body Simulation
Physically-Based Motion Synthesis in Computer Graphics
Computer Animation Ying Zhu Georgia State University
3.7. Other Game Physics Approaches
Performing a Computer Simulation using C++
Advanced Computer Graphics Spring 2008
Motion in Real and Virtual Worlds
Synthesis of Motion from Simple Animations
Physically Based Modeling -Overview-
Computer Animation Algorithms and Techniques
GPAT – Chapter 7 Physics.
The Harmonic Oscillator
Presentation transcript:

Comp259 / Spring 2002 Samir Naik 2/6/02 Cloth Simulation Comp259 / Spring 2002 Samir Naik 2/6/02

Overview Applications of cloth Cloth Modeling Cloth Dynamics and Simulation Demos

Applications of cloth Movies, games, VR. Try to find a room without cloth! We can usually just texture map static objects Try to find a person not wearing clothes! Texture mapping clothes doesn’t look good on animated characters Need to simulate movement of the cloth

Motivation Texture mapped clothes vs. simulated

Cloth Modeling D.E. Breen, D.H. House and M.J. Wozny, “Predicting the Drape of Woven Cloth Using Interacting Particles,” SIGGRAPH '94 Conference Proceedings, (Orlando, FL, July 1994) pp. 365-372 Getting the final configuration (drape) of cloth to look right. Static, not dynamic modeling. What would this shirt look like made from cotton rather than silk? Would this dress have a more pleasing drape if made from silk rather than light wool?

Cloth Modeling Example of draping cloth over objects

Particle-based model Cloth fibers and crossings Approximated by mass-spring particle system.

Particle-based model

Particle-based model Categorizing thread motion Energy equation Thread collision Thread stretching Out-of-plane bending Trellising (shearing) Energy equation Ui = Urepel i + Ustretch i + Ubend i + Utrellis i + Ugrav i

Energy equation Energy equation Ui = Urepel i + Ustretch i + Ubend i + Utrellis i + Ugrav I Urepel. Artifical repulsion energy, keeps particles a minimum distance apart. Simple approach to collision detection. Ustretch. Energy of tensile strain between each particle and it’s 4 neighbors Ubend. Energy due to out of plane bending. Utrellis. Energy due to bending around a thread crossing. Ugrav. Potential energy due to gravity.

Repel and stretch

{ { Repel and Stretch Repel forces Stretch forces rij rij> rij { rij> rij { rij>

Repel and stretch Repel and stretch energy function are stiff since most cloth doesn’t deform too much.

Energy equations Repel and stretch equations are about the same for all types of cloth Can derive equations from trial and error Bend/shear equations are different for different types of cloth (wool, cotton, etc). Changes. Derive equations from empirical mechanical data.

Kawabata system Physically measuring cloth properties. Approximate actual cloth energy functions with simpler functions. Use piecewise linear and quadratic polynomials that interpolate inflection points of real curve

Bending equation

Bending For each particle i, Mi is the set containing 6 ij angles i1

Bending Bend energy equation comes from measurement

Bending Bend energy in one direction

Trellising (shearing)

Trellising(shearing) Trellising energy equation also comes from measurment

Trellising (shearing) Shear in one direction

Results

Results

Cloth Dynamics Breen wanted cloth to look good in static poses Time step could be very small because simulation time was done off line VR/games want cloth to look good when a user is interacting with it. Need simulation to be real time, so we need larger time steps (dt >.03 sec)

Integration Purpose of integration Given the known position x(to) and velocity v(to) at time to Find a new position x(t0+h) and velocity v(to+h) at time t0+h

Explicit integration Forward Euler’s method Based solely on conditions at to Takes no notice of wildly changing derivatives and proceeds forward blindly

Explicit integration BAD! Step size must be really small or simulation will blow up. Could use RK4 Better smoothing function Force is sampled more times during time step. A little more stable, but still has same problems Collisions introduce discontinuties, and RK4 doesn’t like discontinuities.

Explicit integration DEMO - when things blow up Clothy by Jeff Lander

Implicit integration Backwards Euler method

Backwards Euler Start from output state (x0+dx, v0+dv) and use a forwards Euler step to run the system backward in time. i.e. taking the step -h(v(t0+h), f(x(t0+h),v(t0+h))) brings you back to (x0,v0) Forces an output state whose derivative at least points back to where you came from. Sanity checking!

Backwards Euler We still consider forces to be constant within time step But now output state will have consistent forces that will not give rise to instabilities

Backwards Euler We must compute f (x0+dx, v0+dv) To avoid iteration do a first order approximation Substituting this in we get

Backwards Euler Grouping all v terms together Solve for v and x

Baraff/Witkin David Baraff, Andrew Witkin, “Large Steps in Cloth Simulation,” SIGGRAPH '98 Conference Proceedings, (Orlando, FL, July 1998) pp. 43-54

Cloth Energy Breen describes cloth behavior as energy U, which was to be minimized Baraff describes behavior in terms of a grid of conditions can be simple: C(x) = |x - | or more complicated: Cij(x) = we want C(x) == 0

Forces Energy function k is a stiffness constant Force function

Force derivatives Need force derivatives for backwards Euler With respect to x K is a sparse matrix With respect to y Since C(x) doesn’t depend on v, the matrix f/v is zero

Stretch/compresson Particles have fixed plane coordinate (ui,vi) w(u,v) is a linear function over each triangle maps from plane to world space Stretch can be measured by examining derivatives wu= w/u wv= w/v

Stretch/compression What is this function “w”? Approximate as a linear function over triangle x1 x2 World coords (u1, v1) Plane coords (u2, v2)

Stretch/compression Condition for stretch energy a is area of triangle in uv (plane) coords bu and bv are usually 1, but can be changed to lengthen and widen certain parts of cloth i.e. the cuff on a shirt sleeve

Shear and bend forces Inner product should be minimized wv wu = 0 != 0

Damping Damping should only occur in direction of systems velocity This looks similar to our force equation

Derivative of damping force With respect to x drop term for symmetry’s sake With respect to v

Mass Modification Tricky way to constrain points Make mass infinity. It won’t move! We actually have a 3x3 inverse mass matrix so mass is actually a vector can constrain motion in each axis separately e.g. no acceleration in z axis

Results

Verlet Integration Implicit Velocity-less Update step store current position x and prev position x* Update step x = x-x* + ah2 = x-x* + h2(f0/M)

Verlet integration Update step x-x* is approximate velocity x = x-x* + h2(f0/M) x-x* is approximate velocity Since velocity is implicitly given, it is hard for velocity and position to come out of sync. Damping x = .99(x-x*) + h2(f0/M)

Verlet cloth Thomas Jakobsen, “Advanced Character Physics”, GDC 2001 Simplify everything by constraining particles by rods not springs At each iteration, rod goes back to it’s rest length Solve by local iteration Each constraint tries to satisfy itself, let the other constraints worry about themselves

Verlet cloth Pros Cons fast stable not physically based loss of energy in system can’t minimize bending/shearing easily

Verlet cloth Demo