Implicit Realities: Signed Distance Fields, Raymarching, and the Transmutation of Space
For over five decades, 3D graphics has been synonymous with the explicit boundary polygon mesh. Yet polygons possess inherent flaws: fixed resolution, topological tearing, and immense memory storage for micro-geometric details. This paper explores the implicit revolution spearheaded by Signed Distance Fields (SDFs) and sphere-tracing raymarching. We analyze how algebraic smooth minimum functions (smin) enable instantaneous organic blending, and how modern neural implicit representations (NeRFs, Instant-NGP) are transmuting 3D space from discrete geometric facets into continuous differentiable coordinate fields.
1. The Explicit vs. Implicit Dichotomy
In explicit geometric representations (polygon meshes, point clouds, NURBS), geometry is defined by an index of coordinates that explicitly trace the surface boundary.
In an implicit representation, geometry is never stored as coordinates. Instead, space itself is treated as a continuous mathematical scalar field $f : \mathbb{R}^3 \to \mathbb{R}$. The physical boundary of the object $\partial \Omega$ is defined as the **zero-isosurface**:
For a Signed Distance Field (SDF), the function $f(\mathbf{x})$ satisfies the **Eikonal equation** $\|\nabla f(\mathbf{x})\| = 1$, where the magnitude of the scalar output represents the exact Euclidean distance to the nearest surface point, with the sign indicating whether the point lies inside ($f < 0$) or outside ($f > 0$) the volume.
2. Sphere Tracing Raymarching (Hart 1996)
Traditional ray-polygon intersection requires testing rays against thousands of bounding boxes and planar triangles. With an SDF, John Hart's **sphere tracing** algorithm renders surfaces with unprecedented simplicity:
1. A camera ray starts at origin $\mathbf{p}_0$ with unit direction $\vec{\mathbf{d}}$. 2. The distance to the scene is evaluated: $d = f(\mathbf{p}_0)$. 3. Because $d$ is the signed distance to the nearest boundary in *any* direction, the ray can safely advance by distance $d$ along $\vec{\mathbf{d}}$ without colliding with any geometry: $$\mathbf{p}_{k+1} = \mathbf{p}_k + f(\mathbf{p}_k) \vec{\mathbf{d}}$$ 4. The process repeats until $f(\mathbf{p}_k) < \epsilon$ (surface hit) or the distance exceeds the scene horizon (miss).
3. The Smooth Boolean Revolution: Inigo Quilez's smin
Constructive Solid Geometry (CSG) on polygon meshes requires complex clipping algorithms that produce messy degenerate sliver triangles. On SDFs, standard booleans are trivial minimum and maximum operations: - **Union**: $f_{A \cup B}(\mathbf{x}) = \min(f_A(\mathbf{x}), f_B(\mathbf{x}))$ - **Intersection**: $f_{A \cap B}(\mathbf{x}) = \max(f_A(\mathbf{x}), f_B(\mathbf{x}))$ - **Difference**: $f_{A \setminus B}(\mathbf{x}) = \max(f_A(\mathbf{x}), -f_B(\mathbf{x}))$
In 2013, Inigo Quilez formalized the **polynomial smooth minimum** ($smin$), which replaces the discontinuous min function with a quadratic blending polynomial:
Where $k$ controls the blending radius. When two SDF primitives approach one another under $smin$, their distance fields blend smoothly, creating organic fluid droplet coalescence and muscular joints without a single polygon vertex.
- Hart, J. C. (1996). Sphere tracing: A geometric method for the antialiased ray tracing of implicit surfaces. The Visual Computer, 12(10), 527–545.DOI: 10.1007/s007780050030
- Quilez, I. (2013). Smooth minimum and distance functions. Inigo Quilez Articles & ShaderToy Research.Source Specification
- Müller, T., Evans, A., Schied, C., & Keller, A. (2022). Instant neural graphics primitives with a multiresolution hash encoding. ACM Transactions on Graphics (TOG), 41(4), 1–15.DOI: 10.1145/3528223.3530127