Advanced Computer Animation

38
Advanced Computer Animation

description

Advanced Computer Animation. Group Behaviors. Group Behaviors : Motivation. Many animations require natural-looking behavior from a large number of characters Flock of birds School of fish Crowd of people. What is a flock?. - PowerPoint PPT Presentation

Transcript of Advanced Computer Animation

Page 1: Advanced Computer Animation

Advanced Computer Animation

Page 2: Advanced Computer Animation

Group Behaviors

Page 3: Advanced Computer Animation

Group Behaviors : Motivation

Many animations require natural-looking behavior from a large number of characters Flock of birds School of fish Crowd of people

Page 4: Advanced Computer Animation

What is a flock?

One definition: a group of birds or mammals assembled or herded together

“A flock is simply the result of the interaction between the behaviors of individual birds.”

Page 5: Advanced Computer Animation

Why model flocking?

It looks cool Difficult to animate using traditional keyframing

or other techniques Hard to script the path Hard to handle motion constraints Hard to edit motion

Page 6: Advanced Computer Animation

Boids!

“boids” comes from “bird-oids” Similar to particle systems, but have orientation Have a geometric shape used for rendering Behavior-based motion

Page 7: Advanced Computer Animation

Boid motion

Boids have a local coordinate system The boid itself can move only in one direction (“forward” alon

g its local positive z-axis) The boid steers by rotating about its local x and y axes The boid’s local coordinate system can move and rotate free

ly within world coordinates

Page 8: Advanced Computer Animation

Modeling flocking behavior

Modeling flocking behavior Three basic rules, each of which generates an acceleration requ

est

1. Collision AvoidanceAvoid running into other boids or static obstacles

2. Velocity MatchingMatch velocity with nearby flockmates

3. Flock CenteringStay close to nearby flockmates

Page 9: Advanced Computer Animation

Flocking – 3 Behaviors (1)

Collision avoidance: avoid collisions with nearby flockmates

Page 10: Advanced Computer Animation

Flocking – 3 Behaviors (2)

Velocity matching: attempt to match velocity with nearby flockmates

Page 11: Advanced Computer Animation

Flocking – 3 Behaviors (3)

Flock centering: attempt to stay close to nearby flockmates

Page 12: Advanced Computer Animation

Flocking Neighborhood

Neighborhood defining the region in which flockmates influence a boids ste

ering characterized by a distance and an angle

• Distance: measured from the center of the boid

• Angle: measured from the boid's direction of flight.

Flockmates outside this local neighborhood are ignored.

Page 13: Advanced Computer Animation

Avoiding obstacles (1)

Force field approach Obstacles have a field of repulsion (반발력 ) Boids increasingly repulsed as they approach obstacle

Drawbacks: Approaching a force in exactly the opposite direction Flying alongside a wall

Page 14: Advanced Computer Animation

Avoiding obstacles (2)

Steer-to-avoid approach Boid only considers obstacles directly in front of it Finds silhouette edge of obstacle closest to point of eventual

impact A vector is computed that will aim the boid at a point one

body length beyond the silhouette edge

Page 15: Advanced Computer Animation

Avoiding Environmental Obstacles

Demo

simulated boid flock avoiding cylindrical obstacles (1986)

Page 17: Advanced Computer Animation

Reference (Behavior Animation)

http://www.red3d.com/cwr/boids/

Page 18: Advanced Computer Animation

Fluid Simulation

Page 19: Advanced Computer Animation

Fluid Simulation

Heightfield Fluids A very simple program Physics background Object interaction

Particle Based Fluids Simple particle systems Smoothed Particle Hydrodynamics (SPH)

Page 20: Advanced Computer Animation

Offline Fluid Simulation

State of the art is impressive! Typical grid size 2563 cells Linear system with 16 million unknowns! Raytracing (reflection / refraction / caustics) Photorealistic results 10 seconds – 50 minutes per frame!

Page 21: Advanced Computer Animation

Reducing Computation Time

Reduce resolution Simple (use same algorithms) Results look blobby and coarse, details disappear

Invent new methods Reduce dimension (e.g. from 3d to 2d) Use different resolutions for physics and appearance Simulate only in interesting, active regions (sleeping) Camera dependent level of detail (LOD) Non-physical animations for specific effects

Page 22: Advanced Computer Animation

Solutions

Procedural Water Unbounded surfaces, oceans

Heightfield Fluids Ponds, lakes

Particle Systems Splashing, spray, puddles, smoke

Page 23: Advanced Computer Animation

Procedural Animation

Simulate the effect, not the cause [Bridson07], [Yuksel07], [Fournier86], [Hinsinger02]

No limits to creativity E.g. superimpose sine waves

Difficult but not impossible Fluid – scene interaction

Page 24: Advanced Computer Animation

Heightfield Fluids

Represent fluid surface as a 2D function u(x,y) Pro: Reduction from 3D to 2D Cons: One value per (x,y) → no breaking waves

Page 25: Advanced Computer Animation

Water Rendering

Reflection

Refraction

Caustics: Cheating - Animated texture

a caustic is the envelope of light rays reflected or refracted by a curved surface or object

Page 26: Advanced Computer Animation

Particle Based Fluids

