The Hair Card Generator is an experimental tool for automatically generating hair cards from strand-based groom assets in Unreal Engine (UE). In UE 5.8, the tool is integrated into the Dataflow system, where Dataflow defines the generation pipeline as a series of nodes in a graph
Key Concepts
The following terms are used throughout this page:
| Term | Description |
|---|---|
Hair Card | A rectangular strip of geometry with a hair strand texture applied. |
Multi Card Clump | A group of multiple cards (typically three) generated per strand clump to approximate volume. |
Strand Clump | A collection of hair strands that converge to form a distinct volume within a groom. |
Card Group | A collection of strands within a groom, defined by the |
Groom Group | A collection of strands grouped for simulation purposes, providing different physics settings across the groom. The |
Element | A container within the BuildCardSettings node. Each element defines a set of generation parameters, commonly used to represent different levels of detail (LODs). |
Filter | A subdivision within an element used to apply parameter variations, typically per card group. Filters provide different settings that can be assigned to specific regions of the groom. |
Texture Island | A region of a texture corresponding to a single UV shell within a texture atlas. |
Texture Atlas | A texture containing multiple texture islands, used to apply textures across multiple hair cards within a groom asset. |
Dataflow Environment Set Up
Follow these steps to assign a Dataflow asset to your groom:
In the content browser, select the groom asset, then select Set Dataflow to open the Dataflow Graph Template menu.
Select the Cards template. This automatically creates the required nodes in the Dataflow graph.
When a Dataflow asset is assigned to a groom, the interface updates to display the Dataflow integration. The original groom parameters remain available in the Asset Details panel.
Dataflow Interface
The Dataflow interface includes the following components:
Construction Viewport: Displays the result of the operations defined in the Dataflow graph.
Simulation Viewport: Displays the groom asset as configured in the Asset Details panel.
Asset Details: Contains all parameters for the groom asset. Use LOD Geometry Type to switch the display between strands and cards.
Dataflow Graph: The workspace where the node graph for hair card generation is constructed.
Node Details: Displays the properties of the selected node.
Dataflow Node Graph
The Dataflow graph defines the hair card generation workflow as a series of nodes, organized from groom input to final asset output.
| Node | Description |
|---|---|
GroomAssetToCollection | Imports the groom asset into the Dataflow graph. |
GroomAssetToCollection | Converts the groom asset into a collection for card generation. |
ExtractCardsAttributes | Extracts card group attributes from the groom asset and exposes available groups for selection. |
DataflowSelectionToolNode | Provides an interactive selection tool for choosing strands or card groups. |
BreakAttributeKey | Splits the selected attribute key into components for use in downstream nodes. |
CollectionSelectionToAttribute | Converts the current selection into a collection attribute, providing a way to tag and filter strands. |
ReportCardsAttributes | Reports the resulting card attributes back to the groom asset for validation. |
BuildCardSettings | Defines the parameters for card generation. When selected, this node displays card groups and strand counts in the Construction Viewport. |
GenerateCardsClumps | Groups strands into clumps based on similarity. Increasing the clump count produces more detailed hair cards. Clumps are visible in the Construction Viewport when this node is selected. |
GenerateCardsGeometry | Generates the hair card geometry, visible in the Construction Viewport. |
GenerateCardsTextures | Generates textures for the hair cards. In the Construction Viewport, unique textures appear as distinct colors, with brighter colors representing source textures applied to darker-colored cards. |
CardAssetTerminal | Finalizes and saves the generated geometry and textures. |
Selecting the GenerateCardsClumps node displays the resulting clumps in the Scene Outliner. If the groom contains multiple filters, Dataflow organizes them under their respective filters, providing a way to isolate and visualize individual filters in the Construction Viewport.
Selecting the GenerateCardsTextures node provides a way to isolate cards by their parent texture in the Construction Viewport. The parent texture appears in a brighter color and serves as the source for all cards assigned to it.
Configure Hair Card Generation
All parameters for generating hair cards are managed in the BuildCardSettings node. When this node is selected, the hair card groups and their strand counts appear in the Construction Viewport.
Configure Generation Settings
Follow these steps to add a generation element:
In the Dataflow graph, select the BuildCardSettings node.
In the Node Details panel, select the + icon next to Generation Settings to add an element.
Each element corresponds to a set of generation settings. Use each element to define settings for a different LOD.
Element Parameters
Elements include the following parameters:
LOD Index: Specifies the output LOD for card generation.
Group Index: Defines the Groom Group identifier that the LOD is assigned to.
Filter Settings: Contains parameters for card, clump, and texture generation.
Advanced Options: Includes additional settings such as texture atlas size and options for reducing cards from a previous LOD.
Configure Filter Settings
Follow these steps to add a filter to a generation element:
In the Node Details panel, select the + icon next to Filter Settings to create a filter.
Create one filter per card group to apply customized settings. If you do not assign a card group to a filter, the settings apply to all strands in the groom.
Select the + icon next to Card Groups to assign card groups to a filter.
Filter Parameters and Advanced Options
Filter parameters:
Filter Name: Defines the name of the filter.
Num Clumps: Specifies the number of multi-card clumps generated for the filter. Each clump represents a volume of hair using three cards.
Num Flyaways: Defines the number of flyaway cards. A flyaway is a single-strand card used for fine detail.
Num Triangles: Specifies the target number of triangles distributed across all cards in the filter.
Num Textures: Defines the number of unique texture islands generated. These act as source textures shared across multiple cards; you can visualize them in the Scene Outliner.
Card Groups: Specifies which card groups are included in the filter. Card groups are strand groupings defined in a DCC application, such as hairline strands or layered regions of the groom.
Filter advanced options:
Adaptive Subdivision: Automatically adjusts card subdivisions based on curvature to balance detail and performance.
Max Vertical Segments: Sets the maximum number of subdivisions per card. When you enable Adaptive Subdivision, this setting has no effect. Use a fixed value when a consistent subdivision count is required.
Strand Width: Scales strand width in the generated textures. A value of 1 matches the groom asset; higher values increase strand thickness.
Multi Card Clumps: Generates three cards per clump to improve the perception of volume.
Texture Compression: Compresses textures along the strand direction to reduce texture space usage.
Balancing Clumps and Triangles
The quality of the generated hair cards depends on balancing clump count and triangle count. The typical workflow is to define the target triangle count first, as asset requirements often constrain it. Distribute triangles across card groups based on strand density and coverage, then adjust clump values to refine the result.
Num Clumps: Controls the number of cards and their width. Higher values produce more cards with narrower widths; lower values produce fewer, wider cards. Set this value based on the strand count and scalp coverage of the card group.
Num Triangles: Sets the target polygon count for the filter. Defines the overall triangle budget for the card group.
To visualize the result during adjustment, select GenerateCardsClumps to preview clump distribution, then select GenerateCardsGeometry to inspect the resulting geometry. If cards appear too wide, increase Num Clumps. If cards appear too coarse, increase Num Triangles.
Generate the Hair Card Asset
Follow these steps to generate the hair card asset:
In the Dataflow graph, select the CardAssetTerminal node.
Right-click the node and select Evaluate, or select Evaluate Dataflow Graph in the toolbar.
To prevent the Dataflow graph from regenerating automatically, select Set Manual Graph Evaluation in the toolbar options before generating.
After generation, preview the result in the Simulation Viewport. In the Asset Details panel, set LOD Geometry Type to Cards to display the generated cards.
Single Card Group
Before working with multiple card groups, generating a card asset using a single card group with the default settings in BuildCardSettings helps you estimate the relationship between clumps, triangles, textures, and flyaways for the groom.
[IMAGE: Single card group generation result displayed in the Simulation Viewport]
Use the following indicators to evaluate the result:
If the resulting geometry is jagged, the Num Clumps value may be too high for the complexity of the groom. Reduce it to produce wider, smoother cards.
If the generated cards are too thin, increase Num Clumps.
Areas that produce artifacts — such as the hairline region of a long-hair groom — are good candidates for dedicated card groups with separate filter settings
Singular Card Groups Workflow
Before experimenting with multiple card groups, it could be useful to generate the card asset with a single card group using the default settings provided in the BuildCardSettings node. This provides a quick and easy estimation of approximating the relationship between clumps, triangles, textures and flyaways for the asset. If the resulting geometry is too jagged, it’s likely due to the complexity of the groom asset and as a result, the Clumps value will have to be decreased.
Similarly, if the generated cards are unnecessarily thin, the clump value may have to be increased. It’s also a great way to get an idea of complicated areas of the groom that will require their own card groups.
In the image below, the long hair asset produces artifacts around the hairline, which means these strands would have to be put in their own card group and dealt with separately from the rest of the groom.
The examples below all use a single card group with the default parameters applied.
Multiple Card Groups Workflow
This section describes how to create a hair card representation using multiple card groups. The example uses Hair_M_UpdoMessyBun with a target of fewer than 50,000 triangles.
To use card groups, define them in a DCC application. Name the card group attribute groom_group_cards_id and export it with the groom via Alembic. You can generate hair cards without card groups, but using card groups typically produces more precise geometry and textures, and gives you finer control over how triangles are distributed across the groom.
Card group attributes can also be authored directly in Dataflow. You can select vertices and create attributes based on selection groups. The Report Card Attributes node propagates these attributes from the collection onto the description. In Build Card Settings, use the filter name that matches your selection. This provides a way for card group control to be defined procedurally at the Dataflow level, in addition to DCC-authored attributes.
The Card Group layers used for the example asset in this example are visualized in red, green, white, black, and yellow. Hair Card Generator can be used without Card Groups, but using them typically produces more precise geometry and textures.
Card Groups also provide a flexible way to control polycount, providing a way to allocate more triangles to visible strands and fewer to areas that primarily contribute to scalp coverage. The Card Group attribute must be named groom_group_cards_id and exported with the groom as an Alembic file. Card Group attributes can also be authored procedurally in Dataflow by creating attributes from vertex selections.
White — Core Layer
Provides base coverage for the scalp. This layer uses wider cards with fewer triangles. Texture settings should be low, providing a way for textures to repeat across the generated cards. Maximizing strand coverage in this layer helps reserve triangle and texture budget for more visible layers.
Green — Mid Layer
Defines the primary shapes of the hairstyle. This layer should have increased clumping and a higher triangle count than the Core Layer to introduce more structure and variation.
Red — Top Layer
Represents the most visible portion of the hair. This layer should receive the highest triangle allocation. Increasing clump count improves detail and breakup in the final result.
Yellow — Flyaway
Strands Used for loose or stray hairs. While flyaways can be generated procedurally, defining them as a separate Card Group provides more direct control over placement and density.
Black — Short Hairs
Used for shorter strands that require different parameterization than long hair. This layer typically uses a higher clump value with fewer triangles, relying more on texture detail than geometry to define shape.
Generate each Card Group layer in sequence and preview the result in the Simulation Viewport before moving to the next layer. Follow the steps below for core layer, mid layer, top layer, flyaways and short hairs.
Core Layer
Configure the filter settings in BuildCardSettings for the Core card group.
Set Num Clumps and Num Triangles low to produce wide, coarse cards.
Set Num Textures low — for example, 25.
In the Dataflow graph, select GenerateCardsGeometry and check the result in the Construction Viewport.
Select Evaluate Dataflow Graph and preview the result in the Simulation Viewport.
Mid Layer
Add a second filter for the Mid layer card group. Increase Num Clumps and Num Triangles to produce smoother, more defined cards.
Select Evaluate Dataflow Graph and preview the combined geometry in the Simulation Viewport.
Check for intersections between the Core and Mid layers. If intersections occur, increase Num Triangles for the Core layer.
Top Layer
Add a third filter for the Top layer card group. Set Num Clumps and Num Triangles high to produce thin, highly subdivided cards with a strong silhouette impact.
Select Evaluate Dataflow Graph and preview the result.
Flyaways
In the Construction Viewport, note the spline count displayed for the flyaway card group.
Add a filter for the flyaway card group and set Num Flyaways to match the spline count. This produces one card per strand.
Set Num Triangles high for smooth geometry. Set Num Textures low — flyaway shape comes from geometry rather than texture.
Select Evaluate Dataflow Graph and preview the result.
Short Hairs
Add a filter for the short hair card group. Set Num Clumps high to produce thin cards. Set Num Triangles low so card detail comes from textures.
Set Num Textures high to maximize texture variation.
Select Evaluate Dataflow Graph and preview the final result in the Simulation Viewport.
Create LODs
Two methods are available for creating LODs in Dataflow:
Reduce Cards from Previous LOD: Reduces the triangle count of each card in the previous LOD while retaining the card count and textures.
Reserve Texture Space LOD: Generates a new mesh with a new set of texture islands that share the same texture atlas as the previous LODs.
Create LODs with Reduce Cards from Previous LOD
To create an LOD using Reduce Cards from Previous LOD, do the following:
In the BuildCardSettings node, select the + icon next to Generation Settings to add a new element.
Right-click the LOD0 element and select Copy, then paste it into the new element.
Set LOD Index to the LOD number you want to create — for example, 1 for LOD1.
Rename the filter to reflect the new LOD — for example, append "LOD1" to the existing filter name.
Adjust Num Triangles and Num Flyaways in each filter to meet the requirements for the new LOD.
In Advanced Options for the LOD1 element, turn on Reduce Cards from Previous LOD. This reuses LOD0 textures while reducing the triangle count.
Select Evaluate Dataflow Graph to generate the new LOD. All elements within a filter are generated simultaneously, so LOD0 is also regenerated.
Create LODs with Reverse Texture Space LOD
This method generates a new mesh with a separate set of texture islands for each LOD, all sharing the same texture atlas. The Reserve Texture Space LOD value specifies the percentage of currently available texture atlas space to leave empty for future LODs.
In Advanced Options for the LOD0 element, set Reserve Texture Space LOD to the percentage of atlas space to reserve for future LODs.
For example, when LOD0 has the full atlas available:
Setting this to 50 reserves 50% of the atlas for future LODs, so LOD0 textures occupy 50%.
Setting this to 75 reserves 75% of the atlas, so LOD0 textures occupy 25%.
In the BuildCardSettings node, select the + icon next to Generation Settings to add a new element.
Right-click the LOD0 element and select copy, then paste it into the new element.
Set LOD Index to the LOD number you want to create.
Rename the filter — for example, append "LOD1" to the existing filter name.
Adjust Num Clumps, Num Flyaways, Num Triangles, and Num Textures to meet the requirements for the new LOD.
In Advanced Options for the LOD1 element, set Reserve Texture Space LOD to the percentage of currently available atlas space to reserve for further LODs.
For example, if LOD0 occupies 50% of the atlas (Reserve Texture Space LOD was set to 50 on LOD0), the remaining 50% is available for LOD1.
For LOD1:
Setting this to 50 reserves 25% of the total atlas, so LOD1 textures occupy 25%.
Setting this to 25 reserves 12.5% of the total atlas, so LOD1 textures occupy 37.5%.
Setting this to 0 reserves nothing, so LOD1 textures occupy the remaining 50%.
Select Evaluate Dataflow Graph to generate the new LOD. (This will also re-generate LOD0 as all Elements within a filter are generated simultaneously.
The following Reserve Texture Space LOD values define a four-LOD setup on Beard_L_Full:
LOD0: 75
LOD1: 50
LOD2: 25
LOD3: 0