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