9.1 Intro to Dynamical Simulation

24
1 CS-C3100 Computer Graphics Jaakko Lehtinen 9.1 Intro to Dynamical Simulation Futuremark Corp., used with permission

Transcript of 9.1 Intro to Dynamical Simulation

1

CS-C3100 Computer Graphics Jaakko Lehtinen

9.1 Intro to Dynamical Simulation

Futu

rem

ark

Cor

p., u

sed

with

per

mis

sion

In This Video

2

• A tour of physically-inspired animation techniques

Types of Animation

3

• Keyframing • Procedural • Physically-based

– Particle Systems • Smoke, water, fire, sparks, etc. • Usually heuristic as opposed to simulation, but not always • Mass-Spring Models (Cloth)

– Continuum Mechanics (fluids, etc.), finite elements • Not in this class

– Rigid body simulation • Not in this class

CERN

Types of Animation: Physically-Based

v0

m g

4

• Assign physical properties to objects – Masses, forces, etc.

• Also procedural forces (like wind) • Simulate physics by solving equations of motion

– Rigid bodies, fluids, plastic deformation, etc. • Realistic but difficult to control

Control (Buster Keaton)

5Steamboat Bill, Jr. (1928)

“Directable Simulation”

6

• Aim to produce simulations that obey user-specified constraints – Add as-small-as-possible fictitious forces to simulation to

nudge it towards artist/TD needs • Lots of cool stuff!

• See e.g. http://www.cs.huji.ac.il/labs/cglab/projects/tdsmoke/

Modern: Let the AI Drive

7

• Ma et al., SIGGRAHP 2018, Fluid directed rigid body control using deep reinforcement learning

Types of dynamics

8

• Point

Types of dynamics

Animation by Mark Carlson 9

• Point

• Rigid body

Types of dynamics

Mark Carlson 10

• Point

• Rigid body

• Deformable body (include clothes, fluids, smoke, etc.)

We Focus on Point Dynamics

11

• Lots of points! • “Particle systems”

– Borderline between procedural and physically-based

Can Model Everything using Particles!

12

• Unified Particle Physics for Real-Time Applications (Chantanez et al. SIGGRAPH 2014) – video

13

Real-Time Particles Demo (3DMark03)

14

• 3DMark03 by Futuremark Corp. – Explosions, vapor trails, muzzle flashes are particles

Futu

rem

ark

Cor

p., u

sed

with

per

mis

sion

15

Generalizations (later)

Image Michael KassImage Witkin & Baraff 16

• Mass-spring and deformable surface dynamics – surface represented as a set of points – forces between neighbors keep the surface coherent

Take-Home Message

17

• Particle-based methods can range from pure heuristics (hacks that happen to look good) to “real” simulation

• Basics are the same: Things always boil down to integrating ODEs! – Also in the case of

grids/computational meshes

Andrew Selle et al.

Further reading

18

Cloth Video

19

Selle

. A, S

u, J.

, Irv

ing,

G. a

nd F

edki

w, R

., "R

obus

t Hig

h-R

esol

utio

n C

loth

Usi

ng P

aral

lelis

m, H

isto

ry-B

ased

Col

lisio

ns,

and

Acc

urat

e Fr

ictio

n," I

EEE

TVC

G 1

5, 3

39-3

50 (2

009)

.

Generalizations

20

• It’s not all hacks: Smoothed Particle Hydrodynamics (SPH) – A family of “real” particle-based

fluid simulation techniques.

– Fluid flow is described by the Navier-Stokes Equations, a nonlinear partial differential equation (PDE)

• SPH discretizes the fluid as small packets (particles!), and evaluates pressures and forces based on them.

Jos Stam

Müller et al. 2005

SPH Example

21

Predictive-Corrective Incompressible SPH. Barbara Solenthaler, Renato Pajarola. ACM Transactions on Graphics (SIGGRAPH), 2009

Meshless Techniques

22

• Most simulation techniques work on either regular grids or meshes constructed from triangles/tets

• PDEs defined on space are discretized on the grid.

Regular 3D grid Irregular 2D grid

Imag

es: W

ikip

edia

Meshless Techniques

23

• Most simulation techniques work on either regular grids or meshes constructed from triangles/tets

• In contrast, so-called meshless methods do not require the underlying space to be discretized – Instead, represent things using points (particles!) – They can still be “well-founded”: SPH is an example. – Another example: Point-Based

Animation of Elastic, Plastic and Melting Objects (Müller, Keiser, Nealen, Pauly, Gross, Alexa, SCA 2004)

Müller et al.

That’s all!

24

• Next time: particle systems