#include <williamwhitehouse.dev>

-home- -proj- -blog-

Generating Signed Distance Fields (SDF) from Triangle Meshes using Vulkan Compute


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.

Raymarching was used to render the generated SDF, the project also implements various improvements to this 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 marches 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 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!


SDF Bunny SDF Bunny SDF Bunny
SDF Bunny SDF Bunny