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 |
|---|---|---|
value | OneOf([Number, NumberArray]) | — |
gradient | Gradient | Gradient(Gradient { stops: [GradientS... |
points | OneOf([Collection]) | — |
phase | Number | 0 |
period | Number | 1 |
interpolation | String | "Linear" |
color_space | String | "Linear" |
extend_left | String | "Hold" |
extend_right | String | "Hold" |
direction | String | "Linear" |
gradient_start | Vec3 | (-256, 0, 0) |
gradient_end | Vec3 | (256, 0, 0) |
interp_radius | Number | 100 |
interp_falloff | Number | 2 |
rasterize | Boolean | true |
resolution | Vec2 | (512, 512) |
opacity | Number | 1 |
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