Mike Turitzin
banner
miketuritzin.bsky.social
Mike Turitzin
@miketuritzin.bsky.social
Building a game/engine based on signed distance fields

~ Past: rendering lead @figma.com, indie VR dev, founder @ Workflowy, search backend @ Google, Quake modder

miketuritzin.com
And an illustration of the bilinear interpolation process in 2D.

bsky.app/profile/mike...
Demo of bilinear interpolation of SDF samples:

- Negative (interior) samples of the analytic SDF are blue, positive (exterior) samples are orange.

- Circles are drawn around samples to show distance magnitude.

- Intermediate bilinear interp samples / segments are drawn.

1/
November 11, 2025 at 11:17 PM
The equivalent in 2D (yellow line is the reconstructed curve).

bsky.app/profile/mike...
Making an animation illustrating sparse allocation of SDF bricks:

- White line is the analytic SDF curve.

- Sparsely-allocated cells (and distance samples) are shaded.

- Yellow line in the reconstructed SDF curve from cached samples (via bilinear interpolation of distances).
November 11, 2025 at 11:17 PM
Yeah, I'm going to explain this more in the video I'm making, but the idea is to cache the distance samples near the curve/surface and store them in a texture atlas for sampling when rendering.
November 6, 2025 at 5:55 PM
- The reconstructed distance is inexact because bilinear interpolation produces a distance lower bound AND the smooth blend does the same. This makes finding points on the curve less efficient, but doesn't change the result.

(These animations are for a video I'm making!)

/end
November 5, 2025 at 10:25 PM
- The reconstructed distance is highlighted in magenta.

- As before, the white curve is the analytic SDF and the yellow curve is what's reconstructed from bilinear interpolation.

2/
November 5, 2025 at 10:25 PM
There's a lot to say about that, but at a high level, I'm using a "brickmap" that stores a pointer in each cell (which can be null) to the brick, which is allocated from an atlas. And then I use a clipmap centered around the camera with a number of levels for LOD.
October 31, 2025 at 7:09 PM
Yep, my engine is SDF-based.
October 29, 2025 at 8:19 PM
(In case you were wondering, the character depicted is Sir Potato Face.)
October 28, 2025 at 6:38 PM
Indeed
October 23, 2025 at 4:12 AM
It works! The dumping code is very short, and no loading code is needed (other than the code I copy/paste).
October 16, 2025 at 7:58 PM
Sadly I don't think I will be able to model exactly Mr Potato Head as I removed ellipsoids from my engine.
October 14, 2025 at 9:55 PM
Another funny thing is that the overlay in the UI here looks intentional but is actually just the debug rendering of the capsule shape :D
October 14, 2025 at 7:59 PM
Good ideas. I haven't thought about the "mound" part too much yet but you're right there is definitely interesting design space there.
October 10, 2025 at 8:01 PM
Ha, good question. The end game is ... a game. This started as a technical exploration, and right now I'm putting together a video on what I've built so far, so I'm re-exploring some older stuff for the video.

Then it's full steam on game dev!
October 10, 2025 at 7:05 PM