Math
Math
The Math node applies a selected arithmetic, trigonometric, or comparison operation to two input values. Values can be provided via incoming connections or slider parameters.
Availability
This node requires Pro.
Common uses
- Use clamp to keep results between 0 and 1.
- Connect grayscale maps to apply operations per-pixel.
Input ports
-
a -
b -
Takes two input values (either parameters or connections).
Output ports
-
out -
Outputs the calculated result (r channel).
Parameters
| Parameter | Type | Default | Range or values |
|---|---|---|---|
| Operation | enum | add | add, subtract, multiply, divide, power, logarithm, sqrt, inversesqrt, absolute, exponent, minimum, maximum, lessThan, greaterThan, sign, round, floor, ceil, truncate, fraction, modulo, snap, pingpong, sine, cosine, tangent, arcsine, arccosine, arctangent, arctan2, radians, degrees |
| Value 1 | float | 0.5 | -10 to 10 |
| Value 2 | float | 0.5 | -10 to 10 |
| Clamp | bool | false | - |
Behavior
- Evaluates standard math operations.
- If map inputs are provided, runs per-pixel.
Common mistakes
- Division by zero defaults to 0 safely.
- Using non-grayscale maps might yield unexpected results.