Control Rig Function Libraries
Article written by Trey M.
Function Libraries are user defined Control Rig graphs to help build and distribute pre-made rigging networks across Unreal 5.0 Control Rig assets.
Users are able to construct and version these libraries and reference them in their Control Rigs to build predefined rigging logic.
Creating Function Libraries in UE 5.0
For the purposes of this article, a Function Library is a Control Rig asset, and shares the same functionality. As of 5.0 there are no discernable differences between them from a technical perspective.
Any function library will differentiate itself by only including functions in the Control Rig asset and not including any dependencies on a skeleton. As a home for Functions it should be as lightweight as possible.
Functions can be either Public or Private. New functions will be marked Private by default, this is a safeguard against accidentally creating unwanted references.
The power of a Public function is that it’s immediately shareable across all rigs within the project, allowing users to immediately distribute changes broadly. Users can control how changes are distributed by utilizing the Private function type.
- The Function will be accessible to all control rig assets in the current UE project.
- Users will be able to access the function inside the Control Rig contextual right-click menu.
- The Category, Keywords, Description, and Color fields can be utilized to document and organize functions.
- Instantaneously distribute rig updates to all rigs in the project.
- Function will only be accessible inside the current control rig asset.
- Any public function can be made private.
- Allow creation of helper functions that multiple public functions may want to reference for easier and more sustainable development.
The function library workflow provides teams and users the ability to immediately share rigging logic inside Control Rig across many assets. Instead of having to build networks and logic by hand repeatedly or manually copying functions between rigs, a function library allows instant access to pre-built rig logic.
We envision function libraries to contain commonly used rig logic such as graphs that would construct modules such as arms, legs, spines, and other core functionality needed to build a rig.
While any function inside any Control Rig asset can be marked as public and accessed similarly, there are a few additional benefits to using a function library over public functions inside a traditional Control Rig asset.
- Separate versioning support for functions.
- Simpler debugging.
- Reference management.
- Multiple libraries for different purposes.
- Simple to diff against previous versions.
- Simplify rig creation for less technical users.
Function libraries can be similarly compared to a library built in python containing rig logic.
Users should be aware of caveats regarding the function library workflow.
Currently function libraries only store graph elements and not Rig Hierarchy elements. Control Rig Function Libraries should only contain functions, variables, and the graph networks that build the functions. Any Rig Hierarchy elements will be ignored when referencing a function in another asset.
The nature of referencing functions across assets will create reference links, thus creating dependencies in assets using a specific function library.
Due to these reference dependencies, it is advisable to take into consideration the location of the function library in relation to how and where it will be used on a project. Proper placement and management of the control rig uasset file will be essential in ensuring that unwanted dependencies are not created.
For example, placing the function library asset inside a plugin will create a dependency on that specific plugin for the current project once the functions are called in other Control Rig assets.
Dependencies between assets can be easily tracked by using the reference viewer.
A user can easily break dependencies between assets by doing the following:
- Localize all the functions being referenced.
- Remove all the functions being referenced.
Users can localize a function which will import the function into the current Control Rig asset to break any unwanted dependencies and create a local copy. Function localization is currently one-way and cannot be converted back to reference the source asset it came from without manual intervention.
It is possible to localize any function by right clicking on the function in the graph and executing the Localization Function option.
Standard Function Library
We are shipping Control Rig in Unreal 5.0 with a Control Rig Standard Function Library.
The goal of the Standard Function Library is to make the barrier of entry into rig building easier and allow artists to start making their animation content even quicker inside Unreal.
- Collection of functions to help build rigging components.
- Examples for using functions and other control rig features.
- To help promote standards for rigging in Unreal.
It is additionally intended to provide an example of how users can construct their own Function Library. Users have the option to use, copy, or expand on the Standard Function Library for their own projects.
We do not consider the Standard Function Library to be a comprehensive character rigging system.
Where is the Standard Function Library?
The Standard Function Library can be located directly inside the Engine’s Control Rig plugin. To access this, enable Show Engine Plugins in the content browser.
Users can access the functions by opening any other Control Rig asset, then using the right click context menu to locate the functions available for use in the appropriate category. Users can search with the keywords “standard function library” to quickly access all of the functions.
Users’ custom Function Libraries will appear in the right click menu similarly when marked as a Public Function.
For more information about Control Rig, check out the documentation.
- For more information about Control Rig, check out the documentation.
Get more answers on the Knowledge Base!