Builtin Library
README.md
field.worley
Cellular noise: at each element, the distance to the nearest of a set of scattered feature points, one per cell of the scaled position, searched across the 27 neighbouring cells.
Inputs
position(Field<Vec3> | Vec3, optional). Where each element samples the field. Left unwired, it isfield.position(): thePcolumn of the domain the field is evaluated over.frequency(Float). Default1. How many cells per unit of the position.jitter(Float). Default1. How far each cell's feature point wanders from the cell's centre, 0 to 1: 0 is a regular grid.seed(Float). Default1. Which of the possible patterns this is; the same seed replays the same field everywhere.
Outputs
field: a Float field.
Example
local points = g.points.grid({ countX = 4, countZ = 1, spacing = 1 })
local out = g.attribute.set({ geometry = points, name = "v", value = g.field.worley({ frequency = 0.5, jitter = 1 }) })