Fields

A field has a value at every point in space, worked out on the spot rather than stored anywhere.

What a field holds

Most data in DNA is stored. A collection holds a fixed list of rows, a raster a fixed grid of pixels. A field holds no values at all. It holds a rule for producing a value anywhere it is asked.

Ask that rule at a single point, at a million points, or across a whole surface. Only the points actually used are evaluated.

Because a field is a rule, it costs almost nothing to carry and has no resolution to run out of. Zoom into a noise field indefinitely and it never goes blocky, because the value is recomputed for wherever you are looking.

To get a field as concrete stored data, for painting onto pixels, exporting, or handing to something that needs a grid, bake it into a Rasters (images) or a Distance fields & volumes. Baking freezes the rule into stored values.

Flavours

A field always returns something at each point. What it returns depends on its flavour.

Flavours mix. Ask a colour field for a single number and you get its brightness. Ask a scalar field for a colour and you get greyscale. The conversion is automatic.

Sources and consumers

Fields come from generator nodes: noise, gradients (Scene values), patterns, a Sphere's distance, a sampled image. They also come from the The Expression language node, where you write your own per-point formula.

They also come from other fields. Derive takes a field in and hands back an operator over it: its gradient, its edges, its normal, its curvature or laplacian, the divergence, curl or magnitude of a vector one, or the hue, saturation or luminance of a colour one. The result is another field, so it composes with everything on this page. Set its Disposition to Capture and the result is added to the input as a named channel instead of replacing it, which is one of the ways a plain field becomes a multi-channel one.

Once you have a field, feed it to something that samples it.

The rule travels with the field, so the same noise can drive colour on one node and displacement on another in lock-step. Both are asking the same question and expecting different answers.

Field vs collection vs raster

Use a field for anything continuous and resolution-free. Use a raster or a collection when you need concrete, countable, exportable data.

See also