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
| Port | Type | Direction | Description |
|---|---|---|---|
out | imageRgba16f | output | GPU rasterized random texture (grayscale) |
scalar | scalar | output | Single random value (hash at origin) |
vec2 | vec2 | output | Two decorrelated random values |
scalarField | scalarField | output | Per-sample random field [0, 1] |
vectorField | vectorField | output | Per-sample decorrelated 2D random field |
Parameters
| Param | Type | Default | Description |
|---|---|---|---|
seed | scalar | 0 | Random seed. Different seeds produce completely different patterns. |
scale | vec2 (linked) | 100, 100 | Block size in pixels. Scale=1 gives per-pixel randomness. Scale=100 gives 100x100 pixel blocks of uniform random color. |
evolution | scalar | 0 | Temporal 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:
| Port | Type | Overrides |
|---|---|---|
seed_in | scalar | seed |
scale_in | vec2 | scale |
evolution_in | scalar | evolution |
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
Connect scalarField to PointAttributes or ShapeAttributes to give each point/vertex a random scale, rotation, opacity, or color value.
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
Related Nodes
- Noise — spatially coherent alternative (smooth patterns, fBm, looping)
- Remap — reshape random distribution via curve
- Colorize — map random scalar values to color ramp
- PointAttributes — apply random field per-point
- ShapeAttributes — apply random field per-vertex