Derive

Derive a differential operator (gradient, edges, normal, curvature, laplacian, divergence, curl, magnitude) or a colour-model operator (hue, saturation, luminance) from a field, and either replace the field with the result or capture it as a named channel.

What it does

Derive applies one operator to a field and returns the result as a field. Eight are differential: Gradient, Edges, Normal, Curvature, Laplacian, Divergence, Curl and Magnitude. Three read the colour model: Hue, Saturation and Luminance.

The operator is evaluated at each sample position as it is asked for. Nothing is baked to a grid, so the result carries no resolution and no grid boundary.

Disposition sets the shape of the output. Replace returns the operator result alone. Capture staples it onto the incoming field as a named channel and returns a record, keeping the original alongside it.

When to use it

ParameterTypeDefaultWhat it does
fieldFieldInput field (scalar / distance for gradient/curvature/laplacian, vector for divergence/curl/magnitude, colour for hue/saturation/luminance)
modeString"Gradient"Operator to derive: differential (Gradient/Edges/Normal/Curvature/Laplacian/Divergence/Curl/Magnitude) or colour-model (Hue/Saturation/Luminance). One of: Gradient, Edges, Normal, Curvature, Laplacian, Divergence, Curl, Magnitude, Hue, Saturation, Luminance.
dispositionString"Replace"Replace: output IS the operator result (a field). Capture: staple the result onto the input as a named channel (keeps the original field), producing a record. One of: Replace, Capture.
channel_nameString""Capture only: name of the appended channel. Empty = the operator name lowercased (e.g. 'gradient', 'hue').
strengthNumber1Effect strength / wet-dry (0 = no effect, 1 = full). Editable, wirable, keyframable.

Gotchas

Mode fixes both the field kind it needs and the kind it returns. Gradient, Edges, Normal, Curvature and Laplacian take a scalar or distance field. Divergence and Magnitude take a vector field. Curl takes a vector field or a colour potential. Hue, Saturation and Luminance take a colour field. Gradient, Normal and Curl return a vector field; the rest return a scalar field.

The differential operators sample at a fixed step of 0.01 world units. Detail finer than that is invisible to them, at any cook resolution.

Capture names the appended channel after Mode in lower case, gradient or hue, unless Channel Name is set. A record source keeps every channel it already had and gains one. A plain source arrives as a single channel called color for a colour field and value for anything else. A downstream pin with no channel selector reads the colour channel.

Strength has no midpoint. At 0 the input passes through untouched, and at any value above 0 the operator applies in full.

A mismatch is refused rather than approximated. Curl on a scalar field builds no plan, and the node reports a cook error naming the field kind that mode needs.

An image is not a colour field here. A rasterised or volume-backed field is rejected by every mode, so the colour operators need a procedural source. Turn rasterisation off on the node upstream.

Worked example

  1. Wire a Distance Field into Field.

  2. Leave Mode on Gradient for a vector field pointing away from the surface.

  3. Switch Mode to Curvature to pick out ridges and creases in the same field.

  4. Set Disposition to Capture and Channel Name to curv, so the result rides along with the original.

  5. Wire the record into Mask and set its channel selector to curv.

See also

Channel Field · Vector Field · SDF · Fields