Soft Body Simulations In Vulkan


Undergrad dissertation project in simulating soft bodies in the Vulkan API

 
 
  • Date: 25/06/202

    Languages: C++

    Keywords: Vulkan, Dissertation, Physics

 

Overview

This is my dissertation project and entailed creating a soft body system on top of the Vulkan API. The project has a framework in Vulkan in which multiple models loaded in from a .OBJ file can be rendered, manipulated and textured using an image file. The soft body system on top of this framework uses the mass-spring system where a model is represented by a network of masses connected together by weightless springs. During build time this network is generated from a model by creating an internal grid structure of masses (the image on the left) as well as masses at each of the model’s vertices. Each mass is then connected to the n nearest other masses by springs.

The soft body behaviour was achieved using a series of equations to simulate the different forces applied to the model this included: gravity, a spring force (an adaption of Hooke’s Law), and damping force to keep the system stable.

For the soft body collisions, an initial broad phase collision was performed using a dynamic axis-aligned bounding box (AABB) intersection test. Then a narrow phase test was performed by finding the intersecting triangles of the two models. These triangles are stored inside a bounding volume hierarchy for optimisation.


 

Explanation Video

A video explaining and demonstrating the soft body simulation

 
 
Previous
Previous

Light Field Renderer - Masters Disseration

Next
Next

Infiltraitors