Unreal Engine includes three Dataflow graph nodes to create or update a skeletal mesh and its skeleton directly from hair guide curves in a groom asset.
Prerequisites
Before following the steps on this page, be sure that:
You have set up hair art directability for your project.
Your groom asset contains hair guide curves and an open Dataflow graph.
For setup instructions, refer to Hair Art Directability.
Key Hair Curve Nodes
Three nodes work together to create skeletons from hair curves:
Guides to Joints: Creates or updates a skeletal mesh and skeleton based on a selection of hair guide curves. This is the terminal node in the Dataflow graph and requires an output path for the resulting assets.
Average Curves: Creates a new curve at the average position of all selected groom curves. Use this node to generate a joint chain that represents the volume of a hair group rather than following a single curve.
Resample Curve Points: Adjusts the number of points along a selected curve. Each point produces one joint in the resulting skeleton.
Create a Skeleton from Hair Curves
To create a skeleton from hair curves, do the following:
Add the Guides to Joints node as the final node in your Dataflow graph. This node takes a selection of hair guide curves as input. You can create a selection using the DataFlowSelection node.
In the Guides to Joints node, set the Output Path to the location where you want to save the skeletal mesh and skeleton assets.
Existing assets in the selected location automatically update.
Right-click the Guides to Joints node and select Execute.
Unreal Engine creates or updates the skeletal mesh and skeleton assets at the specified path.
Control Joint Count
To control the number of joints created along a curve, do the following:
Add a Resample Curve Points node in the Dataflow graph before the Guides to Joints node.
Connect the Resample Curve Points node between your curve selection and the Guides to Joints node.
Uncheck the Resample for Simulation option on the Resample Curve Points node to prevent the curve from resizing.
Change the Points Count to the desired number of joints in the joint chain. Each point on the curve produces one joint in the resulting skeleton.
Create Joints in Volumetric Space
To create a joint chain that sits within the volume of a hair group rather than following a single curve, do the following:
Add a Selection Tool node in the Dataflow graph and select all the groom curves you want to include in the average.
Add an Average Curves node and connect the output of the Selection Tool node to it. The Average Curves node creates a new curve at the average position of the selected curves.
Connect the output of the Average Curves node to the Guides to Joints node. Unreal Engine creates a joint chain along the averaged curve.
Using the Example Data Flow Graphs
The Content Examples project includes two Dataflow graphs that demonstrate these nodes:
DF_Hair_JointCreation: Demonstrates creating joints along a curve from a hair groom.
DF_Hair_Avrg_Curve: Demonstrates creating a curve based on the averaged position of a selection of hair groom curves.
To use one of these graphs in your project, do the following:
Open your groom asset and select the Asset Details tab.
Replace the existing Dataflow asset in the Hair Data Flow section with the example graph.