-
-
Notifications
You must be signed in to change notification settings - Fork 142
Understanding Noise Types
This guide explains the different noise algorithms available in FastNoise2, how they differ, and when to use each one.
Coherent noise is the foundation of procedural generation. Unlike white noise, coherent noise has spatial continuity - nearby points have similar values, creating smooth, natural-looking patterns. All coherent noise types produce values between -1 and 1 by default (configurable via Output Min/Max).
This should be your defacto go-to noise type, it has a high quality output while being fast to generation. Instead of a square/cubic grid, Simplex uses a simplex grid (triangles in 2D, tetrahedra in 3D):
- Input coordinates are skewed onto the simplex grid
- The enclosing simplex is identified (3 vertices in 2D, 4 in 3D)
- Gradient contributions from each vertex are calculated using a radial falloff
- Coordinates are unskewed back to produce the final value
Characteristics:
- More isotropic (directionally uniform) than Perlin - fewer grid artifacts
- Fewer vertices to sample per point (3 in 2D vs 4 for Perlin)
- Smoother visual appearance
- Scales better to higher dimensions
Best for: Excellent general-purpose noise, good default choice for terrain, textures, and effects.
auto simplex = FastNoise::New<FastNoise::Simplex>();An enhanced variant of simplex noise developed by K.jpg. SuperSimplex samples more vertices with a larger falloff radius to produce an even smoother result:
- Samples 4 vertices in 2D, 8 in 3D (vs 3/4 for standard Simplex)
- Produces visibly smoother, more rounded features
- Slower than standard Simplex due to the additional vertex evaluations
Characteristics:
- Smoothest of the gradient noise options
- Higher computational cost
- Excellent isotropy
Best for: When maximum smoothness is a priority and performance is less critical. Great for organic, flowing patterns.
auto superSimplex = FastNoise::New<FastNoise::SuperSimplex>();The classic gradient noise algorithm, developed by Ken Perlin in 1983. Perlin noise works on a regular (square/cubic) grid:
- Random gradient vectors are assigned to each grid corner
- For any point, the dot product of the distance to each surrounding corner with that corner's gradient is calculated
- These values are blended using a smooth quintic interpolation curve
Characteristics:
- Can show subtle grid-aligned artifacts at 45 and 90 degree angles
- Uses quintic interpolation (6t^5 - 15t^4 + 10t^3) for smooth transitions
- Samples 4 corners in 2D, 8 in 3D, 16 in 4D
- Faster than Simplex in 2D generation
Best for: General-purpose noise where slight directional bias is acceptable.
auto perlin = FastNoise::New<FastNoise::Perlin>();Value noise is the simplest coherent noise type. Unlike gradient noise (Perlin/Simplex), it assigns random scalar values (not gradient vectors) to grid points and interpolates between them:
- A hash-based random value is assigned to each grid corner
- Values are blended using Hermite interpolation (3t^2 - 2t^3)
Characteristics:
- More pronounced grid artifacts than gradient noise
- Visually blockier/smoother appearance
- Computationally simpler
Best for: When you want a softer, more "blobby" look, or as a fast noise source where visual quality is less critical. Can be useful for variation maps or parameters that don't need to look natural.
auto value = FastNoise::New<FastNoise::Value>();| Type | Speed | Smoothness | Isotropy | Grid Artifacts |
|---|---|---|---|---|
| Perlin | Fast | Good | Moderate | Slight at 45/90 degrees |
| Simplex | Fast | Very Good | High | Minimal |
| SuperSimplex | Slower | Excellent | Very High | Negligible |
| Value | Fastest | Lower | Low | More visible |
For most applications, Simplex is the recommended default. Use Perlin if you want it's different output characteristics. Use SuperSimplex when smoothness matters most. Use Value for quick-and-dirty variation.
Cellular noise (also known as Worley noise or Voronoi noise) produces patterns based on the distance to randomly scattered cell centres. The algorithm:
- Space is divided into a grid, with one cell centre randomly placed in each grid cell
- For each point, distances to all nearby cell centres are calculated
- The output depends on which cellular variant you use
Cellular noise offers several configurable parameters:
- Distance Function - How distance is measured (Euclidean, Manhattan, Hybrid, etc.). See the DistanceFunction docs for visual examples.
- Grid Jitter - How much cell centres are displaced from their grid positions (0 = uniform grid, 1 = maximum natural displacement before grid artifacting)
- Size Jitter - Random variation in effective cell sizes
Returns a random value associated with the Nth closest cell. The value is generated using white noise from the cell's hash, so each cell gets a consistent random colour/value.
auto cellValue = FastNoise::New<FastNoise::CellularValue>();
cellValue->SetValueIndex( 0 ); // 0 = closest cell (default)Best for: Flat-shaded cell patterns, random region colouring, biome maps.
Returns the distance to the Nth closest cell centre. You can combine distances from two different cells using the Return Type:
- Index0 - Just the distance to the closest cell
- Index0Add1 - Distance to closest + distance to second closest
- Index0Sub1 - Distance to closest - distance to second closest (produces veiny patterns)
- Index0Mul1 / Index0Div1 - Multiply or divide the two distances
auto cellDist = FastNoise::New<FastNoise::CellularDistance>();
cellDist->SetReturnType( FastNoise::CellularDistance::ReturnType::Index0Sub1 );Best for: Organic cell boundaries, vein/crack patterns, bubble effects, terrain features.
Evaluates another noise generator at the position of the closest cell centre, then returns that value. This lets you assign complex procedural values to each cell.
auto lookup = FastNoise::New<FastNoise::CellularLookup>();
auto simplex = FastNoise::New<FastNoise::Simplex>();
lookup->SetLookup( simplex );Best for: Cells with procedurally varying properties, complex biome-like patterns.
White noise produces completely random values with no spatial correlation - neighbouring points have unrelated values. It looks like TV static. While not useful for natural-looking patterns on its own, it can be used for dithering and is extremely fast to generate.
auto white = FastNoise::New<FastNoise::White>();Fractals combine multiple layers ("octaves") of noise at different scales to add detail at multiple levels. This is how you get natural-looking terrain and textures rather than simple smooth blobs.
Each octave doubles the frequency (controlled by Lacunarity) and reduces the amplitude (controlled by Gain). The result is a sum of progressively finer detail.
The standard fractal type. Each octave simply adds finer detail on top of the previous ones:
auto simplex = FastNoise::New<FastNoise::Simplex>();
auto fbm = FastNoise::New<FastNoise::FractalFBm>();
fbm->SetSource( simplex );
fbm->SetOctaveCount( 5 );
fbm->SetGain( 0.5f ); // each octave contributes half as much
fbm->SetLacunarity( 2.0f ); // each octave is twice the frequencyBest for: Terrain heightmaps, clouds, organic textures, general-purpose natural patterns.
Creates sharp ridges and valleys by inverting the absolute value of the noise before combining octaves. Higher octaves sharpen the ridges rather than smoothly adding detail.
auto simplex = FastNoise::New<FastNoise::Simplex>();
auto ridged = FastNoise::New<FastNoise::FractalRidged>();
ridged->SetSource( simplex );
ridged->SetOctaveCount( 5 );Best for: Mountain ranges, rocky formations, sharp terrain features, dramatic landscapes.
- Octaves (2-16) - More octaves = more detail but slower. 3-6 is typical.
- Gain (default 0.5) - Amplitude multiplier per octave. Lower = smoother, higher = more detail retained.
- Lacunarity (default 2.0) - Frequency multiplier per octave. 2.0 means each octave is twice as detailed.
- Weighted Strength (default 0.0) - When > 0, areas with low values from earlier octaves get less detail from higher octaves. Creates smooth valleys with detailed peaks.
Domain warping distorts the input coordinates before evaluating the source noise, creating twisted, flowing patterns. Instead of evaluating noise(x, y), you evaluate noise(x + warpX, y + warpY) where the warp offsets are themselves derived from noise.
Warps using a simple gradient grid, similar to Perlin's gradient approach. Fast and effective.
auto simplex = FastNoise::New<FastNoise::Simplex>();
auto warp = FastNoise::New<FastNoise::DomainWarpGradient>();
warp->SetSource( simplex );
warp->SetWarpAmplitude( 50.0f ); // maximum displacement in world unitsWarps using a simplex grid for higher-quality, more isotropic distortion. Slower but produces smoother warping with fewer directional artifacts.
Domain warping can be fractalized for more complex distortion:
- DomainWarpFractalProgressive - Each octave warps the output of the previous octave, creating progressively twisted patterns
- DomainWarpFractalIndependent - Each octave warps the original position independently, and the total warp is accumulated
Best for: Flowing patterns, organic distortion, fantasy terrain.
These are simple utility generators:
- Constant - Outputs a single constant value everywhere
- Checkerboard - Alternating pattern like a chess board
- SineWave - Smooth sine wave pattern
- Gradient - Linear gradient along configured axes
- DistanceToPoint - Distance from a configurable point, using any distance function
Explore the Node Editor and try out the different nodes, it's the best way to get a feel for how all the node types and parameters can affect your final output. There are a couple demo node trees you can import in the Node Editor menus to see some examples of node trees for terrain generation.