Go to: Related nodes. Attributes.

The Plus Minus Average utility node allows you find the sum, difference or average of a set of input attributes. It has three parts --- two or more input attributes, an operator that you apply to the attributes, and an output attribute that holds the result of the operation.

This node actually has different input attributes for use for different kinds of data. For simple numbers, you use the Input1D attribute and get the result from Output1D. For 2d attributes, such as UV coordinates, you use the Input2D attribute and get the result from Output2D. For 3d attributes, like vectors or colors or 3d coordinates, you use the Input3D attribute and get the result from the Output3D attribute. Each of these input attributes (Input1D, Input2D, and Input3D) are special, in that they each hold a list of values, rather than just one value. Each of the elements of the list is assigned its own number. The first connection is assigned a 0, then next 1, and so on. There are four settings for the operator; No operation, Sum, Subtract, and Average. They are explained below. In the table below, important attributes have their names listed in bold in the description column.

This node is MP safe

Node name Parents Classification MFn type Compatible function sets
plusMinusAverage shadingDependNode utility/general:drawdb/shader/operation/plusMinusAverage kPlusMinusAverage kBase
kNamedObject
kDependencyNode
kPlusMinusAverage

Related nodes

reverse, vectorProduct, chooser, choice, blend, blendTwoAttr, blendWeighted, blendDevice

Attributes (17)

input1D, input2D, input2Dx, input2Dy, input3D, input3Dx, input3Dy, input3Dz, operation, output1D, output2D, output2Dx, output2Dy, output3D, output3Dx, output3Dy, output3Dz

Long name (short name) Type Default Flags
operation (op) enum 1 outputinputconnectablestorable
Operation controls the mathematical operation done by this node. It has four possible values:
No operation: The first input is copied to the output. All other inputs are ignored. Sum: All of the inputs are added together, and the output is set to their sum. Subtract: The output is set to the first input, minus all the other inputs. Average: The output is set to the sum of all the inputs, divided by the number of inputs.
input1D (i1) float 0.0 arrayinputconnectablestorablekeyable
Input1D is the list of input values. Use this particular list to add, subtract, or average simple numerical values. The results of operations on this list will be placed in Output1D.
input2D (i2) float2 0.0, 0.0 arrayinputconnectablestorablekeyable
Input2D is the list of 2d input values. Use this particular list to add, subtract, or average 2d values, such as UV coordinates. The results of operations on this list will be placed in Output2D.
input2Dx (i2x) float 0.0 inputconnectablestorablekeyable
The x component of input2d
input2Dy (i2y) float 0.0 inputconnectablestorablekeyable
The y component of input2d
input3D (i3) float3 0.0, 0.0, 0.0 arrayinputconnectablestorablekeyable
Input3D is the list of 3d input values. Use this particular list to add, subtract, or average 3d values, such as XYZ coordinates or colors. The results of operations on this list will be placed in Output3D.
input3Dx (i3x) float 0.0 inputconnectablestorablekeyable
The x component of input3d
input3Dy (i3y) float 0.0 inputconnectablestorablekeyable
The y component of input3d
input3Dz (i3z) float 0.0 inputconnectablestorablekeyable
The z component of input3d
output1D (o1) float 0.0 outputconnectable
Output1D holds the result of calculations performed on the Input1D list.
output2D (o2) float2 0.0, 0.0 outputconnectable
Output2D holds the result of calculations performed on the Input2D list.
output2Dx (o2x) float 0.0 outputconnectable
The X component of the output 2D value
output2Dy (o2y) float 0.0 outputconnectable
The Y component of the output 2D value
output3D (o3) float3 0.0, 0.0, 0.0 outputconnectable
Output3D holds the result of calculations performed on the Input3D list.
output3Dx (o3x) float 0.0 outputconnectable
The X component of the output 3D value
output3Dy (o3y) float 0.0 outputconnectable
The Y component of the output 3D value
output3Dz (o3z) float 0.0 outputconnectable
The Z component of the output 3D value