Mesh Mortal Kombat: Real-time voxelized soft-body destruction
Tim McGraw · 2024
Mesh Mortal Kombat uses a new non-physical voxel constraint based on Gram-Schmidt orthonormalization within a position-based dynamics (PBD) framework. After the input mesh is voxelized, we create 8 PBD particles which are constrained to approximate each voxel. Breakable face-to-face constraints between voxels, which are also based on Gram-Schmidt, are created for pairs of neighboring voxels. The regular voxel grid allows efficient parallel processing in a compute shader using Gauss-Seidel iterations with only 1 voxel constraint partition and 3 face constraint partitions. This allows us to minimize the number of compute shader dispatches and memory barriers per frame. Destruction is achieved by disabling face-to-face voxel constraints when the strain limit is exceeded. Anisotropic materials can be created by setting different strain limits on x-, y-, and z- faces. This allows meshes to be peeled into sheets, shredded into strips, or fractured into voxels.