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

ParameterTypeDefaultWhat it does
valueNumber or Number[]—Value to remap (0-1 range). Accepts Number or NumberArray.
gradientGradientGradientColor gradient to map values through
pointsCollection—Points with a @Cd colour attribute — when wired, IDW-blend their colours into a field (Point Interpolation)
phaseNumber0Phase offset: shifts the gradient position
periodNumber1Period: how many times the gradient repeats (1.0 = once)
interpolationString"Linear"Interpolation between gradient stops. One of: Linear, Smooth, Step, Constant.
color_spaceString"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_leftString"Hold"How to handle values below 0. One of: Hold, Repeat, Mirror, Zero.
extend_rightString"Hold"One of: Hold, Repeat, Mirror, Zero.
directionString"Linear"Direction of the gradient. One of: Linear, Radial, Angular, Diamond.
gradient_startVec3(-256, 0, 0)Start point of the gradient in world space
gradient_endVec3(256, 0, 0)End point of the gradient in world space
interp_radiusNumber100Point Interpolation: maximum distance to search for source points
interp_falloffNumber2Point Interpolation: distance falloff exponent (2 = inverse square, higher = sharper)
rasterizeBooleantrueOn: bounded raster (field modes). Off: raw infinite colour field.
resolutionVec2(512, 512)Rasterize resolution [width, height] — a window into the field; bigger reveals more.
opacityNumber1Layer 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

  1. Add a Gradient. With nothing wired into Value, a linear colour field appears between the Start and End gizmo points in the viewport.

  2. Drag the Start/End gizmo handles, or switch Direction to Radial for a colour burst from the centre point.

  3. Add stops to the gradient and pick their colours and positions.

  4. 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.

  5. 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