Math
Perform arithmetic, rounding, trigonometric, exponential, min/max, and smoothing operations on numbers and vectors.
What it does
Math performs arithmetic and mathematical functions on operands wired in or typed directly. It works across numbers, vectors, number lists, images and Volumes, matching pixels, voxels or list entries element-by-element and broadcasting a single number across the others. Add, Multiply, Power and the rest fold left-to-right across all operands; functions such as Sin, Sqrt and Abs act only on the first.
Operands start at two and grow with the + socket up to 64. An operand left unwired keeps whatever value was typed into its slider rather than being treated as zero, so a Multiply or Min chain still gives the expected answer with some pins disconnected.
When to use it
Two or more values combined with the same operation: numbers, vectors, images or Volumes
A shaping function on a single value: Abs, Floor, Round, Sqrt, a trig function, Sigmoid or Gaussian
A smooth blend rather than a hard Min/Max: SmoothMin/SmoothMax with a smoothing radius
Clamping a value into a range, or remapping it with a smooth 0–1 curve: Clamp or Smoothstep
Combining directions or offsets: Atan2 (angle from x/y) or Step (threshold test)
| Parameter | Type | Default |
|---|---|---|
input_count | Number | 2 |
operation | String | "Add" |
smooth_k | Number | 10 |
Gotchas
An operand slot that is neither wired nor given a typed value is dropped entirely rather than folded in as 0, so removing a connection from a Multiply or Min chain does not zero the result.
Clamp and Smoothstep read exactly three operands (value/lo/hi and edge0/edge1/x). With fewer than three wired or typed, operand 0 passes through unchanged; add a third operand to get clamping or smoothstepping.
Smooth K appears only when Operation is SmoothMin or SmoothMax. It has no effect on any other operation, including plain Min and Max.
Worked example
Add a Math node and set Operation to Add.
Wire two images into Input 0 and Input 1 to add them pixel-by-pixel, or leave a slider unconnected and type a value to add a flat offset instead.
Click the
+socket to add a third operand, then switch Operation to Clamp to keep the combined result inside a lo/hi range.Switch Operation to SmoothMin and raise Smooth K to round off a hard minimum into a soft blend between two values.