Firework with particles in Vulkan

In the last months another fellow student and I implemented a firework simulation at the university. It’s not as complex as the material point method from the last simulation project I talked about on this blog but I didn’t wanted to go through the same hassle as last time either… πŸ˜…

We still used the VkCV (the Vulkan framework I am still working on) and the project is currently merging into the sample projects of the framework. So you can check it out yourself given that you have a device supporting Vulkan (works great on the Steam Deck by the way πŸ˜„).

firework demo #1

The results are nonetheless pretty good. With a little more time the smoke could have looked even better. So maybe when I find the time, I’ll try to tweak it a bit.

Most awesome aspect of this application is that different kinds of fireworks can be customized quite easily from the applications code. Because everything is structured as graph of events which can be timed in execution.

firework demo #2

The base of the simulation is a simple but effective particle simulation. But the particles receive the initial forces from the events via random distribution to them. Events can also inherit the random paths of a particle from other previous events. So it’s possible to make nested explosions with different attributes like colors, velocities or particle counts. 😎

firework demo #3

Then it’s also possible to design events with continuous particle flow like sparklers you might know from New Year’s Eve. Most particles will render trails behind them as well which can be quite long and detailed thanks to multiple geometry shader invocations (or so called instancing).

There are still some bugs and visual glitches at times. So it would still require some work to make use of it. But maybe someone else likes to think virtual fireworks could be a thing for the future as well causing less emissions potentially but still look amazing. πŸ˜‰

Read original article

Popular posts from this blog

GNUnet Messenger API: March

GNUnet Messenger API: September

GNUnet Messenger API: December