Find Related products on Amazon

Shop on Amazon

The Wrong Way to Use a Signed Distance Function (SDF)

Published on: 2025-05-23 08:10:07

Disclaimer: there’s nothing wrong with using a sdf this way. Recently, my good friend Mike Brondbjerg posted this on Twitter: Dark Matter: 50,000 particles passing through a field until they hit a hidden sphere. By varying the distance travelled each step, the collisions are more / less accurate, so creating a nice fuzziness around the spheres. #generative #design #creativecommuting #creativecoding pic.twitter.com/gmFEV7fCwk — Mike Brondbjerg (@mikebrondbjerg) January 15, 2020 You can follow along and see how this idea is evolving into the beautiful, elegant line drawings that are the hallmark of his style. Spheres Mike’s post gave me an idea, a way to introduce a concept I like to use in some of my work: signed distance functions. Sdfs are more commonly associated with raytracing and shaders, and by far the best source to learn about them in that context is Inigo Quilez, of Shadertoy fame: https://iquilezles.org/. But there is a delightfully wrong way to use a sdf. Their primary ... Read full article.