Weaponized Roman Candles - CS184
Name: “Weaponized Roman Candles”
Summary: We’ll create a VR game in Unity (with a heavy emphasis on custom compute and fragment shaders) in which you can shoot physically accurate fireworks from your hands.
Team Members: Anthony Villegas, Daniel He, Nicholas Jennings, Albert Wen (all from cs184)
In order to solve the differential equations related to the translational motion of firework ejecta, we will utilize explicit Euler integration and the simplest possible model of an explosion. For this model, we make the following assumptions:
Our governing equation for a single particle is based on Newton’s second law of motion:
Where is drag force and is gravity force.
As such, the time stepping to alter the particle’s position and velocity will be:
Particle position and velocity can be vectorized as opposed to assigned within several instance variables for computational speed. The firework will undergo two stages: flight before the detonation and after the detonation. During the first stage, the particles will be in a bundle and travel together. Upon detonation, the particles will move radially outward in random directions before settling on the ground. is unique to each particle and computed at each time step .
Particles that land on the floor will have landed and their positions will no longer be updated.
We’ve found several papers on real time smoke simulations, all cited in this video. We’re concerned about the smoke simulation running fast enough for the high FPS required for VR, so we will read up on the different strategies to determine the cheapest method.
Unity uses HLSL (which seems similar to GLSL from project 4) as its shader language, so both the Smoke Dynamics shader and Fragment Shader will be written in than.
The fireworks and smoke will be rendered using a fragment shader based on this one by Sebastian Lague, which uses a simplified ray tracing model to run in realtime.
The example shader will need to be modified to allow custom smoke densities (which we’ll generate using the smoke fluid dynamics from before) and multiple light sources (from the firework particles)
We will likely need to also modify the fragment shader to work with the one Unity uses for VR, which might require testing out different VR implementations (OpenXR, OculusVR, etc.) to find one that allows for shader modification
We’ll start with a simplified linear model of firework particle luminance, but if the gpu can handle it we could incorporate the thermodynamics from the firework paper to provide more physically accurate light sources
What we plan to deliver: a VR game in unity (with a heavy emphasis on custom compute and fragment shaders) in which you can shoot physically accurate fireworks from your hands.
What we hope to deliver:
Week 1 (4/11)
Week 2 (4/18)
Week 3 (4/25)
Week 4 (5/2)
Week 5 (5/9)