Perlin noise creates smooth, natural-looking gradients. It’s based on gradient vectors and interpolation, developed by Ken Perlin for procedural texture generation.
How?
Perlin noise can be generated through several methods:
- Classic Perlin Noise: Uses a grid of pseudo-random gradients and smooth interpolation
- Simplex Noise: An improvement for higher dimensions with better performance
- Fractal Noise: Layering multiple octaves for more complex patterns
Classic Perlin Noise Algorithm Logic
The algorithm works by dividing space into a grid and assigning random gradient vectors to each grid point. For each point, it interpolates the influence of the surrounding gradients.
Basic steps:
- Determine the grid cell containing the point
- Compute the dot product of the point’s vectors to the four nearest grid points’ gradients
- Smoothly interpolate these values to get the final noise value
This creates coherent noise that varies smoothly across space, ideal for natural textures like clouds or terrain.