Perlin Noise Terrain Lab (3D)

Gradient noise made visible: a live fBm terrain and a turbulence marble vase on a Blender-modelled plinth.

Switch to 2D

Presets

Playback

View

Noise settings

Camera

Layers

Quality

Model check

The science

What is modelled

A heightfield is built from Ken Perlin's gradient noise and shown on a Blender-modelled gallery plinth; the same noise, turned into turbulence, paints the marble vase. The noise value is computed in the page for every vertex of a 129 by 129 grid (65 by 65 in Low quality).

Equations

  • Lattice: every integer point (i, j) gets a pseudo-random unit gradient gij from a seeded permutation table. For a point (x, y) in cell (i, j) with offsets (xf, yf) the four corner contributions are the dot products g · (offset to the corner).
  • Blend: n = lerp(lerp(n00, n10, u), lerp(n01, n11, u), v) with u = fade(xf), v = fade(yf). The improved fade is 6t5 - 15t4 + 10t3: its first and second derivatives vanish at 0 and 1, so the noise has continuous curvature across lattice lines. The original 3t2 - 2t3 only has a continuous slope, and its curvature jumps (visible as faint creases with a single octave).
  • The noise is exactly zero at every lattice point (all offsets are zero or the corner term is a dot product with a zero vector), and with unit gradients it is bounded by √2/2 in two dimensions.
  • Fractional Brownian motion: fBm(p) = ∑k=0m-1 ak n(lk p) with persistence a and lacunarity l. It is bounded by (∑ ak) √2/2; the page divides by that sum so the value stays in [-1, 1]. Each octave adds detail at a finer scale and a smaller amplitude.
  • Marble: sin(2π (v · bands + turbulence · ∑ ak |n(2k p)|)). The absolute value creates the creases of turbulence. The lattice wraps around the vase so the texture has no seam.

Checks run in the page

  • Zero at every lattice point for four seeds.
  • Value range from 200 000 random samples against the proven bound.
  • Continuity (finite slope that does not grow as the step shrinks) and the fade-curve derivatives.
  • The fBm amplitude bound for four octave settings.

Honest simplifications

This is a mathematical texture, not a geological model: real terrain is shaped by erosion, tectonics and water, which gradient noise does not include. Colours follow height and slope by simple rules. The marble is a standard turbulence recipe, not a model of how veins form in stone. Water is a flat plane at the chosen level without waves or flow, and the tiny edge skirt is only a visual cross-section.

What to try

  • Set octaves to 1 and switch on the lattice: the zero crossings sit exactly on the grid points.
  • Raise persistence from 0.4 to 0.7 and watch the rough fine detail overtake the large shapes in the octave graph.
  • Switch the fade to smoothstep with one octave and look for creases along the lattice lines.
  • Change the seed: the shape changes completely but the histogram, range and statistics stay almost the same.
Loading model...
Loading Blender model...
Noise along the slice: octave 1 vs fBm
Octave amplitudes (persistence)
Distribution of the noise values
Made with 🟠 Blender · Three.js