← all demos · chapter 06

Chrome & liquid metal — a mirror with opinions

Metal has almost no colour of its own: it shows you the world around it. So we fake a world — sky, a bright strip, a hard dark horizon, warm ground — and every pixel of the ball bounces the camera ray off its surface and asks that world "what do I reflect?" Hard steps between bands are what read as polished; a travelling bright band on top reads as glint; wobbling the rim turns the whole thing liquid.

Watch the horizon band bend around the ball — that bending is what your eye calls "chrome." The lookup-by-normal trick here is exactly what 3D artists call a matcap (material capture), and the striped fake world is a one-dimensional environment map.

Try tweaking: LIQUID 0.5 → 0 (rigid ball) → 1 (molten) · warm every band's red channel up for gold, e.g. [252,253,255] → [255,240,180] · move the horizon from 0.50 to 0.65 · glint speed t * 0.45 → t * 1.5 (nervous sparkle) · widen the glint by lowering the * 9.

In pixel art: the same idea drawn by hand — a dark–light–dark band ramp across the form, then a 3–5 frame glint sweep where only the bright band moves. In Godot: the 2D matcap port of this exact demo is metal_chrome.gd, ready to download — scanlines reading a striped fake world; in 3D, StandardMaterial3D with metallic 1, roughness near 0 — plus a sky or ReflectionProbe, because a mirror with nothing to reflect is black. In Unity: metallic-smoothness + Reflection Probes. In Unreal: Metallic 1, low Roughness; reflection captures are placed for you in most templates. In three.js / Babylon: metalness: 1, roughness: 0 + an environment texture. Chapter 06 has the full metal entry.