Interactive demo
Domain Warping
Domain warping does not change the noise itself, but where it is read: the position is first moved by another noise. Applied twice, plain fractal noise turns into marble, smoke and flowing liquids.
Set the warp levels to “No warping” to see the plain fractal noise, then add one level after the other. “Warp offsets” shows how far and in which direction every point is moved.
Controls
Display
Noise types compared
| Noise | Output | Built from | Work per sample | Smooth |
|---|---|---|---|---|
| Value Noise | Scalar field | Random values on a grid | 4 grid points | Yes |
| Perlin Noise | Scalar field | Random gradients on a grid | 4 grid points | Yes |
| Simplex Noise | Scalar field | Gradients on a triangle grid | 3 corners | Yes |
| Worley Noise | Scalar field | Random feature points | 9 to 25 cells | No |
| Blue Noise | Point set | Random candidates around existing points | Up to 30 tries per point | – |
| Fractal Noise | Scalar field | Octaves of a base noise | 1 base noise per octave | Yes |
| Diamond-Square | Heightmap | Displaced midpoints of a grid | 4 neighbors per point | No |
| Colors of Noise | Signal or image | White noise filtered by frequency | 1 FFT for all samples | – |
| Domain Warping this page | Scalar field | Fractal noise at warped positions | Up to 5 fractal noises | Yes |
| Curl Noise | Vector field | Derivatives of a noise field | 4 noise samples | Yes |
| Noise Terrain Generator | Heightmap | Stacked noise layers | Layers × octaves | – |
1. Moving the input
Instead of f(p), the shader computes f(p + s · q(p)): the noise q moves the point p before f is read. q has two components, two fractal noises with different offsets, so the shift has a direction.
2. Warped twice
The second level warps the warp: f(p + s · r) with r = fbm(p + s · q) and q = fbm(p). Five fractal noises per pixel, each with up to eight octaves, are no problem for the graphics card.
3. Coloring by the warp
The intermediate values carry information too: the color mixes the final value with the length of q and the first component of r. Slowly shifting the inner noises over time makes the pattern flow.
Credits
- Based on the article Domain Warping by Inigo Quilez: the two-level warp and the idea of coloring by the intermediate values come from it. The noise functions, colors and controls were written for this page.