<sk-random-spatial-field>

← prev index next →

Uncorrelated random weight per point (or per cell) — the field for scattering variation across clones without any smooth pattern.

Remarks

This is the random member of the SpatialField family: like every field it turns where into how much — a scalar weight over space that consumers read by #id (field="#id") to vary an effect from place to place. Unlike sk-noise-spatial-field, neighbouring points are not related: the weight is a hash of position, so it looks like white noise — ideal for per-clone jitter (random scale, random tint) rather than smooth blobs.

Key attributes. seed picks the pattern deterministically — the same seed always gives the same scatter, and changing it reshuffles every value. cell-size quantizes position to a grid before hashing: at 0 every point gets its own value (per-fragment white noise), while a larger cell makes whole blocks of space (and every clone inside one block) share a single value — the way to randomize per object/cluster instead of per fragment.

Related. It shares the field="#id" model with every field. Its smooth counterpart is sk-noise-spatial-field (coherent, cloud-like). Typical consumers are a sk-tonemap (random tint), a sk-simple-point-constraint (random per-clone scale), and sk-field-constraint (drive one property).

Serve these docs to run the live example. WebGPU needs a secure context — open this page via grunt serve rather than double-clicking the file. The Markup tab works from disk.

Attributes

AttributeTypeDefaultDescription
id <id> The element's unique identifier — the standard HTML global id attribute.
remap-curveanimatable <remap-curve> Optional remapping curve to reshape the field's [0, 1] output.
remap-phaseanimatable <number> 0 Horizontal remap phase — an animatable scalar that translates a present
seedanimatable <number> 0 Deterministic seed.
cell-sizeanimatable <number> 1.0 Quantization cell size. When > 0, positions are quantized to a grid. When 0, each unique position gets a unique value.