Worley noise
Worley noise, also known as cellular noise or Voronoi noise, is a procedural noise function introduced by Steven Worley in 1996 for generating cellular textures in computer graphics.[1] It produces patterns by partitioning space into a random array of cells using scattered feature points and computing distances from any location to the nearest such points, creating basis functions that mimic Voronoi diagrams.[1] This approach complements traditional noise functions like Perlin noise by enabling efficient, storage-free synthesis of organic and geometric textures without precalculation.[1]
The core of Worley noise lies in its basis functions F_n(x), where F_1(x) is the distance to the closest feature point from position x, F_2(x) to the second-closest, and so on, with feature points distributed via a Poisson process in a spatial grid for reproducibility.[1] Linear combinations, such as F_2(x) - F_1(x), yield effects like boundaries or veins, while fractal summation extends it to multiscale patterns.[1] Computationally, it involves hashing to locate relevant grid cells (typically 1–3 neighbors) and sorting squared distances to avoid square roots, making it suitable for real-time rendering.[1]
In applications, Worley noise has been pivotal for solid texturing in rendering natural phenomena, including flagstone tiling, crusty organic skin, crumpled paper, ice formations, rocky surfaces, mountain ranges, and craters.[1] It supports bump and color mapping on 3D objects, and later optimizations have enhanced its use in shaders for reptile scales, minerals, and terrain generation.[2] Since its inception, the technique has influenced procedural generation in fields like video games, film visual effects, and scientific visualization, often integrated with other noise types for complex simulations.[3]
Fundamentals
Definition
Worley noise, also known as cellular noise, is a procedural generation technique that produces pseudo-random scalar values by computing distances from a given point in space to the nearest scattered feature points, or seeds.[1] Introduced as a cellular texture basis function, it defines outputs such as F_n(x), the distance to the n-th closest feature point, enabling the creation of continuous functions that mimic irregular, organic structures.[1]
This noise is primarily employed in computer graphics for generating textures that simulate natural phenomena, including stone surfaces, crusty organic skin, ice formations, and rocky surfaces, all through procedural modeling without requiring stored images or extensive precomputation.[1] Its outputs can be mapped to colors, displacements, or other properties to add detail to 3D models efficiently.[1]
Key characteristics of Worley noise include its deterministic nature—yielding identical results for the same input and seed configuration—while producing visually random-appearing patterns; scalability to two, three, or higher dimensions; and computational efficiency suitable for real-time rendering applications.[1] The function relates to Voronoi diagrams through the partitioning of space around feature points, where boundaries occur at equidistant locations.[1]
Named after its inventor, Steven Worley, the technique was first described in 1996 as a complement to existing noise functions like Perlin noise for solid texturing in computer graphics.[1]
Relation to Voronoi diagrams
Voronoi diagrams provide the geometric foundation for Worley noise by partitioning a space—such as a plane in two dimensions or a volume in three dimensions—into non-overlapping cells, where each cell consists of all points closer to a specific seed point (also called a feature or generator point) than to any other seed.[4] These cells are convex polygons (in 2D) or polyhedra (in 3D), bounded by planes or lines that represent the set of points equidistant from two adjacent seeds.[4]
Worley noise extends this Voronoi tessellation by transforming the discrete cell boundaries into continuous scalar functions that assign real values to any point in space based on its distances to the nearest seeds, rather than solely defining proximity regions.[1] For example, the value at a point can represent the Euclidean distance to the closest seed within its cell or the difference between distances to the first and second nearest seeds, creating smooth gradients that vary continuously except at cell boundaries where derivatives become discontinuous.[1] This approach enables the noise to produce organic patterns with subtle variations, ideal for procedural texturing.[1]
In a two-dimensional example, randomly distributed seeds generate Voronoi cells that approximate irregular hexagonal shapes due to the geometric constraints of equidistant boundaries, forming a tessellation across the plane.[4] The Worley noise value at a given point is then computed from its position relative to these cell boundaries, such as scaling the distance from the cell's seed to emphasize interior smoothness or edge proximity.[1]
While Voronoi diagrams emphasize exact spatial division through tessellation, Worley noise distinguishes itself by prioritizing distance-derived perturbations to simulate natural irregularities, such as cracks or veins, without requiring the full computation of a complete diagram.[1] This focus on functional output over structural partitioning makes it particularly suited for dynamic applications in computer graphics.[1]
Algorithm
Seed placement
In the Worley noise algorithm, the seed placement phase initializes the feature points, also known as seeds, which serve as the generators for the subsequent Voronoi-like partitioning of space. These seeds are distributed across the evaluation domain using a regular cubic grid in three dimensions (or analogous structures in other dimensions), where the grid cells bound the space and ensure efficient querying during noise evaluation. Each grid cell contains a variable number of seeds, typically around 2 to 4 on average for standard implementations, to achieve a desired density without excessive clustering.[5][2]
The placement process begins by determining the number of seeds per cell via a Poisson distribution with a mean density parameter λ, often set around 2 to 4 to balance uniformity and randomness; for efficiency, the distribution is clamped to avoid extremes, such as zero seeds per cell, which could create gaps. Within each cell, seeds are positioned at uniformly random locations within the cell using pseudo-random numbers generated from a hash function of the cell's integer coordinates. This hashing ensures deterministic reproducibility across evaluations while avoiding periodic artifacts inherent in purely regular lattices.[5][2]
Key parameters influencing seed placement include the grid resolution, which inversely controls overall seed density (e.g., a coarser grid yields sparser seeds for larger-scale noise), and the maximum seeds per cell, which impacts computational cost and texture complexity. This structured yet randomized distribution is crucial for producing isotropic, aperiodic noise patterns that mimic natural cellular structures, as it prevents the uniformity of grid points from dominating while ensuring comprehensive coverage of the space.[5][2]
Distance computation
To compute Worley noise at a given query point \mathbf{p} in d-dimensional space (typically d=2 or $3), the algorithm first determines the grid cell containing \mathbf{p} by applying the floor function to each coordinate, yielding integer cell indices (i, j, k) in 3D.[5] Surrounding cells are then identified—commonly a 3×3×3 neighborhood in 3D, encompassing up to 27 cells including the home cell—since seeds in distant cells contribute negligibly to the local distances.[5] Within each candidate cell, seeds are generated procedurally using a hash function on the cell coordinates to seed a pseudorandom number generator, which offsets points randomly within the unit cube (e.g., via linear congruential methods).[5] Euclidean distances from \mathbf{p} to these seeds are calculated, but to optimize performance, squared distances are used instead, avoiding the computationally expensive square root operation while preserving the ordering of distances.[5]
The search prioritizes efficiency by maintaining a priority list of the n smallest squared distances encountered so far (where n is typically 1 to 3, depending on the desired output features), updated via insertion sort after each candidate distance computation.[5] Distant cells are pruned early: before evaluating a neighboring cell, the algorithm checks if the squared distance from \mathbf{p} to the cell's closest possible point exceeds the current nth smallest distance; if so, the cell is skipped, often reducing the effective search to just a few cells rather than the full neighborhood.[5] This nearest-neighbor approach ensures that only relevant seeds influence the result, with the process scaling linearly in the number of candidates tested.[5]
For edge cases such as periodic boundaries in tiled spaces (e.g., for seamless textures), the grid indices are wrapped using modulo arithmetic on the cell coordinates before hashing, allowing seeds to be generated consistently across boundaries.[6] In infinite or non-periodic domains, the standard unbounded grid hashing suffices without modification.[5]
The core distance computation can be outlined in pseudocode as follows, assuming 3D and precomputed hash tables for seed generation:
function compute_distances(p, n):
home_cell = floor(p) // (ix, iy, iz)
smallest = [∞] * n // Initialize n largest possible squared distances
// Check home cell and neighbors (e.g., offsets from -1 to 1 in each dimension)
for dx in [-1, 0, 1]:
for dy in [-1, 0, 1]:
for dz in [-1, 0, 1]:
cell = (ix + dx, iy + dy, iz + dz)
// Prune if cell too far: min squared dist to cell
min_dsq = 0
for each dimension d in {x,y,z}:
c_min = cell[d]
c_max = cell[d] + 1
if p[d] < c_min:
min_dsq += (c_min - p[d])^2
elif p[d] > c_max:
min_dsq += (p[d] - c_max)^2
// else 0
if min_dsq > smallest[n-1]: continue
// Generate m seeds in cell (m ~ Poisson(λ), e.g., λ=3)
hash_val = hash(cell)
for i in 1 to m:
offset = random_offset(hash_val, i) // Unit cube offset
seed = cell + offset
dsq = ||p - seed||^2 // Squared Euclidean distance
// Insert dsq into smallest if smaller than largest
if dsq < smallest[n-1]:
insert_sort(smallest, dsq)
return smallest // n smallest squared distances
function compute_distances(p, n):
home_cell = floor(p) // (ix, iy, iz)
smallest = [∞] * n // Initialize n largest possible squared distances
// Check home cell and neighbors (e.g., offsets from -1 to 1 in each dimension)
for dx in [-1, 0, 1]:
for dy in [-1, 0, 1]:
for dz in [-1, 0, 1]:
cell = (ix + dx, iy + dy, iz + dz)
// Prune if cell too far: min squared dist to cell
min_dsq = 0
for each dimension d in {x,y,z}:
c_min = cell[d]
c_max = cell[d] + 1
if p[d] < c_min:
min_dsq += (c_min - p[d])^2
elif p[d] > c_max:
min_dsq += (p[d] - c_max)^2
// else 0
if min_dsq > smallest[n-1]: continue
// Generate m seeds in cell (m ~ Poisson(λ), e.g., λ=3)
hash_val = hash(cell)
for i in 1 to m:
offset = random_offset(hash_val, i) // Unit cube offset
seed = cell + offset
dsq = ||p - seed||^2 // Squared Euclidean distance
// Insert dsq into smallest if smaller than largest
if dsq < smallest[n-1]:
insert_sort(smallest, dsq)
return smallest // n smallest squared distances
This loop typically evaluates 10–30 seeds per query point, making it suitable for real-time applications when n is small.[5]
Core function
The core function of Worley noise computes a scalar value at any point x in \mathbb{R}^D (where D is the dimension, typically 2 or 3) by evaluating distances to nearby randomly placed seed points, forming the basis for cellular patterns. In its simplest form, the noise value is F_1(x) = \|x - p_i\|, where p_i denotes the nearest seed point to x. These distances are measured using the Euclidean metric, expressed as
\|x - p\| = \sqrt{\sum_{k=1}^D (x_k - p_k)^2},
which ensures isotropic propagation of influence from each seed in the space. For computational efficiency, squared distances are often used during evaluation, with the square root applied only if the actual distance is required.[1]
A more expressive formulation incorporates multiple nearest seeds by first ordering the distances as d_1 \leq d_2 \leq \dots \leq d_n from x to the n closest seeds (with n typically small, like 2 or 3), then deriving the noise via a function of these distances; for instance, to emphasize edge effects near Voronoi cell boundaries, the difference d_2 - d_1 yields values approaching zero along edges, creating ridge- or crack-like patterns.[1]
To produce bounded outputs suitable for texturing, the resulting noise values are normalized to the interval [0, 1] through division by a reference scale, such as the maximum anticipated distance within a seed grid cell or an empirically determined bound obtained by evaluating the function at thousands of sample points to capture its range.[1]
Output variations
The output of Worley noise is derived by combining distances from a point to multiple nearest feature points, enabling a range of textures from smooth gradients to sharp boundaries. The simplest variation, denoted F1, uses the Euclidean distance d_1 to the nearest feature point, producing a continuous function with smooth gradients that diminish toward cell centers and increase toward boundaries, ideal for simulating organic forms like lava flows.[7]
A more nuanced variation, F2, employs the distance d_2 to the second-nearest feature point, which remains continuous but exhibits derivative discontinuities where the ordering of nearest points changes, such as at cell boundaries or triple points, thereby accentuating structural edges in textures.[7] To emphasize cell boundaries explicitly, the difference F2 - F1 yields values approaching zero along Voronoi edges, creating ridge- or crack-like patterns suitable for simulating fractures or veins, as this combination highlights regions where the nearest and second-nearest distances are equal.[7]
Further customization arises from weighted linear combinations of these distances, such as a \cdot d_1 + b \cdot d_2 or more complex forms like $2 d_3 - d_2 - d_1, where coefficients a and b tune the balance between smoothness and roughness; evaluations up to the fourth-nearest distance d_4 allow for about 40 such combinations, each imparting distinct perceptual qualities like mottled or honeycomb effects.[7] For increased complexity mimicking natural fractal structures, octave layering sums scaled versions across frequencies, formulated as G_n(\mathbf{x}) = \sum_{i=0}^{5} 2^{-i} F_n(2^i \mathbf{x}), where F_n is a base variation like F1; this produces multilayered noise resembling crumpled paper or terrain, enhancing detail without altering the core distance computations.[7]
Applications
Computer graphics texturing
Worley noise plays a pivotal role in computer graphics texturing by generating cellular patterns that mimic organic structures, making it a staple for procedural content creation since its introduction in 1996.[5] As a solid texturing basis function, it complements Perlin noise to produce diverse effects like flagstone, rock, or mountain ranges, enhancing surface detail without relying on precomputed images.[5] Its procedural nature allows seamless scalability across resolutions, ideal for rendering complex scenes in visual effects and games.[5]
In procedural shaders using GLSL or HLSL, Worley noise facilitates bump mapping through gradients of its distance functions, simulating subtle surface perturbations such as those on crumpled paper or flagstone.[5] For displacement mapping, it drives geometric alterations to create raised spots or inset channels, adding tangible depth to models.[5] Color variation is achieved by mapping noise outputs to splines, yielding patterns like polka dots or veins in materials such as marble or lava flows.[5]
Worley noise integrates readily into industry tools for texturing terrain and organic assets. Houdini's Worley Noise VOP node scatters points to compute cellular noise, supporting displacement for rock-like formations.[8] Blender's Voronoi Texture node evaluates Worley noise at input coordinates, enabling procedural patterns in shader networks for materials and compositing.[9] Unity's Shader Graph Voronoi Node generates Worley-based noise for UV-driven texturing in real-time materials.[10] Similarly, Unreal Engine's noise expressions include Voronoi (Worley) variants for creating billowy cloud textures or caustic effects in game environments.[11]
Since its inception, the technique has influenced procedural generation in film visual effects workflows, contributing to realistic organic rendering in production pipelines.[5]
Its GPU-friendliness stems from parallelizable distance searches among seed points, enabling efficient real-time evaluation without precomputation. Optimized implementations limit searches to a 2x2 grid per cell, matching Perlin noise speeds on parallel hardware.[12]
Simulation and modeling
Worley noise finds applications in simulation and modeling across various scientific and engineering domains, leveraging its cellular structure—derived from Voronoi diagrams—to approximate irregular, organic patterns in physical phenomena.
In fluid dynamics, Worley noise is employed to model complex flow behaviors, such as turbulence and droplet distributions, by facilitating particle placement that mimics natural clustering. For instance, in real-time volumetric explosion simulations, it generates cellular structures to enhance the realism of expanding shockwaves and debris distributions, often combined with curl noise to produce turbulent flow fields essential for accurate fluid behavior. This approach allows for efficient computation of incompressible flows at resolutions like 32×32×32, supporting interactive modeling of dynamic events.[13]
Biological modeling benefits from Worley noise's ability to replicate tissue and pattern irregularities at cellular scales. In plant pathology simulations, it controls the spatial distribution and geometry of disease spots, such as in cucumber powdery mildew, where randomized cell placement simulates spot initiation and growth through scaling and blending with Perlin noise, achieving up to 87% accuracy in visual similarity to real images via deep learning validation. Similarly, in histopathology, Worley noise drives parametric texturing pipelines to synthesize photo-realistic skeletal muscle images, capturing fiber shapes, connective tissue variations, and staining inconsistencies for training segmentation models, generating datasets with approximately 74,000 fibers across 120 images. These methods enable the modeling of vein-like patterns in leaves or cell structures in tissues by perturbing distances to feature points.[14][15]
In architectural design, Worley noise supports the generation of irregular facades and spatial partitions through procedural Voronoi geometries, adapting to real-time inputs like EEG data for user-responsive structures. Parameters such as period (controlling point density) and harmonic gain (influencing pattern complexity) allow for dynamic 2D-to-3D conversions, where grayscale noise values define depth, facilitating biofeedback-driven designs for building envelopes.[16]
For scientific visualization, Worley noise approximates structures by animating bubble-like cellular patterns.
Variants
Standard distance functions
In Worley noise, the standard distance functions are derived from the distances to the nearest feature points (seeds) within the Voronoi partitioning of space, providing foundational building blocks for texture generation. These functions, introduced by Steven Worley, allow for controlled patterns by using different distance metrics, such as Euclidean, Manhattan, or Chebyshev, to compute distances.[1]
The primary function F_1 is defined as the Euclidean distance to the closest feature point, d_1. Common implementations may scale this distance or use alternative metrics for varied effects, such as sharper transitions with Manhattan distance.[1]
A more sophisticated variant is F_2, the distance to the second-closest feature point, d_2. This form captures the geometry between adjacent cells, making it ideal for vein-like or cracked surface simulations when mapped to intensity. The parameterizations can use different distance metrics to balance detail and smoothness.[1]
Additional conventional functions include F_3, the distance to the third-nearest feature point, which introduces greater complexity and isotropy by incorporating farther neighbors, useful for simulating layered or aggregated structures like flagstone or crumpled surfaces. Hybrid combinations, such as F_2 - F_1, subtract the closest distance from the second to zero out values at Voronoi boundaries while emphasizing edges and internal cell divisions, thereby highlighting structural boundaries without additional computational overhead.[1]
These parameterizations form the core of output variations, where linear or nonlinear blends further tailor the noise for specific applications. Euclidean distance is the standard metric, yielding visually natural results when combined with feature point densities around 3 per unit volume, avoiding artifacts while preserving procedural efficiency.[1]
Advanced modifications
Advanced modifications to Worley noise address computational efficiency, artifact reduction, and enhanced expressiveness for demanding applications in computer graphics. A key optimization involves refining the neighbor search during distance computation. By employing Chebyshev distance to precompute and sort traversal orders for grid cells (e.g., 48 regions in 3D), algorithms can prioritize closer neighbors and terminate early upon reaching a distance threshold, avoiding exhaustive searches. This reduces evaluation time by about 15% in 3D relative to the original formulation, while preserving output quality.[2]
Complementing this, adaptive feature point placement via quadtree subdivision introduces non-uniform seed density. Cells are recursively split until a point is inserted, enabling localized detail amplification—such as denser cells in high-frequency areas—without global performance degradation. Implemented with precomputed relative coordinates, this variant supports up to 20% faster rendering in adaptive scenarios, facilitating more varied textures like irregular organic surfaces.[2]
Periodicity artifacts, inherent in grid-based Worley noise for tiling, are mitigated through non-periodic modifications using Wang tiles. The noise function is reformulated to map onto a minimal tile set, generating seamless, aperiodic patterns at runtime or via preprocessing. This approach integrates with GPU hardware filtering, reducing visible repetition in large textures, with a small increase in evaluation cost.[17]
For greater structural variety, Worley noise is often combined with other procedural techniques, such as anisotropic noises, to produce directional details like fibrous materials. Such integrations enhance realism in 3D procedural modeling while maintaining compactness.[18]