Generating Signed Distance Fields from Triangle Meshes using Vulkan Compute Shaders
This project aims to explore various techniques at computing Signed Distance Fields (SDF) from triangle
meshes in C++ and using the Vulkan graphics and compute API. These techniques were compared in terms of
efficiency, performance and memory usage.
The raymarching algorithm was used to render the generated SDF, the project also covers various improvements to the algorithm. For example "Over-Relaxation", which would allow the ray to overshoot to reduce the number of steps it may take. And the "Coarse Cone Tracing" algorithm which raymarched cones instead of individual rays to reduce the number of steps through empty space.
The main SDF generation approach I settled on was voxel grids, where each cell stores its distance to the mesh. When utilising the jump flooding algorithm, SDF generation could occur in under a second with a mesh that contains over 14k triangles.
Binary Space Partitioning (BSP) Trees are also explored, where I experimented with different types of partitioning planes and ways to render the tree using raymarching to try and achieve a more accurate SDF mesh.
This was my undergraduate final dissertation project, alongside the implementation a full report was created, which details initial research, project methodology and an analysis of the different generation techniques used.
You can read the full report here!
Here is a short showcase of the final project: