**Pivot Painter** Material Functions allow you to tap into the Pivot Painter MAXScript, which stores rotation information within the vertices of a mesh. This is a great way to handle dynamic motion on Static Meshes.

Although the data provided by Pivot Painter can be utilized without these functions, they do make the process much easier.

The following is a list of all the functions underneath the Pivot Painter category.

These functions are used to process and organize world position and angle information stored in the model's UVs by the Pivot Painter MAXScript.

This particular function is specifically designed to work with object hierarchies.

Item | Description |
---|---|

Inputs | |

| This value should match the value that was used in the MAXScript "Max Dist for Parent Piv" spinner while painting your asset. |

Outputs | |

| Returns the pivot point information for each parent in world space. Children return the pivot point information of the parent they are attached to. |

| Returns a normalized vector pointing down the parent's x-axis. |

| Return the pivot position information in world space for each child. Parents return a value of (0,0,0). |

| Returns a normalized vector pointing down the parent's x-axis. |

| Location of the object's pivot point. |

| The orientation of the object. |

| The scale of the object. |

| (Currently non-functional) Returns a black value for surfaces that are painted black by the Pivot Painter tool. |

The outputs labeled "-----------------" exist as separators in the list and are not intended to be used.

This particular function is designed to work on a per-object basis.

Item | Description |
---|---|

Outputs | |

| Returns the pivot point information for each element in world space. |

| Returns a normalized vector pointing down the element's X-Axis, which points from the pivot point toward the averaged center of the mesh. |

| Returns a random value per element in the 0-1 range. |

| Returns the custom falloff values stored in the vertex alpha channel of the model. |

| Returns a scalar value that is equal to the object's uniform scale. |

This function is designed to work specifically with individual foliage objects.

Item | Description |
---|---|

Inputs | |

| Takes in the incoming vector for the wind's direction and magnitude. |

| Set to |

| Enter a local vector to be used as the element's rotation axis. This is only viable if the |

Outputs | |

| Returns the pivot point information for each element in world space. |

| Returns a rotation axis for branches to be used with the "RotateAboutAxis" node. Leaves return the same information. Note: The angle is found by transforming a vector along the branch's x-axis from local to world space. Then the cross product is found between the wind direction and the transformed vector. |

| Returns a normalized vector pointing down the elements X-Axis. Which points from the pivot point toward the averaged center of the mesh. |

| Returns a random value per element in the 0-1 range. |

| Returns the custom falloff values stored in the vertex alpha channel of the model. |

| The vector for the wind direction and magnitude normalized to 0-1. |

| Outputs wind speed multiplied by time multiplied by -1. |

| Returns wind strength. The magnitude of the wind vector found by calculating distance from the wind vector to 0. |

| Returns a scalar value that is equal to the object's uniform scale. |

| Returns a scalar value that is equal to the object's uniform scale. |

The outputs starting with *tree* process the model's UV information as it would be stored by the Pivot Painter MAXScript. The outputs starting with *Leaf* process the UV information as it would be stored by the per-object pivot painting section of the script.

Item | Description |
---|---|

Inputs | |

| This is the direction that the wind will be blowing. |

| This value should match the value that was used in the max script "Max Dist for Parent Piv" spinner while painting your asset. |

Outputs | |

| Returns the pivot point information for each branch in world space. Leaves return the pivot point information of the branch they are attached to. |

| Returns a rotation axis for branches to be used with the "RotateAboutAxis" node. Leaves return the same information. Note: The angle is found by transforming a vector along the branch's x-axis from local to world space. Then the cross product is found between the wind direction and the transformed vector. |

| Returns a normalized vector pointing down the branches x-axis. This is not typically needed for foliage animations unless it is needed for custom vector calculations. |

| Returns a gradient value in the direction of the blowing wind. |

| Returns a gradient value across world space at a 90 degree angle to the wind. |

| Return the pivot position information in world space for each leaf. Branches return a value of (0,0,0). |

| Returns a rotation axis for leaves to be used with the "RotateAboutAxis" node. Branches return (0,0,0). Note: The angle is found by transforming a vector along the leaf's x-axis from local to world space. Then the cross product is found between the wind direction and the transformed vector. |

| Returns a normalized vector pointing down the branches x-axis. This is not typically needed for foliage animations unless it is needed for custom vector calculations. |

| Returns a white mask for leaves. All branches are black. |

| Returns a gradient value in the direction of the blowing wind. |

| Returns a gradient value across world space at a 90 degree angle to the wind. |

| Returns the pivot point location of the object. |

| Returns the orientation of the object. |

| Returns the rotation axis for the object. |

| Returns the scale of the object. |

| Gradient aligned with the wind vector at object level in world space. |

| Gradient aligned with the wind vector at object level in world space, rotated 90 degrees. |

| Returns wind strength. The magnitude of the wind vector found by calculating distance from the wind vector to 0. |

| Returns a normalized wind vector with a magnitude between 0-1. |

| Wind speed multiplied by time. |

| Returns a black value for surfaces that are painted black by the pivot painter tool. This mask only works in the vertex shader. |