12 KiB
Hair Master Stack reference
You can modify the properties of a Hair Shader Graph in the Hair Master Stack.
Refer to Hair and fur for more information.
Hair Material Types
HDRP’s Hair Master Stack has the following Material Type options:
- Approximate: This mode requires you to adjust nodes to suit the lighting in your scene.
- Physical : This mode automatically produces physically correct results.
Considerations for choosing a Material Type
This table explains the conditions under which you might prefer to choose the Physical or Approximate hair Material Types:
Material Type | GPU requirements | Geometry compatibility | Compatible with Path tracing | Hair tones |
---|---|---|---|---|
Approximate | Moderate | Hair cards. | No. For more information, see Path tracing. |
Works with all hair tones. However, it doesn't give light hair a volumetric appearance. |
Physical | High | Hair cards and hair strands. | Yes. However, path tracing is not compatible with ribbons. For more information, see Path tracing. |
Works with all hair tones. Gives lighter hair tones a volumetric appearance when you use multiple scattering |
The Approximate hair Material Type
The Approximate Material Type mimics the characteristics of human hair. It is based on the Kajiya-Kay hair shading model. HDRP computes this model faster than the Physical Material Type because it is less resource intensive.
The Approximate model doesn’t automatically look realistic in every lighting setup. This means you need to adjust the blocks in the Fragment context to suit the lighting environment in your scene.
The Approximate model is best for darker hair tones. For best results with lighter hair tones, use the Physical model.
The Physical Material Type
The Physical Material Type automatically creates physically correct results in any light environment. It accurately accounts for the amount of incident light to scatter within a hair fiber (known as an energy-conserving hair model). This means the Physical model works correctly in any lighting environment.
This model adds the following nodes in the Fragment shader:
Property | Description | Setting Dependency | Default Value |
---|
Change the Base Color block to define the color of the hair.
The Physical Material Type is based on the Marschner human hair fiber reflectance model.
Multiple Scattering
Multiple scattering creates the appearance of light scattering through thousands of hair strands. This gives lighter hair tones a volumetric appearance. To enable multiple scattering in your scene, select a Scattering Mode option.
To select a Scattering Mode option:
- Open the Graph inspector.
- Set the Material Type to Physical**.**
- Set the Geometry mode to Strands.
- Open the Advanced Options section.
- Select Scattering Mode.
The Scattering Mode options appear when you select the Physical material type:
Property | Description |
---|---|
Physical | Physically simulates light transport through a volume of hair (multiple scattering). This feature is not available for public use yet. |
Approximate | Estimates the appearance of light transport through a volume of hair (multiple scattering). This mode does not take into account how transmittance affects the way light travels and slows through a volume of hair. It also ignores the effect that a hair's roughness has on the spread of light. |
Geometry Type
You need to select a geometry type in your shader that reflects the geometry you use to represent hair. This allows HDRP to make correct assumptions when it computes the shading model. You can use multiple types of geometry to render hair, but the Hair Master Stack is only compatible with the following geometry types:
- Cards: Hair cards display high-resolution hair textures on individual pieces of simplified geometry. Card geometry is compatible with the Physical and Approximate Material types.
- Strands: Hair strand geometry represents each individual hair fiber in the shape of tube geometry or ribbons. Strand geometry is compatible with the Physical Material Type.
The hair card method is a simple and efficient way to render hair for games, and doesn’t demand a lot of resources from the GPU. We recommend cards where the user experience will not be negatively impacted by it. For example, for secondary characters, and even as a lower level of detail for main characters. Use strands only for main characters.
Select a geometry type
To select the geometry type that your shader uses:
- Open your Hair shader
- In the Graph inspector, open the Advanced Options dropdown
- Select a Geometry Type Option
Contexts
Vertex Context
Default
When you create a new Hair Master Stack, the Vertex Context contains the following Blocks by default:
[!include] [!include] [!include]
Property | Description | Setting Dependency | Default Value |
---|
Relevant
Depending on the Graph Settings you use, Shader Graph can add the following locks to the Vertex Context:
Property | Description | Setting Dependency | Default Value |
---|
This Master Stack material type adds all its Vertex Blocks to the Vertex Context by default and has no extra relevant Blocks.
Fragment Context
Default
When you create a new Hair Master Stack, the Fragment Context contains the following Blocks by default:
[!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include]
Property | Description | Setting Dependency | Default Value |
---|
Relevant
Depending on the Graph Settings you use, Shader Graph can add the following blocks to the Fragment Context:
[!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include]
Property | Description | Setting Dependency | Default Value |
---|
Graph Settings
Surface Options
[!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include] [!include]
Property | Description |
---|
Advanced Options
[!include] [!include] [!include] [!include] [!include] [!include] [!include]
Property | Description |
---|