Weaponized Roman Candles - CS184
Our project can be divided into three main parts 1) the physics-based firework simulation, 2) smoke simulation, 3) and VR rendering and interaction. The three main phases we are tackling in this firework simulation are ascent, explosion, and descent. We are using Unity's compute shaders to simulate the fireworks and smoke, and then rendering that using a custom fragment shader.
Fireworks: The firework particles are simualated using custom physics code by solving ordinary differential equations via Euler integration. The explosion and fragment settling physics are complete. Each particle (ejecta) is hashed so that they can be used as light sources in the fragment shader. The fragment shader and ejecta hasher are essentially finished, but one thing to note is that the fragment shaders do not work with compute buffers. So instead, we used a 3d texture to mark the closest particle to all points in the scene close enough to be lit by a particle.
Smoke: We can currently add a sphere of smoke to the screen and diffuse it using our custom compute shaders. Using the Navier Stokes equation for fluid dynamics, we are in the process of implementing advection based on velocity, temperature, and pressure fields; and also bouyant and vorticity force. Where is velocity, is pressure, is density, and are other external forces.
Point light rendering on the smoke has been implemented as well.
VR: The VR rendering currently works, but it is still being debugged as it requires us to reduce the detail of the smoke to run well.
Here is an image of our implementation pipeline:
We have been able to use 50 ejecta so far for the firework simulation physics:
Here is an example of our smoke density and diffusion over time:
Smoke and point-light rendering system. We can see how the smoke occludes objects and how it reacts with the ejecta light and directional light:
The individual portions of the firework, smoke, and VR rendering parts of the project are very much on schedule; by the end of this week we have planned to have all the individual parts working standalone. There are a few things remaining for us to do.
Fireworks: The fragment shader and ejecta hasher might need to some changes once we integrate other parts of the project. Adding supersampling rays with Monte Carlo integration will depend on how we interact between the data structures of the fireworks and smoke. Fireworks physics could be optimized via vectorization or compute shaders.
Smoke: Our smoke and pointlight rendering system are still being implemented, but is nearly complete. While we can add density and diffuse, advection based on temperature, pressure, and velocity still needs to be implemented.
VR: VR rendering system works. VR interaction has not yet been implemented and has been put on the backburner for now as we ensure that the base system works well.