Physics Bases Animation Flashcards
2 common approaches to physics-based animation
Particle systems - fire, smoke, waves
Mass spring models - ideal for cloth animation
What are particle systems
A way of modelling dynamics
Lots of points described by their current state and position
No interaction between particles
Modelling by Ordinary Differential Equations
What are attributes of a particle
position, initial velocity, entry angle, lifespan, colour, etc
Simplest case of point dynamics
Each particle is independent
Often have a lifetime or age
If there is enough randomness at the emitter, we can get nice effects (eg sand, water, fire)
What are mass spring models
Used to model deformable objects like cloth
The surface is represented as a set of points
The forces between neighbouring points keeps the surface coherent
(Not independent like the particle system)
Solving ODEs, Newtonian approach
Common second order ODE
F= ma
Can be rewritten:
F = m . d2x / dt2
(acceleration is the second derivative of position)
Can then solve using dv/dt = F / m
Eulers method
h is small step size
t1 = t0 + h
X1 = X0 + h f(X0,t0)
X0 is position at time 0, and we are taking a step forward via h f(X0,t0) to X1
If we are at X(t) we want to know where the position will be after infinite number of small scale steps
f(X,t) is the external force (eg a wind)
multiplied by h gives the particle movement
How can Eulers method be inaccurate
When moving along a tangent it becomes inaccurate
Eg when forming a circle, it always spirals outwards
What is a Force
Changes the motion of a system
When there are no forces, motion continues uniformly in a straight line
Depends on position, time and velocity
For point masses, forces are vectors
Types of forces: gravity, spring
What is Viscous Damping
Dampening force on a particle determines its velocity
It opposes the motion - eg Honey or wind resistance
It removes energy so the system can settle
A small amount of damping can stabilise a solver
Too much damping makes the emotion appear like glue or honey
What are spatial fields
Externally specified forces or velocity fields
The force on particle i depends only on its position
These add energy
These spatial fields can also be procedural
Modeling a hair
Each particle is linked to two other particles except the end points
We try to keep the forces that separate the two particles in the link constant
Forces are equal but just in different direction
- Essentially connected via a spring
Then we define a string force using hooke’s law
Force of a spring
is always proportional to rest length L0
Hooke’s law
K is the stiffness value
Fs = -kx
Fs = spring force
k = spring constant
x = spring stretch or compression
Modeling a string
Springs link the particles
Drag them to make sure they preserve the length of the string - there are still oscillations that at some point stabilise at a rest state