Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition...

49
1 Computer Graphics 15-462 Announcements • Assignment 3 is out – due Tuesday November 5 th at midnight • Midterm on Thursday • Midterm grades are posted—beware, they are artificially high because we haven’t had any exams yet. Cutoff was just 90/80/70. • Programming Assignment 3 and Written assignment 3 are graded

Transcript of Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition...

Page 1: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

1Computer Graphics 15-462

Announcements

• Assignment 3 is out – due Tuesday November 5th atmidnight

• Midterm on Thursday• Midterm grades are posted—beware, they are artificially

high because we haven’t had any exams yet. Cutoffwas just 90/80/70.

• Programming Assignment 3 and Written assignment 3are graded

Page 2: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

Animation--Simulation

Passive SimulationsBehavioral Animations (lightly)DynamicsActive SimulationsControl Systems

COMPUTER GRAPHICS

15-462

10/21/02

Page 3: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

3Computer Graphics 15-462

Overview

• Animation techniques–Traditional animation–Keyframing

–Motion Capture–Simulation

–Behavioral

Page 4: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

4Computer Graphics 15-462

Dynamic Simulation

• Realistic motion• High-level control• Design of control routines• Physics of passive systems• Control for the animator?

Antz, PDI/Dreamworks

Page 5: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

5Computer Graphics 15-462

Passive—no muscles or motors

Active—internal sources of energy

user

graphics

model

numericalintegrator

state

initialconditions Particle systems

LeavesWater sprayClothing

Running humanTrotting dogSwimming fish

user

desiredbehavior

forces andtorques model

numericalintegrator

graphics

state

control

Page 6: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

6Computer Graphics 15-462

Dynamics

• Generate motion by specifying mass and force, applyphysical laws (e.g., Newton’s laws)–particles–soft objects–rigid bodies

• Simulates physical phenomena–gravity–momentum (inertia)–collisions–friction–fluid flow (drag, turbulence, ...)–solidity, flexibility, elasticity–fracture

Maya Dynamics

Page 7: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

7Computer Graphics 15-462

Particle Systems

CloudsSmokeFireWaterfallsFireworks

Reeves ’83, the Wrath of KhanBatman Returns, using Reynold’s flocking algorithms

Page 8: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

8Computer Graphics 15-462

Particle Systems

Creation—number, initial condiionsposition/velocity

randomlysurface of shapevertex of polygonal object

sizecolortransparencyshapelifetime

DeletionUpdate of position/velocity

translationvortex

Rendering style – motion blur, compositing

What control handlesdo we want/need?

Page 9: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

9Computer Graphics 15-462

Karl Sims, Particle Dreams

Page 10: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

10Computer Graphics 15-462

Behavioral Animation

• Define rules for the way an object behaves and interacts–models respond to their changing environment–programs implement the rules

• Classic example: “boids” (Craig Reynolds)–object’s motion is a simple function of nearby objects

» Stay near neighbors» Don’t run into them» Move in this general direction

–emergent behavior: flocking–really just a particle system(!)

• Lion King wildebeest stampede

Page 11: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

11Computer Graphics 15-462

Equations of Motion

tVV

PP

tAVV

gA

∆++=

∆+==

2

''

