home/ modules/ procedural-noise-and-fractal-fields

Procedural noise, fBm, and fractal fields

  • learner can implement fBm by summing noise octaves with decaying amplitude and rising frequency
  • learner can reason about the Hurst exponent, noise-color spectra, and spectral efficiency versus sine synthesis
  • learner can build multi-scale fractal detail by tiling space with fract() in an iterative loop

Create a procedural terrain/cloud texture driven by fBm and Perlin noise, exposing the Hurst exponent as a control and layering fract-space fractal iteration for multi-scale detail.

This module builds toward the workhorse texture of live-coded visuals: an organic terrain-or-cloud field that never repeats, runs entirely on the GPU, and responds to a single expressive knob. In a VJ set or shader jam, fBm is what turns flat gradients into weather — and exposing the Hurst exponent live means you can morph rolling hills into jagged static in one parameter sweep, on beat, without touching the rest of the patch.

The arc starts supported. You already animate sine patterns from the prereq module; the bridge atom on layered sine octaves shows the 2:1 frequency/amplitude stacking idea in familiar territory. From there, swap sines for noise: “fBm in shaders is built by summing noise octaves” is your JIT how-to for the core loop, while “Perlin noise is a repeatable pseudo-random function of 3D position” supplies the smooth randomness the loop consumes. A first guided exercise hardcodes gain 0.5; the second replaces it with G = 2^(-H) once the fBm definition and self-similarity atoms explain what H actually controls. Finally, “a for loop that repeatedly scales, tiles (fract), and accumulates” layers fract-space repetition on top for detail below the noise floor — the unsupported capstone combines all three moves.

The required set gates the capstone directly: you cannot expose H as a meaningful control without the Hurst and self-similarity concepts, cannot reason about your slider’s endpoints without the noise-color taxonomy, cannot justify noise over an inverse FFT without the spectral-efficiency argument, and cannot layer multi-scale detail without fract tiling and the iteration pattern. The lone supporting atom enriches by connecting this machinery back to sine-based intuition — useful context, but the texture ships without it.

Runnable examples

Generated from the context/ instrument corpus by concept (redistributable idioms only). Do not edit — regenerate with gen-module-examples.mjs.

noise-field

noise(4, 0.1).out()

hydra-0002 · CC0-1.0

float h21(vec2 p){return fract(sin(dot(p,vec2(12.9898,78.233)))*43758.5453);}

glsl-0013 · public-domain

Atoms in this module

Required — these gate the capstone

fBm in shaders is built by summing noise octaves with exponentially decreasing amplitude and increasing frequency
Procedure L2 First instrument G
Fractional Brownian Motion adds correlated memory to white noise integration, controlled by the Hurst exponent H
Concept L3 Craft G
The Hurst exponent directly encodes the fBm's statistical self-similarity: zooming in by U horizontally scales amplitude by U^(-H)
Concept L3 Craft G
Named noise colors (pink, brown, yellow) map to specific fBm spectral slopes and Hurst exponents
Fact L3 Craft GB
Noise-based fBm fills the frequency spectrum with far fewer octaves than sine-wave additive synthesis
Concept L3 Craft G
The fract() function repeats space by tiling UV coordinates into a 0–1 grid, enabling fractal-like layering
Concept L3 Craft G
A for loop that repeatedly scales, tiles (fract), and accumulates color creates multi-scale fractal detail in shaders
Procedure L3 Craft G
Perlin noise is a repeatable pseudo-random function of 3D position used for procedural textures
Concept L3 Craft G

Supporting — enrichment, not gating

Adding a second sine octave at double frequency and half amplitude adds fine detail to procedural patterns
Concept L2 First instrument G
FBM sums octaves at doubling frequency and halving amplitude — more octaves add finer natural detail across scales
Concept L2 First instrument HG