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

ParameterTypeDefault
valueOneOf([Number, NumberArray])
gradientGradientGradient(Gradient { stops: [GradientS...
pointsOneOf([Collection])
phaseNumber0
periodNumber1
interpolationString"Linear"
color_spaceString"Linear"
extend_leftString"Hold"
extend_rightString"Hold"
directionString"Linear"
gradient_startVec3(-256, 0, 0)
gradient_endVec3(256, 0, 0)
interp_radiusNumber100
interp_falloffNumber2
rasterizeBooleantrue
resolutionVec2(512, 512)
opacityNumber1

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