Signed Distance Fields

The mathematical foundation of Soyuz.

What is an SDF?

A Signed Distance Field (SDF) is a function that takes any point in 3D space and returns the distance to the nearest surface:

  • Positive values = outside the shape
  • Negative values = inside the shape
  • Zero = exactly on the surface

Why SDFs?

  • Boolean operations - Union, subtract, intersect are simple math
  • Smooth blending - Organic shapes emerge naturally
  • Resolution independent - The math works at any scale
  • GPU friendly - Raymarching renders SDFs efficiently

From SDF to Mesh

SDFs are great for modeling and previewing, but games and 3D software need triangle meshes. Soyuz uses Marching Cubes to convert SDFs to meshes for export.