Vector

 Click here to expand Table of Contents...


Nodes here are for vectorial math.

Abs

Outputs the absolute value of a vector (no negative numbers).

Add

The Add node simply adds two vectors. Vectors are assumed to contain three elements X, Y, and Z. This node adds the vectors so that:

ResultX = AX + BX

ResultY = AY + BY

ResultZ = AZ + BZ

Add4

The Add4 node simply adds together four vectors. Vectors are assumed to contain three elements X, Y, and Z. This node adds the four input vectors together so that:

ResultX = Vec 1X + Vec 2X + Vec 3X + Vec 4X

ResultY = Vec 1Y + Vec 2Y + Vec 3Y + Vec 4Y

ResultZ = Vec 1Z + Vec 2Z + Vec 3Z + Vec 4Z

Add Scaled

The Add Scale node adds a value to a scaled value. The scale works based on a percent, which means a scale of 100% is the same as multiplying by 1.0. A scale of 50% is the same as multiplying by 0.5, and a scale of 0% is the same as multiplying by 0.0. Vectors are assumed to contain three elements X, Y, and Z. This node adds the A and B vectors together and scales the result so that:

ResultX = AX + BX x Scale

ResultY = AY + BY x Scale

ResultZ = AZ + BZ x Scale

Cross

A vector cross product calculates the result as being the product vector orthogonal to both input vectors. Imagine two vectors X and Y on a plane where Y points up the plane and X across it. The cross product would be a vector that points directly out of the plane, which is otherwise referred to as the Z vector (this can also be considered the normal to the plane).

Distance

The distance node derives the distance between the two input points To and From.

Divide

The Divide node simply divides one vector by another. Vectors are assumed to contain three elements X, Y, and Z. This node divides the vectors so that:

ResultX = AX / BX

ResultY = AY / BY

ResultZ = AZ / BZ

A computer finds it easier to multiply than divide. Consider multiplying instead of dividing. 4 x 0.5 gives the same result as 4/2.

Dot

A vector dot product calculates the cosine of the angle between two vectors. The dot product ranges from -1.0 to 1.0. Taking the inverse cosine of this output yields the angle between the two input vectors.

HPB

Inputs a vector and separate Bank scalar and outputs a Vector result. The input vector can be coordinates or a color.

HPBAdd, HPBMatrix, MatrixHPB, Multiply Matrix 3x3, Transpose Matrix 3x3

These nodes are intended for the Virtual Studio rather than the Surface Editor and are described in that section of the manual.

Length

The Length node determines the length of any vector.

Matrix4

Creates an affine transform matrix (translate, rotate, scale).  Users can envelope the values.

Max

Will compare the Vector input with the numbers entered and return the higher value.

Mod

Will take the vector input, divide it by the numbers entered and return the remainder as a vector.

Multiply

The Multiply node simply multiplies one vector by another. Vectors are assumed to contain three elements X, Y, and Z. This node multiplies the vectors so that:

ResultX = AX x BX

ResultY = AY x BY

ResultZ = AZ x BZ

Normalize

Vector normalization involves taking a vector and finding its length. All three elements of the vector are then divided by this length. This has the effect of creating a normalized vector, that is, a vector with the same direction as the input vector but with a unit length.

Scale

The scale function simply scales the size of the vector. The scale works based on a percent, which means a scale of 100% is the same as multiplying by 1.0. A scale of 50% is the same as multiplying by 0.5, and a scale of 0% is the same as multiplying by 0.0. Vectors are assumed to contain three elements X, Y, and Z. This node adds the A and B vectors together and scales the result so that:

ResultX = VectorX x Scale

ResultY = VectorY x Scale

ResultZ = VectorZ x Scale

Subtract

The Subtract node simply subtracts one vector from another. Vectors are assumed to contain three elements X, Y, and Z. This node subtracts the vectors so that:

ResultX = AX - BX

ResultY = AY - BY

ResultZ = AZ - BZ

Subtract Scaled

The Subtract Scale node subtracts two vectors, then scales the result. The scale works based on a percent, which means a scale of 100% is the same as multiplying by 1.0. A scale of 50% is the same as multiplying by 0.5, and a scale of 0% is the same as multiplying by 0.0. Vectors are assumed to contain three elements X, Y, and Z. This node adds the A and B vectors together and scales the result so that:

ResultX = ( AX - BX ) x Scale

ResultY = ( AY - BY ) x Scale

ResultZ = ( AZ - BZ ) x Scale

Transform

The Transform node allows a vector in object space to be transformed into the same vector in world space. This may also be applied in reverse so that a vector in world space can be transformed into object space.

Transform2

The Transform2 node allows a vector to be translated using a 3x3 transformation matrix as defined by the user. Here, the Right input defines the top row of the transformation matrix, the Up vector the middle row, and the Forward vector the bottom row. A switch is provided so that the inverse transform and/or a transposed transform can be performed using the same transformation matrix.

Transform Point

A more general transform node. Can apply translate/rotate/scale to a vector with a pivot position and pivot rotation. Can also use Right/Up/Forward inputs to define a transformation from a coordinate system. Outputs the transformed vector, and the transform itself in the form of a translation and a transform coordinate system.