Simplex Noise 2D | Simplex Noise 2D with fBm | Simple Terrain Synthesis |
---|---|---|
It is a coherent noise function by Perlin which is the improvement to his Perlin Noise. The 3D version of it was patented and expired in 2022. The main idea is to have an n dimensional space is subdivided into simplices, which are made approximately uniform by means of a skew factor, with which interpolation is carried out. A hashed gradient is usually used for interpolation, which is implemented by a permutation table and a gradient table.
The summation of successive octaves of the noise is suitable for terrain synthesis, procedural clouds or other things.
- Frequency - Width of pattern
- Amplitude - Height of pattern
- Lacunarity - Change of frequency in succesives octaves
- Gain - Change of amplitude in succesives octaves
The simplex noise makes use of a permutation table, therefore I have implemented a simple linear congruential generator by using the formula, where N0 is the hash of the seed.
N+1 = (134775813 * (N + 1)) mod (2^32 -1)
This implementation is based on the C++ implementation by Sebastien Rombauts. This implementation does not guarantee a correct or complete implementation of the simplex noise algorithm nor is it a goal of this project. The aim is to create an efficient implementation of a noise algorithm that can be used in conjunction with other algorithms for practical purposes.
- 1D, 2D and 3D implementation of Simplex Noise.
- Fractional Brownian Motion (fBm) with noise summation.
- Seedable permutation table
- Gradient lookup table
- Implement 4D and a generic algorithm for any dim
- Optimization
The source code is copyrighted by: Dan Häßler and Sebastien Rombauts and it is distributed under the terms of the MIT license.
Please see LICENSE file for details or copy at http://opensource.org/licenses/MIT.