'

),,( zyxP =g

V

Integration: accuracy improves as step size decreasesbut never a perfect match

Page 12: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

12Computer Graphics 15-462

More generally have other forces

• Unary–Gravity f = mg–Viscous drag: f=-kv

• N-ary–Spring: f=ke

• Spatial interaction forces–Collisions with objects in the environment

NNVVV )(2' •−=

V N

Page 13: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

13Computer Graphics 15-462

Spring-Mass Systems

Cloth in 2dJello in 3D

Page 14: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

14Computer Graphics 15-462

Spring-Mass Systems

Page 15: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

15Computer Graphics 15-462

Cloth

Many types of clothVery different propertiesNot a simple elastic surfaceWoven fabrics tend to be very stiffAnisotropic

Breen ‘95

Page 16: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

16Computer Graphics 15-462

Cloth

Increased Resolution of Mesh+Possible Shapes+ Smoothness- Simulation time

Breen ‘95

Page 17: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

17Computer Graphics 15-462

Modeling for Clothing

Page 18: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

18Computer Graphics 15-462

Collisions for Clothing

Potentially VERY expensiveBounding Box Hierarchy

Partition space or objectsAvoid expensive primitive tests

Polygons Primitive Level

IntermediateLevel(s)

Top Level

Page 19: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

19Computer Graphics 15-462

Leaves in the Wind…

Page 20: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

20Computer Graphics 15-462

Leaves in the Wind…

uniform sink source vortex

Add together to make interesting fields…

N

ttt

nnn

tn

AvF

vAF

FFF

ανα

==

+=

Wejchert&Haumann, ‘91

Page 21: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

21Computer Graphics 15-462

Fracture

O'Brien, J. F., Hodgins, J. K., (1999) Graphical Modelingand Animation of Brittle Fracture. The proceedings ofACM SIGGRAPH 99, Los Angeles, California.

Page 22: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

22Computer Graphics 15-462

Fracture

Page 23: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

23Computer Graphics 15-462

Smoke

Visual Simulation of Smoke, Ronald Fedkiw Jos Stam Henrik Wann JensenSIGGRAPH 2001, Computer Graphics Proceedings

Page 24: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

24Computer Graphics 15-462

Explosions

Page 25: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

25Computer Graphics 15-462

Explosions

Yngve, G. D., O'Brien, J. F., Hodgins, J. K., 2000,Animating Explosions. The proceedings of ACMSIGGRAPH 2000.

Page 26: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

26Computer Graphics 15-462

The Challenges of Passive Simulation

• Accurate for the situation• What pieces of the physics are necessary

for appearance?• How to give the animator control?

Page 27: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

27Computer Graphics 15-462

Dynamics, more generally

• Point mass• Spring/mass systems• Linkages of rigid bodies• Other physical phenomena

–Aerodynamics–Fluids–Fracture–Explosions

Page 28: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

28Computer Graphics 15-462

Forward and Inverse Dynamics

forces andtorques accelerations

Forward: given forces and torques what is the motion?

Inverse: given prescribed motion what are theforces and torques?

Page 29: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

29Computer Graphics 15-462

What can we simulate?

Open loop

JointsRotary (1,2,3d)

Telescoping jointsClosed loop

Page 30: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

30Computer Graphics 15-462

Forces/Torques

GravityWindCollisions/contact

sliding

rolling

Page 31: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

31Computer Graphics 15-462

System Description

MassCenter of massMoment of inertia: formula for simple objects

zI

xI

yI

2

)3(12

1

2

22

mrI

LrmII

z

yx

=

+==

Calculate from polygonal model(closed) for more complicated shapes

Page 32: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

32Computer Graphics 15-462

Commercially Available Simulation CodeLink: mass, moment of inertiaJoints: degrees of freedom

distance from center of mass of links

Code for equations of motionHooks for applying forces, torques

Page 33: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

33Computer Graphics 15-462

Control Systems—how do we do something withthese mechanisms ?

Hierarchy of control:•State machines•Control actions•Low-level servos

Page 34: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

34Computer Graphics 15-462

State Machines

Page 35: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

35Computer Graphics 15-462

Low-level Control

.

)( θθθτ vdp kk −−=

Page 36: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

36Computer Graphics 15-462

Control Actions

Passive strategies where possible

Page 37: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

37Computer Graphics 15-462

Control Actions

Synergistic use of joints

Page 38: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

38Computer Graphics 15-462

Control Actions

Reduce disturbances

Page 39: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

39Computer Graphics 15-462

Control Actions

Physical intuition

Page 40: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

40Computer Graphics 15-462

Control Actions

Physical intuition

Page 41: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

41Computer Graphics 15-462

Page 42: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

42Computer Graphics 15-462

Zordan, V. B., Hodgins, J. K., Motion capture-driven simulations thathit and react, Symposium on Computer Animation, 2002.

Page 43: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

43Computer Graphics 15-462

Page 44: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

44Computer Graphics 15-462

Page 45: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

45Computer Graphics 15-462

Secondary Motion:Coupling Passive and Active Simulations

One-way coupled

Partially coupled

Fully coupled

Page 46: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

46Computer Graphics 15-462

The Challenges of Active Simulation

• Control laws are hard to design• Automatic design hasn’t worked for complex

systems (yet)

• Need a larger variety of behaviors• Need to be able to handle new characters easily

• Higher-level behaviors• Realtime performance

Page 47: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

47Computer Graphics 15-462

Perceptual Hacks

• How good a job do you have to do?–Objects don’t go through walls

• Viewers can be pretty oblivious of things like incorrectbounces

• And we can’t predict exactly how something shouldbreak

This shift of emphasis from accuracy to fast-and-looks-good is what distinguishes physically based CG from“real” engineering.

Page 48: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

48Computer Graphics 15-462

Evaluation

• Side-by-side comparisons• Biomech or engineering data• Turing test?

Page 49: Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition space or objects Avoid expensive primitive tests Polygons Primitive Level ... Animating

49Computer Graphics 15-462

Announcements

• Assignment 3 is out – due Tuesday November 5th atmidnight

• Midterm on Thursday• Midterm grades are posted—beware, they are artificially

high because we haven’t had any exams yet. Cutoffwas just 90/80/70.

• Programming Assignment 3 and Written Assignment 3are graded