1 / 48

Smoke Simulation

Smoke Simulation. Motivation. Movie Game Engineering. Introduction. Ideally Looks good Fast simulation Looks good ? Look plausible Doesn’t need to be exactly correct doesn’t suffer from excessive numerical dissipation. Overview. Simulation Compressible/Imcompressible Equation

phallon
Download Presentation

Smoke Simulation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Smoke Simulation

  2. Motivation • Movie • Game • Engineering

  3. Introduction • Ideally • Looks good • Fast simulation • Looks good? • Look plausible • Doesn’t need to be exactly correct • doesn’t suffer from excessive numerical dissipation

  4. 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

  5. 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.

  6. 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.

  7. 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.

  8. 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.

  9. 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).

  10. 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.

  11. Incompressibility • Fedkiw, R., Stam, J. and Jensen, H.W.,"Visual Simulation of Smoke",SIGGRAPH 2001, 23-30 (2001).

  12. Incompressible Euler Equations self-advection Forces incompressible (Navier-Stokes without viscosity)

  13. Additional Equations We now know all the finite differences we need to add the forces for heat and density… smoke’s density temperature

  14. 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.

  15. What is vorticity? • A measure of the local rotation in a fluid flow.

  16. Pressure Boundary Conditions • A Neumann boundary condition is a restriction on the derivative of a function.

  17. Velocity Boundary Condition • A Dirichlet boundary condition is a restriction on the value of a function.

  18. Vorticity Confinement

  19. Vorticity Confinement

  20. Vorticity Confinement

  21. Solving the System • Need to calculate: • Start with initial state • Calculate new velocity fields • New state:

  22. 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

  23. 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

  24. Update Velocity • Equation: • First term: • Advection • Move the fluid through its velocity field (Du/Dt=0) • Second term: • external forces • Final term: • pressure update

  25. Update Velocity • Add external forces (fbuoy + forces from UI + fconf) • Advection (semi-lagrangian step – trace particles back) • Pressure update (solve linear system)

  26. 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

  27. Update density • Equation • First term: • Advection • Move the temperature through velocity field • Second term: • Diffusion • Can skip this term • Second term: • external sources

  28. 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)

  29. 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

  30. Update temperature • Equation • First term: • Advection • Move the temperature through velocity field • Second term: • Diffusion • Can skip this term

  31. 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)

  32. 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

  33. 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.

  34. Numerical Dissipation • ‘Stable Fluids’ method dampens the flow • Typical with semi- Lagrangianmethods • Improve using • “Vorticity Confinement” force

  35. Total Forces • User supplied fields • Buoyancy force • New confinement force

  36. Results

  37. Results

  38. Other Methods • Vortex particle method • Using octree data structure

  39. Vortex particle method-Lagrangian primitives • Curves carry the vorticity • Each local vortex induces a weighted rotation

  40. Vortex particle method-Lagrangian primitives • Curves carry the vorticity • Each local vortex induces a weighted rotation

  41. 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

  42. 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

  43. 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

  44. Video

  45. Smoke Rendering • Thick smoke: plain particles • Thin smoke: adaptive particles[AN05] • accumulate stretching

  46. l n e Smoke Rendering • Thin smoke behaves like a surface [ William Brennan ]

  47. Smoke Rendering • Using Compensated Ray Marching

  48. References

More Related