An integrated solution for authoring / importing / simulating / rendering strand-based hair in Unity.
Package: com.unity.demoteam.hair
An integrated solution for authoring / importing / simulating / rendering strand-based hair in Unity. Built from the ground up with Unity users in mind, and evolved and hardened during the production of 'Enemies', the hair system is applicable not only to realistic digital humans, but also to more stylized content and games. It allows users to easily create 'Hair Assets', either from grooms from external DCC tools (through the alembic file format for curve data), or through simple built-in procedural generation tools (e.g. scatter x amount of hairs on a mesh or other primitive, or using a custom generator). Using a fast and flexible GPU-based solver that works on both strand- and volume-information, the system enables users to interactively set up ‘Hair Instances’ within scenes, and then see and interact with those instances as they are simulated and rendered in real time.
Requirements
Unity 2020.2.0f1 +
Compute shader enabled platform
Features
Authoring
Import grooms from external DCC tools through the alembic file format (.abc)
[ depends on com.unity.formats.alembic >= 2.2.2 ]
Make procedural grooms in just a few clicks
Scatter strands on built-in primitives, or on user specified meshes
Shape strands using simple parameters like length and curl
Plug in your own generators for custom placement
Clustering / Level of detail
Build clusters and LOD chain automatically from spatial relationships
Can also assign artist-provided clump maps + optionally refine them
Supports root-, strand-, and simplified strand-level clusters
Skinning
Easily attach strand roots to skinned geometry in a scene
[ depends on com.unity.demoteam.digital-human >= 0.1.1-preview ]
Simulation
Strand-based solver supporting tens of thousands of individual strands
Solver also adds volume-based quantities such as density and pressure
Applies pressure to preserve the volume of a groom
Allows targeting uniform density
Allows targeting initial pose density
Applies pressure to soften strand-strand collisions
Exposes directional opacity to HDRP physical shading model
Fully configurable set of constraints
Boundary collision w/ friction
Particle-particle distance (soft, hard)
Particle-root distance
Local bend limiter (<, >, =)
Local shape
Global position
Global rotation
Level of detail support
Allows simulating partial set of strands (e.g. at a distance, or for art reasons)
Volume-based effects also work for partial set of strands
Seamless LOD blending while simulation is running
Rendering
Supports all current rendering pipelines
Built-in RP
HDRP
URP
Easily build your own hair materials
Add the ‘HairVertex’ node to any Shader Graph to read the simulation data
Add the 'HairVolume' node to access simulation volume data like density
(Planned) Optionally, assign generic materials as the cost of serializing strands to generic mesh
[ will depend on Unity >= 2021.2 for vertex buffer access ]
Multiple modes of rendering
Render strands as simple line primitives
Render strands as view facing triangle strips w/ tangent space normals
Render high quality strands using the upcoming compute-based HDRP hair renderer
[ depends on Unity >= 2023.1 ]