3D Scenes
Whole scenes in 3D from one fragment shader: a ray marched through every pixel, surfaces found by their distance, then lit and shaded.
Take them in this order: each one uses what the ones before it showed. The same shaders, newest first, are on the topic’s page.
Sign in and the exercises you pass are marked here. Nothing is kept otherwise.
- Step 1 of 6
Floating 3D Scene
A sphere, a ring and a tumbling box floating in the dark, drawn by marching a ray through every pixel and lit by which way each surface faces, with a chord in which every shape has a voice.
Teaches: Raymarching, normals, basic lighting
Builds on Flowing Color Field, Morphing Shapes
Read the page Open in the playground
6 exercises
- A scene of shapes Make this step · passed
- Which way the surface faces Make this step · passed
- Light Make this step · passed
- Kiln light Finish it · passed
- Match the sliders Find the values · passed
- Find the bug Put it right · passed
- Step 2 of 6
Molten Metaballs
Blobs of molten metal drifting over a kiln floor and melting into each other wherever they meet, with soft-edged shadows, creases darkened by ambient occlusion, and a sound in which every blob sings as it starts to melt.
Teaches: 3D smooth blending, soft shadows, ambient occlusion
Builds on Flowing Color Field, Morphing Shapes, Floating 3D Scene, Cracked Clay
Read the page Open in the playground
5 exercises
- Soft shadows Make this step · passed
- Ambient occlusion Make this step · passed
- Molten Finish it · passed
- Match the sliders Find the values · passed
- Find the bug Put it right · passed
- Step 3 of 6
Kiln Fire
A flame with no surface, drawn by walking each ray through rising 3D noise in small steps, adding the light the fire gives off and losing what it swallows, over a floor that breathes with its flicker, with a sound of roaring and crackling noise.
Teaches: Volume raymarching through noise, emission
Builds on Flowing Color Field, Floating 3D Scene, Cracked Clay
Read the page Open in the playground
6 exercises
- Light that adds up Make this step · passed
- Noise in the flame Make this step · passed
- Light that hides what's behind Make this step · passed
- Kiln fire Finish it · passed
- Match the sliders Find the values · passed
- Find the bug Put it right · passed
- Step 4 of 6
Ember Tunnel
An endless winding tunnel of stone rings, flown through forever, drawn with a single ring that space is folded onto again and again; haze hides the far end, and the rings that are on fire light the stone and glow through the fog, with a sound of air rushing past each ring and a note from every burning one.
Teaches: Domain repetition, fog, an endless fly-through
Builds on Floating 3D Scene, Kaleidoscope, Cracked Clay
Read the page Open in the playground
6 exercises
- Repeat it forever Make this step · passed
- Fog Make this step · passed
- A winding tunnel Make this step · passed
- Ember tunnel Finish it · passed
- Match the sliders Find the values · passed
- Find the bug Put it right · passed
- Step 5 of 6
Endless Terrain
Mountains that never end, flown over at dusk toward a low sun. The land is a single function, a height for every point on the ground made of fractal noise; each pixel walks a ray over it until the ray drops below, the sun lights and shadows what it finds, the sky fills the rest, and distance fades it all into a glowing haze. You can steer it, with the pointer or the arrow keys.
Teaches: Heightfield raymarching, sky, sun, distance fog
Builds on Flowing Color Field, Floating 3D Scene, Cracked Clay, Molten Metaballs, Ember Tunnel
Read the page Open in the playground
6 exercises
- Sunlight Make this step · passed
- Sky, sun and haze Make this step · passed
- Flying Make this step · passed
- Endless terrain Finish it · passed
- Match the sliders Find the values · passed
- Find the bug Put it right · passed
- Step 6 of 6
Black Hole
A black hole with a disk of hot gas around it, seen from close by. Every pixel's ray is walked outwards and bent towards the hole at each step, so the far side of the disk shows over and under the shadow and the stars behind are drawn into a ring. The gas orbits near the speed of light, so the side coming towards you is beamed white-hot and the side going away falls to ember.
Teaches: Rays bent by gravity, an accretion disk, Doppler color
Builds on Floating 3D Scene, Cracked Clay, Kiln Fire, Glass Orb, Spinning Planet, Spiral Galaxy
Read the page Open in the playground
5 exercises
- Gravity bends the ray Make this step · passed
- The disk Make this step · passed
- Doppler Make this step · passed
- Match the sliders Find the values · passed
- Find the bug Put it right · passed
Other paths Start here Noise & Texture Shapes & Symmetry Particles & Simulation Light & Materials Atmosphere Fractals Geometry Sound & Rhythm





