Signed Distance Functions (SDF)
Explore the concept of signed distance functions (SDF) as a 3D data representation. Understand how SDF encodes surface geometry and normals, and learn the sphere tracing algorithm for rendering. Discover the benefits and challenges of using SDFs in 3D machine learning, and implement basic SDFs using PyTorch concepts.
The signed distance function
The signed distance function (SDF) is a lesser-known but elegant 3D data representation. While PyTorch3D doesn’t directly implement signed distance functions, they’re becoming more popular due to a few interesting properties.
What is a signed distance function?
A signed distance function (SDF), is a mathematical expression of a 3D scene that computes the distance
Where:
for points inside of the surface. for points along the surface. for points outside of the surface.
Many primitive shapes can be defined with closed-form mathematical expressions as an SDF. For example, the SDF of a sphere of radius
where