Metaballs

Version 20 of 21

Colour-blended primitives.

SDF, today · today

This version

A sphere, a rounded cube and a rounded pyramid, each in a soft primary colour. Where they blob together their colours mix like paint: red and yellow make orange, yellow and blue make green, red and blue make purple.

How this version works

A moving sphere, rotating rounded box and rotating rounded pyramid are joined using an exponential smooth minimum. At render scale 0.6, rays advance by 60 per cent of the estimated distance, with a limit of 160 steps. Distance-based colour weights blend red, yellow and blue, then explicit pairwise adjustments introduce orange, green and purple. Diffuse light, a sky term, one normal-offset occlusion sample, specular light and a Fresnel rim finish the surface.

The trick in this version

Geometry blending and colour blending use separate exponential weights. The paint-like secondary colours are deliberately programmed corrections, not a physical pigment simulation.

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
SDF, today
Era
GPU
Rendered on
GPU
Tags
3D · SDF · colour mix
Sources
Dreams (2020)Numb Res (2011)