Particle systems are simple and fast Without particle-particle interaction

Spray, splashing

With particle-particle interaction Small puddles, blood, runnels Small water accumulations

Page 27: Advanced Computer Animation

Simple Particle Systems

Particles store mass, position, velocity, external forces, lifetimes

Integrate

Generated by emitters, deleted when lifetime is exceeded

Page 28: Advanced Computer Animation

Particle-Particle Interaction

Particle-Particle Interaction No interaction → decoupled system → fast For n particles O(n2) potential interactions! To reduce to linear complexity O(n)

define interaction cutoff distance h

Page 29: Advanced Computer Animation

Smoothed Particle Hydrodynamics (SPH)

Smoothed Particle Hydrodynamics Invented for the simulation of stars [Monaghan92] Often used for real-time fluids in CG [Müller03] Dividing the fluid into a set of discrete "fluid elements". Use scalar kernel function W(r)

• Wi(x) = W(|x-xi|)

Page 30: Advanced Computer Animation

Fluid Simulation Demo

www.cs.ubc.ca/~rbridson/fluidsimulation/

Page 31: Advanced Computer Animation

Reference (Fluid Simulation)

[Becker07] M. Becker and M. Teschner, Weakly compressible SPH for free surface flows, SCA 07 [Bridson07] R. Bridson et al., Curl noise for procedural fluid flow, Siggraph 07 [Fournier86] A. Fournier and W. T. Reeves. A simple model of ocean waves, SIGGRAPH 86, pages

75–84 [Hinsinger02] D. Hinsinger et al., Interactive Animation of Ocean Waves, In Proceedings of SCA 02 [Jeffrey02] A. Jeffrey, Applied Partial Differential Equations, Academic Press, ISBN 0-12-382252-1 [Monaghan92] J. J. Monaghan, Smoothed particle hydrodynamics. Annual Review of Astronomy an

d Astrophysics, 30:543–574, 1992. [Müller07] M. Müller et al., Screen Space Meshes, SCA 07. [Müller03] M. Müller et al., Particle-Based Fluid Simulation for Interactive Applications, SCA 03, pag

es 154-159. [O’Brien95] J. O’Brien and J. Hodgins, Dynamic simulation of splashing fluids, In Computer Animati

on 95, pages 198–205 [Premoze03] S. Premoze et al., Particle based simulation of fluids, Eurographics 03, pages 401-410 [Teschner03] M. Teschner et al., Optimized Spatial Hashing for Collision Detection of Deformable O

bjects, VMV 03 [Thuerey07] N. Thuerey et al., Real-time Breaking Waves for Shallow Water Simulations Pacfific Gr

aphics 07 [Yuksel07] Cem Yuksel et al., Wave Particles, Siggraph 07

Page 32: Advanced Computer Animation

Hair Simulation

Page 33: Advanced Computer Animation

Motivation

Hair animation used in movies, games, virtual reality, etc. Important for representing virtual humans

Problem due to complexity Human head has over 100,000 strands of hair Computation time for simulation and rendering is costly

Page 34: Advanced Computer Animation

Overview

Hair Modeling [Magnenat-Thalmann, et al. 2000] Hair Rendering

• Hair color, shadows, lighting, transparency, and anti-aliasing Hair Shape Modeling (hairstyle)

• Geometry of the hair – Shape specification• Density, distribution, and orientation of hair

Hair Simulation• Dynamic Simulation• Collision Detection

Page 35: Advanced Computer Animation

Hair Modeling

Factors to consider Speed vs. Appearance Short vs. Long Wavy vs. Straight

Movie: Final FantasyVideo Game: Lara Croft - Tomb Raider: Angel of Darkness

Choose hair model based on desired outcome

Page 36: Advanced Computer Animation

Hair Simulation

Physics of dynamic simulation Control motion Different styles

Geometric representation of hair Individual strands Wisps Strips

Collision detection and response Hair-Object Interactions Hair-Hair Interactions

(a) hair strip, (b) hair cluster, (c) hair strand

Page 37: Advanced Computer Animation

Hair Simulation Demo

http://www.cs.unc.edu/~geom/HSLOD/

Page 38: Advanced Computer Animation

References (Hair Simulation)

K. Anjyo, Y. Usami, and T. Kurihara. A simple method for extracting the natural beauty of hair. Computer Graphics, 26(2):111-120, 1992.

T. Kurihara, K. Anjyo, and D. Thalmann. Hair animation with collision detection. In Models and Techniques in Computer Animation, pages 128-38. Springer-Verlag, 1993.

C. K. Koh and Z. Huang. A simple physics model to animate human hair modeled in 2d strips in real time. Proc. of Eurographics Workshop on Animation and Simulation, 2001.

E. Plante, M. Cani, and P. Poulin. A layered wisp model for simulating interactions inside long hair. Proc. of Eurographics Workshop on Animation and Simulation, 2001.

K. Ward, M. C. Lin, J. Lee, S. Fisher, and D. Macri. Modeling hair using level of detail representations. Proc. of Computer Animation and Social Agents, 2003.

K. Ward and M. C. Lin. Adaptive grouping and subdivision for simulating hair dynamics. Proc. of Pacific Graphics, 2003.