Skip to content

Math Nodes

Arithmetic and tonal quantization. All three carry an optional Mask, and all three fall back to their own input where the mask is dark.

Type id: math

Applies one arithmetic operation between two inputs, pixel by pixel and channel by channel. The general-purpose value node. Reach for it to offset, scale, clamp or combine maps without any visual character of its own.

Inputs

  • A (any texture, required): the first operand; its alpha is carried to the output.
  • B (grayscale, required): the second operand. Typed grayscale for socket coloring, but any texture connects and a color one is applied channel by channel.
  • Mask (grayscale, optional): where dark, A passes through unchanged.

Outputs

  • Output (any texture): the result, clamped to the 0 to 1 range.
ParameterTypeDefaultRange / OptionsNotes
ModeChoiceAddAdd, Subtract, Multiply, Divide, Min, Max, PowerSeven operations, in this order. Add saturates at white and Subtract bottoms out at black. Divide and Power are guarded against a zero operand, so black regions in B never produce runaway values.

Both A and B must be connected before the node evaluates.

Type id: threshold

Cuts the input into pure black and white at a chosen level, turning any gradient into a hard mask. Color input is reduced to brightness first, weighted so green contributes most and blue least.

Inputs

  • Input (any texture, required): the map to cut.
  • Mask (grayscale, optional): where dark, the input passes through unchanged.

Outputs

  • Output (grayscale): the two-tone mask. The input’s alpha is preserved.
ParameterTypeDefaultRange / OptionsNotes
ThresholdFloat0.50.0 to 1.0The cutoff. Above it goes white, below goes black.
SoftnessFloat0.00.0 to 0.5How far the transition extends on each side of the cutoff. At 0 the edge is hard; at 0.5 the ramp covers the whole range and the result reads as a smooth gradient.

Type id: posterize

Quantizes the input to a fixed number of steps, replacing continuous gradation with flat bands. Used for stylized looks and for stepped-height effects like terraces or stacked plating.

Inputs

  • Input (any texture, required): the map to quantize.
  • Mask (grayscale, optional): where dark, the input passes through unchanged.

Outputs

  • Output (grayscale): the banded result. The input’s alpha is preserved.
ParameterTypeDefaultRange / OptionsNotes
StepsWhole number42 to 32How many tonal levels remain. Each channel is quantized independently, so at 2 a color input collapses to the eight combinations of full-on and full-off channels.