Scalar fields

A formula that hands back a single number at every point in space — the "how much" of anything.

What it is

A scalar field is the simplest, most-wired kind of Fields. Ask it for a value anywhere — a vertex, a pixel, a point in a Collections — and it answers with one number.

That number can mean whatever you want it to: a mask (0 to 1), a height, a density, a displacement strength, an opacity, a temperature. The field doesn't store those numbers anywhere; it computes them on demand, point by point, every time something samples it.

If you've ever wanted a value to vary across space instead of being a single flat setting, a scalar field is the thing you reach for.

When to reach for it

Use a scalar field whenever a parameter should change depending on where you are:

How to use it

Scalar fields come from lots of places:

Then wire the field into whatever should respond: a displace node, an opacity slot, a material input, or a parameter you want to vary across the canvas.

To turn a scalar field into colour, run it through a utility.gradient. The gradient maps each number to a colour, so a grey mask becomes a full spectrum.

Gotcha

A scalar field only knows numbers, not colour. If you feed one straight into a slot expecting colour, you'll get greyscale — the same number copied into red, green, and blue. That's not a bug; it's the field doing the only thing it can. When you want real colour, convert through a utility.gradient or reach for a Colour fields instead.

DNA converts between field kinds automatically where it can, so a scalar field will happily slot in wherever a number-at-every-point is expected. See Automatic conversion.

See also