Light & Materials

How surfaces treat light: glass and water that bend it, glazes that shine, and the reflections and highlights that make a material read as what it is.

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.

  1. Step 1 of 5

    Glass Orb

    An orb of glass on a floor of kiln tiles, with an ember tumbling inside it. Where a ray meets the glass it splits in two, one part reflected like a mirror and the rest bent into the glass, and Fresnel decides how much goes each way. Inside, the bent ray is marched again until it finds the ember or the far wall, where it bends out and sees the room upside down.

    Teaches: Refraction, reflection, Fresnel

    Builds on Floating 3D Scene, Cracked Clay

    5 exercises
    1. A mirror Make this step
    2. Bent light Make this step
    3. Glass orb Finish it
    4. Match the sliders Find the values
    5. Find the bug Put it right
  2. Step 2 of 5

    Pottery Wheel

    A fluted pot turning on a potter's wheel in a kiln. The pot is one curve spun round an axis, a solid of revolution, so a foot, a belly, a neck and a lip are a few lines of a profile. Flutes and throwing lines are carved into it by letting the radius depend on the angle too, and a twist winds the flutes into a spiral. Its glaze mirrors the kiln by Fresnel's share, catches the light in a highlight, and pools darker in the grooves; the foot stays bare clay.

    Teaches: Solids of revolution, twisting, a glaze material

    Builds on Floating 3D Scene, Cracked Clay, Glass Orb

    5 exercises
    1. Carved, and turning Make this step
    2. The twist Make this step
    3. Pottery wheel Finish it
    4. Match the sliders Find the values
    5. Find the bug Put it right
  3. Step 3 of 5

    Rain on Glass

    A misted window at night with a street of lights behind it, out of focus. Each drop on the glass is a small lens that holds the street sharp and upside down; drops stick and slip down, wiping clear trails through the mist, and now and then lightning lights the sky.

    Teaches: Refraction through drops on a window, a blurred world behind

    Builds on Flowing Color Field, Cracked Clay

    2 exercises
    1. Match the sliders Find the values
    2. Find the bug Put it right
  4. Step 4 of 5

    Stained Glass

    A pointed window in a stone wall with the sun behind it. Its panes are Voronoi cells held in lead, each a color of glass that lets through only its own share of the light, less the thicker it is. Traced back towards the sun, each point of the floor finds the pane its light came through, so the window lies on the floor in colored light and slides as the sun moves; dust in the air shows the same light as beams. Clouds dim it all, and the organ under it, while panes catching the sun ring like glass.

    Teaches: Voronoi panes, lead lines, light colored by the glass it passes

    Builds on Flowing Color Field, Kaleidoscope, Cracked Clay

    4 exercises
    1. Light through glass Make this step
    2. Stained Glass Finish it
    3. Match the sliders Find the values
    4. Find the bug Put it right
  5. Step 5 of 5

    Soap Bubble

    A soap bubble drifting in a dark room, its colors made the way a real one makes them. The film reflects light twice, off its front and off its back, and the two reflections meet out of step by an amount set by the film's thickness. Sixteen wavelengths are reflected one at a time and added up through the eye's color matching curves, and the film drains under gravity and swirls, so it shows bands of color, a black cap at the top and the window twice, once upside down.

    Teaches: Thin-film interference, color from a film's thickness

    Builds on Flowing Color Field, Kiln Fire

    5 exercises
    1. A bubble that drains Make this step
    2. Swirls and black film Make this step
    3. Soap Bubble Finish it
    4. Match the sliders Find the values
    5. Find the bug Put it right

Other paths Start here Noise & Texture Shapes & Symmetry 3D Scenes Particles & Simulation Atmosphere Fractals Geometry Sound & Rhythm