I propose to develop a WebGL based real time volumetric renderer and (if time permits) use it to render physically based smoke simulation. Volume rendering is a well-known technique used for rendering data that is typically stored in the form of a grid. Some problems can be solved very efficiently and are naturally suited to be solved when space is portioned into an imaginary uniform grid structure. Some common examples are rendering clouds, smoke, fire, etc.
Generating images based on this method has been traditionally done in an offline manner, i.e. images are not generated as soon as data is available; putting it more precisely, images cannot be generated at 30 fps or greater. However, volumetric rendering technique is “embarrassingly parallel”, which means that the technique can be parallelized with little effort. The first step in the process is to generate a ray for each pixel of the image that we want to generate. Then we can gather densities along each ray independently on separate fragment shaders. The process can be further optimized if we only ray march within the region containing voxels.
I would be using 3D textures for storing the voxel data if it is supported in the latest WebGL specification. If it is not, then I would have to use 2D textures and simulate 3D textures.
Once I am done with the rendering, I would start working on creating physically based smoke simulation. I propose to use the Semi-Lagrangian method for smoke simulation, meaning I would be using parts of both a particle based (Lagrangian) approach and grid based (Eulerian) approach. The Eulerian approach enables us to parallelize smoke simulation conveniently on the GPU. Every grid element stores both scalars (like density, pressure, temperature) and vectors (like velocity) which get modified during the simulation. The densities computed in each step of the simulation would then be transferred to the volumetric renderer for visualization.
I would be referring to Chapter 30 of the book GPU Gems 3 for my implementation: