motivation movie game engineering introduction ideally looks good fast simulation looks good?...
TRANSCRIPT
![Page 1: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/1.jpg)
![Page 2: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/2.jpg)
Motivation
Movie Game Engineering
![Page 3: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/3.jpg)
Introduction
Ideally Looks good Fast simulation
Looks good? Look plausible Doesn’t need to be exactly correct doesn’t suffer from excessive numerical
dissipation
![Page 4: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/4.jpg)
Overview
Simulation Compressible/Imcompressible Equation Vortex particle method Using octree data structure
Rendering Thick smoke: plain particles Thin smoke: adaptive particles Using Compensated Ray Marching
![Page 5: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/5.jpg)
Compressible Fluids Yngve, G. D., O'Brien, J. F., Hodgins, J. K., 2000,
Animating Explosions. The proceedings of ACM SIGGRAPH 2000, New Orleans, July 23-28, pp. 29-36.
![Page 6: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/6.jpg)
Operator Splitting
Stam used the technique in his Stable Fluids paper, 1999.
Allows us to solve the Navier-Stokes equation in Parts.
As long as each part is stable the technique will be stable.
![Page 7: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/7.jpg)
Semi-Lagrangian Convection
Trace each point p in the field backwards in time. The new velocity at x is therefore the velocity that the particle had a time step ago at the old location.
![Page 8: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/8.jpg)
Smoke Viscous Diffusion
In the simulation of smoke, it is reasonable to consider the fluid inviscid. Therefore this term is zero and need not be solved for.
In fact, the implicit solver that is used will take energy away from the system anyway, so there is a numerical dampening that can look like a non-zero viscosity.
![Page 9: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/9.jpg)
Body Forces
Gravity, user forces, and object interaction.
The visible smoke is from a density field.
Areas of high density fall in the direction of gravity.
Heat moves against gravity (hot air rises).
![Page 10: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/10.jpg)
Incompressibility
At each time step we start with a velocity field that is divergence free. We need this to be true at the end of the time step because the fluid is incompressible.
After solving for convection, and body forces the velocity field is not divergence free.
![Page 11: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/11.jpg)
Incompressibility
Fedkiw, R., Stam, J. and Jensen, H.W.,"Visual Simulation of Smoke",SIGGRAPH 2001, 23-30 (2001).
![Page 12: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/12.jpg)
Incompressible Euler Equations
self-advection Forces
incompressible
(Navier-Stokes without viscosity)
![Page 13: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/13.jpg)
Additional Equations
smoke’sdensity
temperature
We now know all the finite differences we need to add the forces for heat and density…
![Page 14: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/14.jpg)
Vorticity Confinement
The numerical dissipation, and the coarse grid size, cause the fine scale detail of turbulent swirling smoke to vanish.
Identify where the curl is highest, and add back in a rotational force there.
“Vorticity Confinement” force preserves
swirling nature of fluids.
![Page 15: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/15.jpg)
What is vorticity?
A measure of the local rotation in a fluid flow.
![Page 16: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/16.jpg)
Pressure Boundary Conditions A Neumann boundary condition is a
restriction on the derivative of a function.
![Page 17: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/17.jpg)
Velocity Boundary Condition A Dirichlet boundary condition is a
restriction on the value of a function.
![Page 18: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/18.jpg)
Vorticity Confinement
![Page 19: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/19.jpg)
Vorticity Confinement
![Page 20: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/20.jpg)
Vorticity Confinement
![Page 21: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/21.jpg)
Solving the System
Need to calculate:
Start with initial state
Calculate new velocity fields
New state:
![Page 22: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/22.jpg)
Smoke Simulation
While (simulating) Get external forces (if any) from UI Get density/heat sources (from UI or init
grid cells) Update velocity Update density Update temperature Display density
![Page 23: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/23.jpg)
Smoke Simulation
While (simulating) Get external forces (if any) from UI Get density/heat sources (from UI or init
grid cells) Update velocity Update density Update temperature Display density
![Page 24: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/24.jpg)
Update Velocity
Equation: First term:
Advection Move the fluid through its velocity field
(Du/Dt=0) Second term:
external forces Final term:
pressure update
![Page 25: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/25.jpg)
Update Velocity
Add external forces (fbuoy + forces from UI + fconf)
Advection (semi-lagrangian step – trace particles back)
Pressure update (solve linear system)
![Page 26: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/26.jpg)
Smoke Simulation
While (simulating) Get external forces (if any) from UI Get density/heat sources (from UI or init
grid cells) Update velocity Update density Update temperature Display density
![Page 27: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/27.jpg)
Update density
Equation First term:
Advection Move the temperature through velocity field
Second term: Diffusion
Can skip this term
Second term: external sources
![Page 28: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/28.jpg)
Update density
Add Sources (pick grid cells or from UI)
Advection (semi-lagrangian step – trace particles back)
Diffusion (solve linear system – can skip this step)
![Page 29: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/29.jpg)
Smoke Simulation
While (simulating) Get external forces (if any) from UI Get density/heat sources (from UI or init
grid cells) Update velocity Update density Update temperature Display density
![Page 30: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/30.jpg)
Update temperature
Equation First term:
Advection Move the temperature through velocity
field
Second term: Diffusion
Can skip this term
![Page 31: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/31.jpg)
Update Temperature
Add Sources (grid cells or objects or UI)
Advection (semi-lagrangian step – trace particles back)
Diffusion (solve linear system – can skip this step)
![Page 32: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/32.jpg)
Smoke Simulation
While (simulating) Get external forces (if any) from UI Get density/heat sources (from UI or init
grid cells) Update velocity Update density Update temperature Display density
![Page 33: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/33.jpg)
Display density
Use any approach you want Visualize the density field: just opengl render a bunch of cubes
(corresponding to grid cells) that have alpha values based on how dense the smoke is.
![Page 34: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/34.jpg)
Numerical Dissipation
‘ Stable Fluids’ method dampens the flow Typical with semi- Lagrangian methods
Improve using “Vorticity Confinement” force
![Page 35: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/35.jpg)
Total Forces
User supplied fields
Buoyancy force
New confinement force
![Page 36: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/36.jpg)
Results
![Page 37: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/37.jpg)
Results
![Page 38: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/38.jpg)
Other Methods
Vortex particle method Using octree data structure
![Page 39: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/39.jpg)
Vortex particle method-Lagrangian primitives
Curves carry the vorticity
Each local vortex induces a weighted rotation
dx
xp
xp3
4
)(
ω
v dlxp
xp
3
4
)(
ω
v
![Page 40: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/40.jpg)
Vortex particle method-Lagrangian primitives
Curves carry the vorticity
Each local vortex induces a weighted rotation
![Page 41: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/41.jpg)
Method of simulation
Vortex particles (for motion) organized as curves. = tangent
Smoke particles (for visualisation)
Curves carry vortices Vortices induce a velocity field velocity field deforms curves & smoke
At every step: Advect the curves Stretch Advect the smoke
![Page 42: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/42.jpg)
Method of simulation
Vortex particles (for motion) organized as curves. = tangent
Smoke particles (for visualisation)
Curves carry vortices Vortices induce a velocity field velocity field deforms curves & smoke
At every step: Advect the curves Stretch Advect the smoke
![Page 43: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/43.jpg)
Method of simulation
Vortex particles (for motion) organized as curves. = tangent
Smoke particles (for visualisation)
Curves carry vortices Vortices induce a velocity field velocity field deforms curves & smoke
At every step: Advect the curves Stretch Advect the smoke
![Page 44: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/44.jpg)
Video
![Page 45: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/45.jpg)
Smoke Rendering Thick smoke: plain particles Thin smoke: adaptive particles [AN05]
accumulate stretching
01nTOT JJJJ ... 01nTOT JJJJ ...
![Page 46: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/46.jpg)
Smoke Rendering
Thin smoke behaves like a surface
[ William Brennan ][ William Brennan ]
ee
nn
ll
eJJn 1T eJJn 1T
![Page 47: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/47.jpg)
Smoke Rendering
Using Compensated Ray Marching
![Page 48: Motivation Movie Game Engineering Introduction Ideally Looks good Fast simulation Looks good? Look plausible Doesn’t need to be exactly](https://reader030.vdocument.in/reader030/viewer/2022032600/56649db25503460f94aa2081/html5/thumbnails/48.jpg)
References