Metaballs

Version 16 of 21

Toon / cel-shaded.

style exercise · style

This version

Same SDF, but three colour bands and a contour line from the minimum distance along the ray.

How this version works

At render scale 0.75, the shader traces five equal-radius spheres joined with a slightly wider smooth blend than the main SDF version. The light-facing normal selects one of three flat colours, from yellow to dark pink. Grazing surface normals become dark outlines, and rays that narrowly miss the surface also draw dark pixels against the cream background.

The trick in this version

The shader records the smallest distance encountered along each ray to detect near misses. This creates an outer contour in the same pass, without a separate edge-detection image.

Historical context · GPU

  1. 2020 · Media Molecule

    Dreams

    Media Molecule's Dreams lets players sculpt entire worlds with SDF primitives and soft blending.

  2. 2013 · Shadertoy community

    Shadertoy

    Thousands of blobs in a few hundred characters of GLSL. Metaballs become the ‘hello world’ of raymarching.

  3. 2011 · CNCD & Fairlight

    Numb Res

    CNCD & Fairlight release Numb Res at The Gathering 2011 (2nd place). A realtime SPH fluid of half a million particles on the GPU: blobs that flow, splash and are viscous, in grainy black and white.

Platform
style exercise
Era
GPU
Rendered on
GPU
Tags
3D · SDF · line-art
Sources
Dreams (2020)Numb Res (2011)