Skip to content

Voronoi

Cellular / Worley noise — per-sample distance to the nearest feature point. The procedural primitive behind stained glass, leopard spots, cracked surfaces, bubbles, and crystalline lattices.

Category: Fields Menu path: Fields > Voronoi

Ports

PortTypeDirectionDescription
outimageRgba16foutputGPU rasterization of the distance output (canonical cellular pattern)
scalarscalaroutputDistance sampled at origin
vec2vec2outputUnit direction from origin to its nearest feature point
distancescalarFieldoutputPer-sample distance field, remapped by mode
cellIdscalarFieldoutputPer-sample hash of the containing Voronoi region — constant across each cell. Feed into Colorize for stained-glass coloring.
directionvectorFieldoutputUnit vector from each sample toward its nearest feature point
cellPositionvectorFieldoutputAbsolute position (in comp pixels) of the nearest feature point. Constant across each cell — pipe into ImageSample.uv_in to sample an image once per cell.

Parameters

ParamTypeDefaultDescription
modeenumF1How the distance output is computed. F1 = distance to nearest feature (classic cellular). F2 = distance to second-nearest. F2-F1 = edge-of-cell highlight (cracks, stained-glass borders).
metricenumEuclideanDistance metric. Euclidean = round cells. Chebyshev = square cells. Manhattan = diamond cells.
seedscalar0Pattern seed. Any change fully reshuffles the cells.
scalevec2 (linked)100, 100Cell size in pixels. Smaller = denser cells.
jitterscalar1.0Feature-point randomness inside each cell. 0 = perfect regular grid. 1 = fully randomized. Values in between give mesh-like patterns.
evolutionscalar0Temporal offset — drifts feature points. Animate for living/breathing cellular patterns.

Expose Channels

When enabled (E button on node header), adds input ports that override params via edge connections:

PortTypeOverrides
seed_inscalarseed
scale_invec2scale
jitter_inscalarjitter
evolution_inscalarevolution

How It Works

The canvas is divided into a grid of cells of size scale. Each cell contains one pseudo-random feature point whose position is determined by hashing the cell index together with seed and evolution. jitter controls how far that point can deviate from the cell's center.

At every sample, Voronoi looks at the 3×3 neighborhood of cells around it, finds the nearest feature point (F1), and optionally the second-nearest (F2). The distance output is shaped by mode: F1 gives bright cell interiors fading to dark edges; F2−F1 flips that into bright edges on a dark interior (classic cracked-glass look). cellId returns a constant hash per Voronoi region — pair with Colorize to paint each region a different color.

The primary out texture rasterizes the distance output at GPU speed. The cellId and direction field outputs are evaluated lazily per consumer sample, so cost only shows up when those ports are actually connected.

Usage Examples

Basic: Classic cellular pattern

Voronoi.out → Output. Default params give the textbook cellular look (F1, Euclidean).

Basic: Stained glass

Set mode = F2-F1. Pipe out into Output — you'll see bright cracks on dark cells. Invert (or use Levels) if you want light cells with dark borders. Bump jitter down to ~0.6 for more uniform cell shapes.

Creative: Colored mosaic

Voronoi.cellId → Colorize (with a ramp) → Output. Each Voronoi region gets a distinct color sampled from the ramp. Great for hexagonal-ish color fills.

Creative: Stained glass from an image/video

Voronoi.cellPosition → ImageSample.uv_in; ImageSample (your image/video) → Output. Every sample in a Voronoi cell reads the image at that cell's feature-point position, so the whole cell flattens to a single color taken from the image. Animating evolution makes the mosaic breathe while sampling different spots of your source.

Creative: Cell-driven motion

Voronoi.cellId → PointAttributes (Scale) on a Grid of points, using Colorize-to-Remap beforehand. Each point in the same cell gets the same scale — giving you chunked-randomness animation.

Creative: Flow around cells

Voronoi.direction → PointAdvect on particles. Particles drift toward the nearest feature point — they cluster into cells. Combine with PointTrail to see the migration paths.

Creative: Water caustics

Animate evolution slowly while keeping scale large (~300). F1 in Euclidean + a blue-white Colorize ramp gives shifting caustic patterns.

Tips

  • F2-F1 distances are typically small — the mode already boosts contrast for you. If it still feels muted, pipe through Levels.
  • jitter=0 + metric=Chebyshev gives a perfect square checker field (every cell identical). Useful as a base for repeating patterns.
  • Metric is a big creative lever — Manhattan gives diamond/crystalline shapes that feel very different from Euclidean blobs.
  • For animated cells that don't "pop" on loop, keep evolution monotonic rather than using phase-style cycling.
  • cellId is a true per-region constant — if you need smooth gradients inside each region, use distance instead.
  • Noise — smooth, continuous procedural alternative (no sharp cell boundaries)
  • Random — block-granular per-cell randomness without Voronoi cell shapes
  • Colorize — map cellId or distance to a color palette
  • Remap — reshape distance distribution
  • DistanceField — SDF from an input shape (cousin — Voronoi is to points what DistanceField is to shapes)
  • DrawField — visualize direction / cellId outputs directly