In order to make the hair that fits the character, I divided the character’s hair into two parts. One part was the tied hair, which was fixed, so I directly used the model to make it, while the scattered hair I wanted to achieve the effect of flying in the wind, so I made the scattered hair by learning maya’s xgen function. Here are some of the screenshots I made.
I have written down my maya xgen workflow as a record of sharing and learning:
- Prepare the model:
Make sure the character’s model is topologically sound and has UV (XGen relies on UV to generate hair). Create a section of your Scalp that will be the firing area of your hair. Part of the geometry can be copied from the character model and optimized. - Create an XGen file:
After selecting the scalp model, go to the XGen panel.
Click Create XGen Description and in the window that pops up:
Set the description type to Groomable Splines (for artistic control) or Spline Primitives (more for programmatic generation).
Select the appropriate distribution (such as plane-based or point-based). - Adjust hair distribution and shape:
Use XGen’s Density property to control hair density. Adjust hair Length and Randomize.
Add Modifier (e.g. Clump, Noise) to create a natural effect.
Fine hair styling: Enter the Grooming Tool and use the brush tool to adjust the hair shape:
Comb Tool: Comb the hair direction.
Length Tool: Increases or decreases local hair length.
Clump Tool: Create a hair bundle.
Noise Tool: Add randomness to natural hair. - Add materials and render:
Create a special Hair texture for your hair (usually using Arnold’s Standard Hair Shader or another renderer’s hair texture).
Adjust the hair’s reflection, highlight and transparency parameters to simulate realism.
Here, I will import UE for further hair calculation in the future, so the material will be adjusted in UE in the future.
Here’s my take on the steps of Grooming to import Maya’s XGen hair into Unreal Engine (UE) : Usually it needs to be processed through Alembic cache or grooming data
- Prepare
Optimize the hair: After you have finished creating the XGen hair in Maya, make sure the hair shape is adjusted.
Reasonable optimization of hair quantity and segmentation to reduce resource consumption. Make sure there is no problem with the scalp model UV. - Export XGen to the Alembic format
Convert XGen to a dynamic curve: In Maya’s XGen panel, select Generate > Convert XGen Primitives to Interactive Groom Splines.
The converted hair is curved and can be used to generate an Alembic cache.
Export Alembic file: Select the generated curve. In Maya’s menu, select File > Export Selection.In export options: Format select Alembic (.abc).
Make sure the following options are enabled:
UV Write: Keep UV data.
Write Visibility: Retain visibility.
Write Color Sets: Keep color data (if needed).
Write Geometry: Ensures that the curve derivation is complete. - Import hair into Unreal Engine (I’m using the latest version 5.4 here)
Enable Groom plugin: In Unreal Engine, go to Edit > Plugins.
Search for Groom, enable the plug-in, and then restart Unreal Engine.
Import the Alembic file: In the content browser, right-click and select Import.
Select the Alembic file you just exported. In the Import options: Import Type is set to Groom.
Make sure to enable Override Import Settings and adjust the density as required.
Adjust hair material: After importing, Unreal generates a default material.
Use the Hair Material that comes with Unreal, or create a new hair material instance. Adjust hair color, transparency, highlights, and reflections to match the effect.
Attaching hair to a character: Drag the Groom Asset into the character’s skeleton grid component. It is attached To the head bone by attaching to it.