Skip to content

This project builds upon the volumetric cloud renderer I wrote last year, and adds a physical simulation of the fluid to try to mimic realistic smoke.

Notifications You must be signed in to change notification settings

StormCreeper/Smoke-Simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smoke simulation using stable fluids and vorticity confinement

Telo PHILIPPE

This project builds upon the volumetric cloud renderer I wrote last year (here), and add a physical simulation of the fluid to try to mimic realistic smoke.

How to run

  • git clone --recurse-submodule https://github.com/StormCreeper/Smoke-Simulation.git (make take some time cloning the dependencies)
  • mkdir Smoke-Simulation/build && cd Smoke-Simulation/build
  • cmake ../ (generate the compilation files)
  • cmake --build . && ./src/Smoke_Simulation.exe (compile and run the project)

How to use

There are 3 settings windows:

  • Simulation parameters
  • Rendering parameters
  • Light parameters

You can:

  • Rotate the view by scrolling with your track pad, and zoom in an out by scrolling up and down while holding left shift
  • Pause/resume the simulation using the space bar
  • Reset the simulation with the R key

How it works

I use the stable fluids method by Jos Stam (paper), and vorticity confinement to break the smoothness of the simulation (explanation here)
The simulation uses an eulerian approach (in opposition to the lagrangian approach which would simulate particles in space), and operates on a 3D texture that contains density and velocity information for the fluid at each voxel.
At each frame, several compute shaders operate on this texture, to solve numerically each step of the simulation. Finally, the 3D texture is sent to a fragment shader that renders the geometry, and the cloud volume using raymarching.

Gallery

image

image

image

image

About

This project builds upon the volumetric cloud renderer I wrote last year, and adds a physical simulation of the fluid to try to mimic realistic smoke.

Topics

Resources

Stars

Watchers

Forks