Use the xgen_hair_physical to easily customize the look of your hair via a single node.
Note: This feature is only available when the mental ray
Mayatomr.mll plug-in is loaded (Windows > Settings/Preferences > Plug-in Manager).
By default, an xgen_hair_physical shader is assigned to XGen Descriptions. See
Create hair or fur using spline primitives.
To customize the look of your hair, use the attributes below. You can find these attributes in the xgen_hair_physical
Attribute Editor.
-
Tube Shade
-
Select this option so that the shading normal is modified to make flat hair look tubular. Hair is treated like a single sided flat ribbon with the ability to modulate the normal for more rounded, tube like hair edge behavior.
-
Color
- Color for the diffuse component of the illumination model. XGen can override this color on a per hair basis when adding the
root_color and
tip_color parameters in the XGen
Custom Shader Parameters (in the XGen Editor,
Preview/Output tab). If only
root_color is specified, each hair is colored using a single color. If both
root_color and
tip_color are specified, the hair color is interpolated from
root_color at the root of the hair to
tip_color at the tip of the hair.
-
Roughness
- Controls the width of the glossy lobes in U and V. Increasing roughness widens the highlight. U is the direction of the hair Tangent and V is the direction of the hair width, perpendicular to the normal (bitangent). A value of 1 gives a diffuse response. A value of 0 gives a highly specular response.
Roughness defaults to 0.7
-
Weight
- The hair physical shader is an energy conserving Marschner type model, so all weights are a 0-1 representation of the 0-100% factors of the weight remaining. The weights are taken in this order:
- Primary
Reflection Weight (multiplied by directional dependency)
-
Transmission Weight
- Secondary
Glint Weight (reflection)
- Reflection Color/Specular Color
- The color of the Primary (specular) highlight.
- Reflection Weight/Specular Color 2
- The PrimaryReflection Weight is multiplied by a directionally dependent Fresnel weighting factor using an IOR of 1.55, taken from the measured Marschner data.
- Reflection Roughness/Specular Color 2
- Size of the Primary Highlight in U and V
-
Highlight Separation
- The shift applied to both Primary (reflection) and Secondary (Glint) highlights in opposing directions (Primary backwards and Secondary forwards) with a scaling factor of 1.5, as recommended by the Marschner model.
-
Glint Color
- Secondary Highlight color.
-
Glint Weight
- Secondary reflection weight.
-
Glint Roughness
- Secondary Highlight Size in U and V.
-
Transmission Color
- Basic (straight ray line) transparency coloration for light coming through the hair in shadow shaders and direct light glossy transmission.
-
Transmission Roughness
- Size of the transmission response.
-
Transmission Weight
- Transmission response weighting.
-
Indirect
- Include indirect lighting in the calculations.