Fields

A field is a living formula — it has a value at every point in space, worked out on the spot, not stored anywhere.

A field is a recipe, not a thing

Most data in DNA is stored. A collection holds a fixed list of rows. A raster holds a fixed grid of pixels. A field is different: it holds no values at all. Instead it holds a rule for producing a value anywhere you ask.

Think of a field as the answer to a question like "how loud is the noise here?" or "what colour belongs at this spot?". You can ask that question at a single point, at a million points, or across a whole surface — and DNA only does the work for the points you actually use.

Because a field is a recipe, it costs almost nothing to carry around and stays infinitely sharp. Zoom in forever and a noise field never goes blocky, because there are no pixels to run out of — the value is recomputed for wherever you're looking.

If you ever want a field as concrete, stored data — to paint it onto pixels, export it, or hand it to something that needs a grid — bake it into a Rasters (images) or a Distance fields & volumes. Baking freezes the recipe into stored values.

The flavours of field

A field always returns something at each point, but what it returns depends on its flavour:

Different flavours mix gracefully. Ask a colour field for a single number and you get its brightness; ask a scalar field for a colour and you get greyscale. DNA converts automatically so wiring rarely fights you.

Where fields come from, where they go

Fields are produced by generator nodes — noise, gradients (Scene values), patterns, a mesh.sphere's distance, a sampled image — and by the The Expression language node, where you can write your own per-point formula.

Once you have a field, you feed it into something that samples it:

Because the recipe travels with the field, the same noise can drive colour on one node and displacement on another, in perfect lock-step — they're both asking the same question, just expecting different answers.

Field vs collection vs raster

These three are easy to confuse, so here's the short version:

Reach for a field whenever you want something continuous, resolution-free, and cheap to carry; reach for a raster or collection when you need concrete, countable, exportable data.

See also