Interactive demo

Simplex Noise

Ken Perlin presented simplex noise in 2001 as the successor of his Perlin noise. It uses a grid of triangles instead of squares, so every point depends on only three corners, and the grid hardly shows.

Your browser does not support the HTML5 canvas tag.

Move the pointer over the image: the highlighted triangle contains the point, and the lines show what each of its three corners adds to the noise value.

Controls

Under the pointer

Corner 1
0.00
Corner 2
0.00
Corner 3
0.00
Noise value
0.00

Legend

  • Grid point and its gradient
  • Corner raises the value
  • Corner lowers the value

Noise types compared

NoiseOutputBuilt fromWork per sampleSmooth
Value NoiseScalar fieldRandom values on a grid4 grid pointsYes
Perlin NoiseScalar fieldRandom gradients on a grid4 grid pointsYes
Simplex Noise this pageScalar fieldGradients on a triangle grid3 cornersYes
Worley NoiseScalar fieldRandom feature points9 to 25 cellsNo
Blue NoisePoint setRandom candidates around existing pointsUp to 30 tries per point–
Fractal NoiseScalar fieldOctaves of a base noise1 base noise per octaveYes
Diamond-SquareHeightmapDisplaced midpoints of a grid4 neighbors per pointNo
Colors of NoiseSignal or imageWhite noise filtered by frequency1 FFT for all samples–
Domain WarpingScalar fieldFractal noise at warped positionsUp to 5 fractal noisesYes
Curl NoiseVector fieldDerivatives of a noise field4 noise samplesYes
Noise Terrain GeneratorHeightmapStacked noise layersLayers × octaves–

1. A skewed grid

The plane is cut into equilateral triangles. To find the triangle of a point, its coordinates are skewed so that the triangles become halves of squares. Then the point lies in a square cell, and one comparison (x > y) picks the half.

2. Three contributions

As in Perlin noise, every corner has a random gradient. Its contribution is the dot product of the gradient with the vector to the point, weighted by (0.5 − d²)⁴. Beyond a distance of about 0.71 the weight is zero.

3. Why it is better

Instead of blending four corners, simplex noise simply adds three contributions that fade out on their own. That is cheaper, especially in higher dimensions (n + 1 corners instead of 2ⁿ), and shows fewer artifacts along the grid axes.

Credits

  • The implementation follows Simplex noise demystified by Stefan Gustavson (2005), which explains Ken Perlin's simplex noise from 2001.