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:
Masks — fade an effect in over here, leave it alone over there.
Displacement — push a surface out by the field's value, so noise becomes mountains and ripples.
Opacity — drive transparency so an object dissolves from one side to the other.
Density — tell a Distance fields & volumes how thick the smoke is at each point.
Driving any parameter — wire a field into almost any number slot to make it spatial.
How to use it
Scalar fields come from lots of places:
Noise — generate.noise is the classic source of organic, wandering values.
Patterns and gradients — geometry.pattern and utility.gradient give you structured ramps and tiles.
A shape's distance — a Distance fields & volumes hands you "how far from the surface" as a number.
An image's brightness — sample a Rasters (images) and read its lightness as the value.
An The Expression language — write a tiny formula and the result is the field.
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
utility.gradient
generate.noise