The original goal of my honours thesis was to build a 3d sand simulation, based on a fluid simulation. However, when I couldn't find an open source simulator that I liked, the project evolved into building my own fluid simulator. The fluid simulator is a conversion of NVIDIA's DirectX SDK’s “Smoke” sample code to OpenGL. All of the fluid simulation calculations are run in shaders on the GPU and then it's rendered to the screen.

The fluid simulation uses a grid-based method. To simulate the fluid, the information about the fluid's properties are stored in a 3d texture and each pixel in the texture is one cell in the grid. By using textures, the fluid properties can be easily accessed by GLSL shaders. The fluid properties are updated every time step by a series of shaders which run each step of the fluid simulation calculations.

The simulator has a variety of rendering methods, including a conversion of the raycasting renderer from NVIDIA's DirectX SDK (mentioned previously), and a marching cubes renderer, based on the sample code from a technical blog.

The code uses C++, OpenGL and GLSL shaders and I developed it to be cross platform. However it was buggy demo code which I did not have time to address during my thesis, since the code itself was not being assessed.



Video Demo

Using: C++, OpenGL, GLSL
Status: Thesis completed. Would like to work on it more sometime...

Thesis B Report: PDF
Thesis blog:
Demo Notes: Open Office | Microsoft Powerpoint | Handout PDF