Skip to content

Random ​

Hash-based spatially incoherent random field generator. Every sample point gets an independent random value — TV static, not smooth clouds.

Category: Fields Menu path: Fields > Random

Ports ​

PortTypeDirectionDescription
outimageRgba16foutputGPU rasterized random texture (grayscale)
scalarscalaroutputSingle random value (hash at origin)
vec2vec2outputTwo decorrelated random values
scalarFieldscalarFieldoutputPer-sample random field [0, 1]
vectorFieldvectorFieldoutputPer-sample decorrelated 2D random field

Parameters ​

ParamTypeDefaultDescription
seedscalar0Random seed. Different seeds produce completely different patterns.
scalevec2 (linked)100, 100Block size in pixels. Scale=1 gives per-pixel randomness. Scale=100 gives 100x100 pixel blocks of uniform random color.
evolutionscalar0Temporal variation. Any change produces a new random pattern. Animate for flickering/changing randomness.

Expose Channels ​

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

PortTypeOverrides
seed_inscalarseed
scale_invec2scale
evolution_inscalarevolution

How It Works ​

Uses a PCG (Permuted Congruential Generator) hash function to produce pseudo-random values from quantized spatial coordinates. The input position is divided by scale and floored to integer cell coordinates, then combined with seed and evolution bits and hashed. This produces spatially incoherent output — neighboring pixels/cells have no correlation, unlike Noise which produces smooth, coherent patterns.

The texture output rasterizes the field as grayscale (each cell gets a uniform random luminance). The scalar/vec2 outputs evaluate the hash at the origin. The field outputs are the primary creative outputs — they evaluate the hash at each consumer's sample point.

Usage Examples ​

Basic: Per-element randomization (static elements) ​

Connect scalarField to PointAttributes or ShapeAttributes to give each point/vertex a random scale, rotation, opacity, or color value. This is sampled by position — right for a Grid or a scattered shape that stays put. For elements that move (particles, advected points, cloned shapes on a moving stream) see the per-element tip below.

Basic: Animated static ​

Keyframe evolution from 0 to 30 over 30 frames. Each frame gets a completely new random pattern — classic TV static effect.

Creative: Random mosaic ​

Set scale to a large value (e.g. 50x50). Connect scalarField to Colorize with a gradient ramp to create a random colored tile/mosaic pattern.

Creative: Jittered motion ​

Connect vectorField to PointAdvect for Brownian-motion-like jitter. Each point gets an independent random displacement per frame (when evolution is animated).

Tips ​

  • Scale controls the "grain size" — small scale = fine static, large scale = blocky patches
  • Evolution is continuous — even tiny changes produce entirely different patterns
  • For smooth, organic randomness, use Noise instead. Random is for when you want true independence between samples.
  • Pipe through Remap to reshape the distribution (e.g. bias toward high or low values)
  • Pipe through Colorize to map random luminance to a color palette
  • Random per element, not per position. A field is sampled where the element is, so a particle or advected point re-rolls its value every time it crosses into a new cell — visible as flicker. For "one random value per element, fixed for its whole life" use PointAttributes / ShapeAttributes with source: Random (a hash of the element's stable id and a seed), or the @rand01 intrinsic in an Apply To rule (e.g. @rand01 > 0.5 on Point Delete keeps a random half of the stream). Both stay put as the element moves and survive neighbours being deleted.
  • Noise — spatially coherent alternative (smooth patterns, fBm, looping)
  • Remap — reshape random distribution via curve
  • Colorize — map random scalar values to color ramp
  • PointAttributes — apply a random field per point, or source: Random for a fixed per-element value
  • ShapeAttributes — apply a random field per vertex, or source: Random for a fixed per-path value
  • PointSolver — particles: the case where per-element randomness matters most