Arithmetic Nodes
Basic mathematical operations for numeric calculations including addition, subtraction, multiplication, and division.
Basic mathematical operations for numeric calculations including addition, subtraction, multiplication, and division.
This category contains 14 nodes.
Nodes
Add
Adds two numbers.
Inputs: Two numbers to add.
| Name | Type | Range | Default |
|---|---|---|---|
| A | Number | any | 0 |
| B | Number | any | 0 |
Outputs: The sum.
| Name | Type | Range |
|---|---|---|
| Number | Number | any |
Add Color
Combines two colors by adding them together. Useful for layering light effects.
Inputs: Two colors to combine.
| Name | Type | Range | Default |
|---|---|---|---|
| Color 1 | Color | color | [0, 0, 0, 0, 0, 0] |
| Color 2 | Color | color | [0, 0, 0, 0, 0, 0] |
Outputs: Combined color (channels add together).
| Name | Type | Range |
|---|---|---|
| Color | Color | color |
Add Vectors
Adds two positions together. Use for offsets or combining movements.
Inputs: Two positions to add.
| Name | Type | Range | Default |
|---|---|---|---|
| Vector A | Vector | vec | [0, 0, 0] |
| Vector B | Vector | vec | [0, 0, 0] |
Outputs: Combined position.
| Name | Type | Range |
|---|---|---|
| Vector | Vector | vec |
Divide
Divides A by B. Returns 0 if B is zero.
Inputs: A divided by B.
| Name | Type | Range | Default |
|---|---|---|---|
| A | Number | any | 0 |
| B | Number | any | 1 |
Outputs: The quotient.
| Name | Type | Range |
|---|---|---|
| Number | Number | any |
Mix Color
Blends between two colors. At ratio 0 outputs Color 1, at ratio 1 outputs Color 2, in between outputs a smooth blend.
Inputs: Ratio controls the blend (0 to 1). Two colors to blend between.
| Name | Type | Range | Default |
|---|---|---|---|
| Ratio | Number | 0-1 | 0.5 |
| Color 1 | Color | color | [255, 0, 0, 0, 0, 0] |
| Color 2 | Color | color | [0, 255, 0, 0, 0, 0] |
Outputs: The blended color.
| Name | Type | Range |
|---|---|---|
| Color | Color | color |
Mix Number
Blends between two numbers. Ratio of 0 gives first value, 1 gives second, 0.5 gives halfway.
Inputs: Two values and blend ratio (0-1).
| Name | Type | Range | Default |
|---|---|---|---|
| Ratio | Number | 0-1 | 0.5 |
| Value 1 | Number | any | 0 |
| Value 2 | Number | any | 1 |
Outputs: Blended value.
| Name | Type | Range |
|---|---|---|
| Value | Number | any |
Mix Vector
Blends between two positions. Ratio of 0 gives first, 1 gives second, 0.5 gives midpoint.
Inputs: Two positions and blend ratio (0-1).
| Name | Type | Range | Default |
|---|---|---|---|
| Ratio | Number | 0-1 | 0.5 |
| Vector A | Vector | vec | [0, 0, 0] |
| Vector B | Vector | vec | [1, 1, 1] |
Outputs: Blended position.
| Name | Type | Range |
|---|---|---|
| Vector | Vector | vec |
Multiply
Multiplies two numbers.
Inputs: Two numbers to multiply.
| Name | Type | Range | Default |
|---|---|---|---|
| A | Number | any | 0 |
| B | Number | any | 0 |
Outputs: The product.
| Name | Type | Range |
|---|---|---|
| Number | Number | any |
Multiply Vector
Scales a position by a number. Multiply by 2 to double, by 0.5 to halve.
Inputs: Position and scale factor.
| Name | Type | Range | Default |
|---|---|---|---|
| Vector | Vector | vec | [0, 0, 0] |
| Scalar | Number | any | 0 |
Outputs: Scaled position.
| Name | Type | Range |
|---|---|---|
| Vector | Vector | vec |
Power
Raises a number to a power. Use 2 for squaring, 0.5 for square root, etc.
Inputs: Base number and exponent.
| Name | Type | Range | Default |
|---|---|---|---|
| Base | Number | any | 2 |
| Exponent | Number | any | 1 |
Outputs: Base raised to the exponent.
| Name | Type | Range |
|---|---|---|
| Number | Number | any |
Power Vector
Raises each base component to its corresponding exponent. Independent power for each axis.
Inputs: Base values and exponents for each axis.
| Name | Type | Range | Default |
|---|---|---|---|
| Base | Vector | vec | [2, 2, 2] |
| Exponent | Vector | vec | [1, 1, 1] |
Outputs: Vector with powered values.
| Name | Type | Range |
|---|---|---|
| Vector | Vector | vec |
Remainder
Gets the leftover after division. 10 mod 3 gives 1. Great for creating repeating patterns.
Inputs: Number to divide and the divisor.
| Name | Type | Range | Default |
|---|---|---|---|
| A | Number | any | 0 |
| B | Number | any | 1 |
Outputs: Remainder after division.
| Name | Type | Range |
|---|---|---|
| Number | Number | any |
Subtract
Subtracts B from A.
Inputs: A minus B.
| Name | Type | Range | Default |
|---|---|---|---|
| A | Number | any | 0 |
| B | Number | any | 0 |
Outputs: The difference.
| Name | Type | Range |
|---|---|---|
| Number | Number | any |
Subtract Vector
Subtracts one position from another. Useful for finding direction or offset between points.
Inputs: Two positions (A minus B).
| Name | Type | Range | Default |
|---|---|---|---|
| Vector A | Vector | vec | [0, 0, 0] |
| Vector B | Vector | vec | [0, 0, 0] |
Outputs: Difference between positions.
| Name | Type | Range |
|---|---|---|
| Vector | Vector | vec |