Posts

Showing posts with the label physics

Firework with particles in Vulkan

Image
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 ...

Material point method in Vulkan

During the lat weeks I implemented with a few other students at university a simulation for soft-body dynamics and really basic fluids using the material point method (in short MPM ). The goal was to use different sizes for individual particles which would decrease or increase their specific area of impact. It pretty much works like this: 👉 1. You have an amount of particles which you spread around to represent a specific volume (for example a sphere or a cube but it could be any mesh really). Then you give each particle a mass, velocity, position and volume. The particles will pass in their area of impact their information about mass and velocity into a grid data structure as weighted impulse and weighted mass depending on the distance between each grid cell and your particle. 👉 2. The next step is to adjust forces to the grid cells and collect data in the area of impact of each particle from cell back to the particle. Then you calculate from that the new velocity of the particl...