Chapter 3 : Computer Animation (continued) Chapter 3: Computer Animation Reminder: Descriptive animation Describes a single motion, with manual control Ex: direct kinematics with key-frames, inverse kinematics Advantage: Skilled artist can create what they want Problems: Defining a new motion is very tedious The user gets no help towards realism Objects may intersect each other, etc. Towards methods that generate motion? Procedural animation : Examples The user defines the laws of motion Examples : Physical laws (gravity, collisions ) Behavioral laws (artificial intelligence) The system generates motion from The initial conditions The laws to be applied «Procedural animation» Describes a family of motions Indirect control Procedural virtual ocean Particle systems (fire, smoke, rain, bees, fishes ) Points : X (x,y,z), V (v x, v y, v z ) V given by a law Birth and death of particles
Physically-based models Physically-based models Laws of motion from mechanics Model (mass etc) + initial conditions + applied forces Motion & deformations Advantage: a help towards realism! useful when dynamics plays an important part easier for passive models! Examples : Toy-Story, Shrek 5 Standard animation algorithm Loop: t := t+ t For each object 1. Compute new speed (use law & applied forces) 2. Compute new position & deformation 3. Display For each pair of objects 1. Detect collisions 2. Compute new applied forces Exercise: - Where is the approximation? - Can you improve the loop? 6 Physically-based models Which laws of motion do we need? We need Rigid bodies Solids Articulated solids Ex: Rolling ball? Lamps? Wire? 7 8
We need Deformable bodies Main motions laws used in Computer Graphics Structured Elasticity Deformation under forces Back to equilibrium Visco-elasticity Speed of deformation Fractures If distortion is too large Ex : ball, organ, cloth, paper Un-structured Neighbors change! Plasticity Absorbs deformations Fluids Navier-Stokes Ex : mud, clay, liquids, smoke... Point-based physics Model [ m, X, V ] Law: F = Forces = m A = m dv/dt Solid physics Model [m, I inertia matrix, X, V, angular speed ] Laws: F = m (dv/dt) T = I (d /dt) + I Difficulty: representation of orientations! 10 Main motions laws used in Computer Graphics Research example: Animating fractures Articulated solids Solid dynamics + unknown internal forces at joints! (Lagrange multipliers..) m,i [James O Brien SIGGRAPH 2002] Deformable models F Linear & non-linear elasticity, plasticity Navier-Stokes for fluids NB: Eulerian vs Lagrangian discretization [Terzopoulos 87] 12
Research example: Visco-elastic models Research example: Visco-elastic models Cauchy : linear deformation law (force is a linear function of displacement) - OK for small displacements - but rotations produce forces! - the object inflates!! Solutions: Green s non-linear tensor : costly Apply Cauchy in local frames: real-time! [Müller et al. 02, 04] 13 Without versus with the detection of inverted finite elements. Research example: Liquid Navier stokes +Eulerian grid + level set (implicit) Research example: Liquid Vortex particles +Eulerian grid [Foster & Fedkiw 2001] [Enright et al. 2002] Bi-phasic fluids with vortex particles [Coquerelle, Cottet, Cani 2006]
This year Do it all with point-based physics! Physically-based model: Particles [ m, X, V ] Motion law : Forces = m A Animation algorithm At each time step, for each particle V(t+dt) = V(t) + F(t)/m dt X(t+dt) = X(t) + V(t) dt From a model to another one Choose the appropriate forces Render with adapted geometry! Integration: Explicit Euler : may diverge! Implicit integration (next year) Lots of simple objects Physically-based particle systems Example : gravels, cereals Gravity Spheres for collisions detection Random individual geometry Exercise : animating autumn Leaves = particle + local frame Wind primitives Gravity Propose an adequate friction force Structured deformable bodies Articulated solids 1D, 2D, 3D mass-spring networks Articulated solids? Joint = spring of zero length m,i Spring: F = k (x-x0) (where x is length) Angular spring: F = k (α-α0) Damping: or air friction: F = - v F Exercise : How would you model this using masses and springs? Drawbacks compared to more accurate physics?
Unstructured objects Unstructured objects [Clavet, Beaudoin, Poulin, SCA 2005] Particle systems inspired from molecular dynamics Lennard-Jones attraction/repulsion forces force distance [Tonensen91] [Desbrun98] Exercise: Hair animation 1. Propose models for straight hair, and for wavy or curly hair 2. List the applied forces 3. Which issues will need to be solved to increase realism? Solution 1. Models for hair 2. Elastic forces, gravity, friction 3. Main issues: Changes of length, rest states Avoid interpenetrations, get hair volume