I made this for my physically-based animation course, CS 888. For this project, I implemented a full fluid solver, with the help of Bridson’s “Fluid-simulation for computer graphics”. Then, I extended the solver to simulate fire as described in “Physically-based modeling and animation of fire” by Nguyen, Fedkiw and Jensen.
In the video, you can see the two phases of fluid, the fuel — rendered in blue — and the flames. In both 2D and 3D, the flames are rendered using a blackbody radiation equation based on the temperature of the flames. In 3D, I implemented a basic voxel-marching raycaster. The colour of the pixel is simply rendered based on the temperature of the first voxel that the ray hits that contains fire.
The code for this project can be found here: https://github.com/svanleeuwen/fire-simulator
Further details regarding the fluid simulation can be read in the project report: