Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition...
Transcript of Announcements - cs.cmu.edujkh/462_f02/slides/17_anim_sim.pdf · Bounding Box Hierarchy Partition...
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
Animation--Simulation
Passive SimulationsBehavioral Animations (lightly)DynamicsActive SimulationsControl Systems
COMPUTER GRAPHICS
15-462
10/21/02
3Computer Graphics 15-462
Overview
• Animation techniques–Traditional animation–Keyframing
–Motion Capture–Simulation
–Behavioral
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
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
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
7Computer Graphics 15-462
Particle Systems
CloudsSmokeFireWaterfallsFireworks
Reeves ’83, the Wrath of KhanBatman Returns, using Reynold’s flocking algorithms
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?
9Computer Graphics 15-462
Karl Sims, Particle Dreams
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
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
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
13Computer Graphics 15-462
Spring-Mass Systems
Cloth in 2dJello in 3D
14Computer Graphics 15-462
Spring-Mass Systems
15Computer Graphics 15-462
Cloth
Many types of clothVery different propertiesNot a simple elastic surfaceWoven fabrics tend to be very stiffAnisotropic
Breen ‘95
16Computer Graphics 15-462
Cloth
Increased Resolution of Mesh+Possible Shapes+ Smoothness- Simulation time
Breen ‘95
17Computer Graphics 15-462
Modeling for Clothing
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
19Computer Graphics 15-462
Leaves in the Wind…
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
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.
22Computer Graphics 15-462
Fracture
23Computer Graphics 15-462
Smoke
Visual Simulation of Smoke, Ronald Fedkiw Jos Stam Henrik Wann JensenSIGGRAPH 2001, Computer Graphics Proceedings
24Computer Graphics 15-462
Explosions
25Computer Graphics 15-462
Explosions
Yngve, G. D., O'Brien, J. F., Hodgins, J. K., 2000,Animating Explosions. The proceedings of ACMSIGGRAPH 2000.
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?
27Computer Graphics 15-462
Dynamics, more generally
• Point mass• Spring/mass systems• Linkages of rigid bodies• Other physical phenomena
–Aerodynamics–Fluids–Fracture–Explosions
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?
29Computer Graphics 15-462
What can we simulate?
Open loop
JointsRotary (1,2,3d)
Telescoping jointsClosed loop
30Computer Graphics 15-462
Forces/Torques
GravityWindCollisions/contact
sliding
rolling
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
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
33Computer Graphics 15-462
Control Systems—how do we do something withthese mechanisms ?
Hierarchy of control:•State machines•Control actions•Low-level servos
34Computer Graphics 15-462
State Machines
35Computer Graphics 15-462
Low-level Control
.
)( θθθτ vdp kk −−=
36Computer Graphics 15-462
Control Actions
Passive strategies where possible
37Computer Graphics 15-462
Control Actions
Synergistic use of joints
38Computer Graphics 15-462
Control Actions
Reduce disturbances
39Computer Graphics 15-462
Control Actions
Physical intuition
40Computer Graphics 15-462
Control Actions
Physical intuition
41Computer Graphics 15-462
42Computer Graphics 15-462
Zordan, V. B., Hodgins, J. K., Motion capture-driven simulations thathit and react, Symposium on Computer Animation, 2002.
43Computer Graphics 15-462
44Computer Graphics 15-462
45Computer Graphics 15-462
Secondary Motion:Coupling Passive and Active Simulations
One-way coupled
Partially coupled
Fully coupled
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
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.
48Computer Graphics 15-462
Evaluation
• Side-by-side comparisons• Biomech or engineering data• Turing test?
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