Learning path · 8 lessons · about 3 hours

Noise and procedural textures

You will: make clouds, terrain, marble and other natural patterns from code. For: anyone who wants textures without painting them.

Almost every natural-looking shader is built on noise. This path starts from the problem (shaders have no random function), builds value noise in small steps, layers it into fractal noise, and colours it with palettes. When you finish you can make clouds, rock, wood, marble and water surfaces from a handful of lines.

Start lesson 1

What you will be able to do

  • Build a hash function and value noise yourself
  • Layer noise into fractal noise (fBm)
  • Colour any value with a cosine palette
  • Use noise for clouds, terrain and marble

The lessons, in order

  1. 1
    Randomness without random()

    Make TV-static blocks: a 20×15 grid where each cell is a grey level from hash(cell).

    Play
  2. 2
    Smooth randomness, step 1: blend two values

    Plot the curve n as a thin cyan line on the dark background (8 cells across, hash from the Toolbox).

    Play
  3. 3
    Smooth randomness, step 2: soften the corners

    Draw the plain blend as a red curve and the softened blend as a green curve in the same picture.

    Play
  4. 4
    Value noise (smooth randomness)

    Write vnoise() and display it at scale 8x6 as grey.

    Play
  5. 5
    Noise on noise: add layers by hand

    Show three layers of noise added together as grey.

    Play
  6. 6
    Fractal noise (fBm)

    Write fbm() with 5 octaves (amp 0.5 → halved each time, frequency doubled each time) and display fbm(uv ×…

    Play
  7. 7
    Cosine palettes

    Make a rainbow that scrolls: t = uv.x + time × 0.2.

    Play
  8. 8
    Repeating: floor & frac

    Draw an 8×6 checkerboard of black and white.

    Play

Ideas you will meet

Short explainers with a live example for each:

See all learning paths