Worley Noise
Shade every pixel by its distance to the nearest of a set of scattered feature points, producing a cellular/organic tessellation pattern.
Run it
What it looks like when it goes wrong (4)
- The pattern stops reading as a morph and starts reading as a flicker. Nothing is wrong with the field — the point set is fixed and the slice is still continuous — but between one frame and the next the slice has moved far enough that a different point is nearest almost everywhere. Continuity in the signal does not survive undersampling it in time, which is the same failure as too-high frequency in a spatial field.
- One or two cells fill the frame and the tessellation reads as a single soft gradient blob. Worley noise looks like Worley noise only when you can see several regions meeting; below that you are looking at one distance function, which is a gradient. Turn on the boundary marker to confirm the structure is still there — it is just larger than the window.
- The regions blow out to flat white with hard black cores, which looks like more structure and is less. The distance values are unchanged; the mapping from distance to brightness has been steepened until most of the range lands outside 0..1. Useful as a diagnostic — it makes the cell centres obvious — and destructive as a look.
- Stop the slice and the boundary marker shows what is actually there: a fixed tessellation, each region owned by one feature point. Every animated frame is a different flat cut through this same unmoving 3D point set. That is what the Coding Train challenge means by 3D Worley noise, and it is why the motion looks like boundaries sliding rather than dots being nudged around.
Clean-room implementation — written from the described algorithm, not from source. Reuse policy
What it is
Worley noise shades every pixel by its distance to the nearest of a scattered set of “feature points,” rather than by interpolating a smooth gradient the way Perlin or Simplex noise do. The result reads as a mosaic of cells, one loosely centred on each feature point, with visible seams where two points’ distance fields meet — organic, cracked, or biological depending on how you color it. The same construction turns up under two names in the sources behind this page: The Coding Train’s coding challenge calls it Worley Noise, and The Book of Shaders (Patricio Gonzalez Vivo and Jen Lowe) introduces the identical idea as Cellular noise. Treat the two names as interchangeable — a reader arriving from either source is looking for the same thing.
How it works
The Coding Train’s coding challenge walks through it in four steps, and that order is also the order you’d implement it in:
- Scatter a set of feature points across the plane (or the volume, in 3D) — “Adding a Set of Points” in the challenge’s own structure. Where you put them, and how many, is the only randomness in the whole technique.
- For every pixel, compute its distance to every feature point and keep the smallest one — “Calculating The Distances.” That’s the entire basis function: whatever channel you drive comes from how far a pixel sits from the closest scattered point, and nothing else.
- Map that distance to a colour or brightness value — “Coloring.” Whether small distance maps to light or to dark decides whether the feature points read as bright centres or dark pits, and it’s at the boundary — where two points sit equidistant — that a visible cell edge appears.
- Extend to a third coordinate for a volume — the challenge covers this directly as “Worley Noise in 3D”: place feature points in space rather than on a plane, then query any 3D position’s distance to the nearest one. Sliding a query plane through that volume (feeding time in as the z coordinate, say) animates the 2D pattern without ever moving the points themselves.
The sources behind this page describe only the nearest point — commonly called F1. A well-known second construction subtracts the distance to the second-nearest point from the nearest (F2 − F1) to draw the cell borders as a value of their own, independent of the fill — that’s the variant that produces the sharp, crack-like network rather than a smoothly shaded cell interior. Neither excerpt in this bundle documents that step for either source specifically, so it isn’t asserted here as something either one builds — it’s a known extension worth checking the primary sources for, not a claim this page makes about them.
Parameters & tuning
- Feature point count / density sets cell size directly: pack more points into the same area and the nearest one is found sooner everywhere, shrinking the average cell; scatter fewer and cells grow, with only their edges showing any gradient before the next point takes over.
- The distance-to-colour mapping (“Coloring”) decides the read: invert it and dark points on a light field become light points on a dark field; steepen it and the gradient inside each cell compresses toward the border, making the tessellation itself read as more prominent than the shading.
- Dimensionality — staying on a 2D plane versus placing points in a 3D volume (per “Worley Noise in 3D”) changes what animating means: in 2D, moving the point set is the only way to change the pattern over time; in 3D you can hold the points fixed and slide the query plane through the volume instead.
Where it’s been used
Both sources in this bundle are teaching material, not named artworks: The Coding Train’s own Worley Noise coding challenge, and The Book of Shaders’ Cellular noise chapter. Neither excerpt names a specific piece built on top of the technique, so this page has nothing to point to there — that’s a gap in the evidence, not a decision to omit anything.
Variants & neighbours
Set beside Perlin noise — the older of the “two noise flavours” that predates Simplex, built originally for Tron’s CG effects — the difference is the field construction itself: Perlin interpolates a gradient across a lattice, so it drifts smoothly, while Worley computes raw distances to a discrete point set, so it tessellates with visible seams instead of blending. Simplex noise inherits Perlin’s gradient-interpolation approach rather than Worley’s distance-field one — reach for Perlin or Simplex when you want continuous, flow-field-style drift, and for Worley/Cellular noise when you want discrete regions with a border you can actually see.
Go deeper
The Coding Train’s Worley Noise challenge is the walk-through this page follows step for step; its own further-reading line points to what it calls “a Stephen Worley paper on the cellular texture basis function” as the origin of the technique, though the challenge’s own record doesn’t give a full citation for it. The Book of Shaders’ Cellular noise chapter, on thebookofshaders.com, covers the same construction in GLSL under its other name — its text and code there are explicitly copyrighted to Patricio Gonzalez Vivo (2015) for reading, not for blanket reuse, per the source’s own notice.
Connected to
Further reading: The Book of Shaders