[TUTORIAL] Volumetric Rendering: Signed Distance Fields (Patreon)
Published:
2016-07-28 09:59:19
Imported:
2026-06
haven't archived this post yet. have a subscription? use the importer!
Content
The way most modern 3D engines – such as Unity – handle geometries is using triangles. Every objects, no matter how complex, must be composed by those primitive triangles. Despite being the de-facto standard in computer graphics, there are objects which cannot be represented with triangles alone. Spheres and all other curved geometries are impossible to tessellate with flat entities. It is indeed true that we can approximate a sphere by covering its surface with lot of small triangles, but this comes at the cost of adding more primitives to draw.
Alternative ways to represent geometries exist. One of this uses signed distance functions, which are mathematical descriptions of the objects we want to represent. When you replace the geometry of a sphere with its very equation, you have suddenly removed any approximation error from your 3D engine. You can think of signed distance fields as the SVG equivalent of triangles. You can scale up and zoom SDF geometries without ever losing detail. A sphere will always be smooth, regardless how close you are to its edges.
Alternative ways to represent geometries exist. One of this uses signed distance functions, which are mathematical descriptions of the objects we want to represent. When you replace the geometry of a sphere with its very equation, you have suddenly removed any approximation error from your 3D engine. You can think of signed distance fields as the SVG equivalent of triangles. You can scale up and zoom SDF geometries without ever losing detail. A sphere will always be smooth, regardless how close you are to its edges.
- Introduction
- Part 1. SDF Sphere
- Part 2. Union and Intersection
- Part 3. SDF Box
- Part 4. Shape Blending
- Part 5. Smooth Union
- Part 6. SDF Algebra
- Conclusion
You can find all the articles on Volumetric Randering here:
- Part 1: Volumetric Rendering
- Part 2: Raymarching
- Part 3: Surface Shading
- Part 4: Signed Distance Fields
- Part 5: Ambient Occlusion
- Part 6: Hard and Soft Shadows
- Part 7: Volume Raycasting
As always, thank you for your generous support! ♥
Files
Previews only