Docsity

Physically Based Animation - Lecture Slides | CS 418, Study notes of Computer Graphics

Toggle sidebar
bg1
Physically-Based Animation
We usually want realistic looking motion
• as part of our overall goal of photorealism
Our methods can in fact achieve fair degrees of realism
• key-framing
– if our animator makes good enough key frames
• procedural/behavioral generation
– if we write good enough scripts
• motion capture
– by definition realistic, but we need to instrument some human
Let’s consider an alternative approach to realism
• we know how objects move in the real world (as per Newton)
• given suitable physical parameters of models,
we can simulate their physical motion
Dynamics
Direct physical simulation (e.g., with Newton’s Laws)
• specify positions, masses, forces, …
• apply relevant laws to compute new positions, velocities, …
– we can express the relevant laws as differential equations
– and in general, we must solve them numerically
Keep in mind that we don’t always want to mimic nature
• exact replication of reality isn’t always artistically interesting
• so we can always invent our own physical laws
– in particular, phantom forces are particularly easy to add
or
dF F
Fma dt m m
2
=→ = =
xx

Particle Dynamics
Set of particles modeled as point masses in motion
Can write Newton’s second law as differential equation
position of particle
velocity vector of particle
mass of particle
:
:
:
i
i
i
i
i
mi
x
v
velocity
acceleration
sum of all forces acting on particle:
i
ii
ii
ii
i
d
dt
dd
dt dt
2
==
== =
x
vx
vx
ax
f

so
() ()
()
()
ii
i
i
i
tmt
t
tm
=
=
fa
f
x

i
xi
v
The Force of Gravity
First, we have to arbitrarily select a “down” direction
• here we’ll assume that the yaxis points up
Force due to gravity is simply
gravitational constant
msec on Earth
:
./
img
g
2
0
ªº
«»
=−
«»
«»
0
¬¼
≈978
f
pf3

Partial preview of the text

Download Physically Based Animation - Lecture Slides | CS 418 and more Study notes Computer Graphics in PDF only on Docsity!

Physically-Based Animation We usually want realistic looking motion

  • as part of our overall goal of photorealism

Our methods can in fact achieve fair degrees of realism

  • key-framing
    • if our animator makes good enough key frames
      • procedural/behavioral generation
        • if we write good enough scripts
          • motion capture
            • by definition realistic, but we need to instrument some human

Let’s consider an alternative approach to realism

  • we know how objects move in the real world (as per Newton)• given suitable physical parameters of models,

we can simulate their physical motion

Dynamics Direct physical simulation (e.g., with Newton’s Laws)

  • specify positions, masses, forces, …• apply relevant laws to compute new positions, velocities, …
    • we can express the relevant laws as differential equations– and in general, we must solve them numerically

Keep in mind that we don’t always want to mimic nature

  • exact replication of reality isn’t always artistically interesting• so we can always invent our own physical laws
    • in particular, phantom forces are particularly easy to add

or

d

F

F

F

ma

dt

m

m

2

x

x

Particle Dynamics Set of particles modeled as point masses in motionCan write Newton’s second law as differential equation

position of particle

velocity vector of particle mass of particle

i i

i

i

i

m

i

x v velocity acceleration

sum of all forces acting on particle

i

i

i i

i

i

i

i

d

dt

d

d

dt

dt

2

x

v

x v

x

a

x

f

so

i

i

i

i

i

t

m

t

t

t

m

f

a

f

 x

i

x

i

v

The Force of Gravity First, we have to arbitrarily select a “down” direction

  • here we’ll assume that the

y

axis points

up

Force due to gravity is simply

gravitational constant

m

sec

on Earth

i

m

g

g

2

f

Connecting Particles with Springs Suppose two particles are connected by a spring

  • spring is characterized by
    • rest length: natural length of spring when unattached– spring constant: function of material; essentially “stiffness”

Force of spring acting on particle

i

is given by Hooke’s Law

i

s

k

s

d

f

d

d

i

x

y

i

d

x

y

Try

XSpringies

[http://www.cs.rutgers.edu/~decarlo/software.html]

or

JSpringies

[http://www.jcraft.com/jspringies/]

spring constantrest length

s

k s

Damped Springs No spring oscillates forever

i

s

d

k

s

k

d d

d

f

d

d

d

i

x

y

i

d

x

y

spring constantdamping factor rest length

s d :

k k s

i

d

x

y

Attraction/Repulsion Often want to simulate attractive/repulsive particles

  • e.g., charged particles repel each other• e.g., gravitational forces between planets

Inverse-square repulsion

3

i

r

k

d

f

d

Gravitational Attraction

1

2

3

i

m m

1/G

d

f

d

Numerical Solution for Particle System We have some state vectorthat we can differentiate

1

1

n

n

t

u

x

v

x

v

1

1

1

1

1

1

1

n

n

n

n

n

n

n

t

m

m

u

x

v

x

v

v

a

v

a

f

f

v

v