Hair Art Directability features give artists direct control to shape and animate hair strands in Unreal Engine. Author and control hair guides and strands using joint-based deformation and painting, with seamless blending between simulated hair physics and art-directed animation.
Assets
There are three main assets that have attributes that need to be set; the Groom asset, the Character Blueprint, and the Deformer Graph asset, all of which need adjustments to their respective settings in order for the feature to work as intended.
Groom Asset
You can start with a pre-made groom or choose to create a new groom from scratch. To begin, you must first add it to your project.
Double-click the groom to open it.
Find the Hair Data Flow section under the Asset Details tab.
Click the Create Groom Dataflow button.
In the dialog popup, select a template to start with.
Once clicked, the template graph creates and assigns a basic Dataflow graph with all the nodes you need to get you setup quickly. Once created, the editor will automatically open to display the new Dataflow graph.
In the Asset Details tab, under the Hair Physics section, find the group ID that you want to set up with your rig to deform. You’ll need to enable the Deformation checkbox. This enables the hair to be deformed by the rig and not just the simulation system. This checkbox has to be on in order for Groom Directability to work.
Be sure that Enable Simulation is disabled. Otherwise, the simulation will also run and override the influence of any art direction.
Character Blueprint
In your character Blueprint, you’ll need to add a deformer graph to your groom and a skeletal mesh that contains the deformation rig.joints.
First, find the Groom component and add the deformer graph of the type of deformer you set up in your groom Dataflow graph.
Examples:
To deform the groom using guides, choose the
DG_GuidesSkinningdeformer.To set up the Dataflow graph to deform using strands, choose
DB_StrandsSkinning.The same applies with the Spline deformer.
Next, you need to add a skeletal mesh that matches the joint hierarchy you set up to deform your groom by adding a Skeletal Mesh component and choosing the appropriate Skeletal Mesh.
In the Content Examples project, a level was created to show an example of this feature. A Skeletal Mesh is used with a very small triangle mesh hidden inside the groom which is skinned to the last joint of the hair joint chain. Using the triangle mesh allows for the use of the helmet mesh to transfer skin weights, without having to use it in the character BP, which would cover up the groom.
In order to get this component to follow along with your character, add an animationBP and the following nodes:
Copy Pose From Mesh
Output Pose
Make sure to check the “Use Attached Parent” box in the Copy Pose from Mesh node. You can add other nodes here as needed, such as a Rigid Body or Modify Transform node.
More information can be found in the UE Control Rig documentation.
Creating Your Own Template
You can create your own template file by adding a Dataflow asset in the following location:
Engine/Plugins/HairStrands/Dataflow/Templates
Once added, it will show up the next time you run the Dataflow Template Wizard.