Gradient
Generate gradient ramps and colour lookups.
What it does
Gradient maps a value through a multi-stop colour ramp. A number in maps a single value; a number array maps every element at once. Leave the value input empty and Gradient becomes a spatial colour field, Linear, Radial, Angular or Diamond, driven by the Start/End gizmo points and rendered as an image by default.
Wire points carrying a colour attribute into Points and the node switches to Point Interpolation: each point's colour is blended into a continuous field by inverse-distance weighting, ignoring the gradient stops and direction.
When to use it
Remapping a value or a whole array of values to colour: grading, false-colour visualisation, colour-by-attribute
A spatial colour backdrop, linear, radial, angular or diamond, without drawing a shape
A scatter of coloured points turned into a smooth colour field: Point Interpolation
An animating or tiling gradient: Phase and Period
| Parameter | Type | Default | What it does |
|---|---|---|---|
value | Number or Number[] | — | Value to remap (0-1 range). Accepts Number or NumberArray. |
gradient | Gradient | Gradient | Color gradient to map values through |
points | Collection | — | Points with a @Cd colour attribute — when wired, IDW-blend their colours into a field (Point Interpolation) |
phase | Number | 0 | Phase offset: shifts the gradient position |
period | Number | 1 | Period: how many times the gradient repeats (1.0 = once) |
interpolation | String | "Linear" | Interpolation between gradient stops. One of: Linear, Smooth, Step, Constant. |
color_space | String | "Linear" | Color space for blending: Linear RGB (fast), HSV Near (shortest hue arc), HSV Far (longest hue arc). One of: Linear, HSV Near, HSV Far. |
extend_left | String | "Hold" | How to handle values below 0. One of: Hold, Repeat, Mirror, Zero. |
extend_right | String | "Hold" | One of: Hold, Repeat, Mirror, Zero. |
direction | String | "Linear" | Direction of the gradient. One of: Linear, Radial, Angular, Diamond. |
gradient_start | Vec3 | (-256, 0, 0) | Start point of the gradient in world space |
gradient_end | Vec3 | (256, 0, 0) | End point of the gradient in world space |
interp_radius | Number | 100 | Point Interpolation: maximum distance to search for source points |
interp_falloff | Number | 2 | Point Interpolation: distance falloff exponent (2 = inverse square, higher = sharper) |
rasterize | Boolean | true | On: bounded raster (field modes). Off: raw infinite colour field. |
resolution | Vec2 | (512, 512) | Rasterize resolution [width, height] — a window into the field; bigger reveals more. |
opacity | Number | 1 | Layer opacity (0 = transparent, 1 = opaque). Editable, wirable, keyframable. |
Gotchas
Extend Left and Extend Right can differ. Set one edge to Hold and the other to Repeat for a gradient that clamps on one side and tiles on the other.
Direction (Linear/Radial/Angular/Diamond) affects the spatial colour field only, the case where nothing is wired into Value. Once a Number or Number Array is wired, or instance colouring is in use, the gradient reads a plain 0–1 position and Direction has no effect.
Wiring Points switches the node to Point Interpolation and overrides everything gradient-related: stops, Direction, Interpolation and Rasterize are all ignored. The output is always a raw colour field; bake it downstream, for example with Fit or a rasterising consumer, to get an image.
Worked example
Add a Gradient. With nothing wired into Value, a linear colour field appears between the Start and End gizmo points in the viewport.
Drag the Start/End gizmo handles, or switch Direction to Radial for a colour burst from the centre point.
Add stops to the gradient and pick their colours and positions.
To recolour data instead, wire a Number or Number Array into Value. The output becomes a single colour or a colour array, one per input value.
To recolour a scatter of points, wire them into Points instead. The gradient stops are ignored and colours blend from each point's own colour.
See also
Mix · Lookup · Random · Colour fields