In 2001 Ken Perlin introduced a new type of gradient noise called Simplex Noise. The document can be found here. It is essentially his original gradient noise mapped onto a simplex grid. The term “Simplex” means the simplest possible primitive which can occupy space. In 2D it is a triangle and in 3D it is a tetrahedron ( 4-sided pyramid ). A simplex grid is a grid structure made of these primitives.
There are four distinct improvements his new noise had over his classic.
- A simplex primitive has far fewer verticies than its square/cube equivalent in 2D, 3D and higher dimensions which reduces algorithm complexity.
- It allows for an easily computable analytic derivative
- The simplex structure reduces axis-aligned artifacts
- It lends itself to an efficient hardware implementation
Stefan Gustavson has made some great contributions to Simplex Noise over the years. Most notably these are…
- Writing a much clearer description of Simplex Noise in his “Simplex Noise Demystified” document.
- Along with Ian McEwan providing GLSL implementations of Simplex Noise at WebGLNoise.
- Providing an implementation of Simplex Noise with analytical derivatives here.
I have been experimenting with implementing this and other noise types over simplex grids. As a result I have uploaded 3 new noise types to the GitHub repository.
The first is Simplex Perlin Noise in 2D and 3D. I have made two improvements over what has been supplied by Perlin and Gustavson. The first is a fix to a bug in the 3D surflet math which would cause discontinuities along the simplex faces, as can be seen here. The second is providing accurate scaling values to correctly scale the noise to a strict -1.0->1.0 range.
The second is Simplex PolkaDot Noise in 2D and 3D. The simplex grid packs the dots more tightly than the square/cube version which gives the noise a slightly different look.
The final is Simplex Cellular Noise in 2D and 3D. I’ve used some optimization ideas as described in a previous post on Cellular Noise so it runs very efficiently. And given the reduced complexity in higher dimensions it could run a lot faster than its cube grid alternative. The problem is a simplex grid packs the points much more tightly in space than a cube grid which reduces area for the verticies to move. This reduces variance leading to a repetitive looking noise. Nonetheless it is still visually pleasing and well defined so I have included it into the code repository.
One final note is that I experimented with taking additional points into account ( other than the immediate corner verticies of the simplex ) to allow for more variance. The results were positive ( as can be seen here ) but costly and would only be of benefit in higher dimensions ( eg 3 or 4 ).