Image from Piper ©

 

This pattern allows artists to create realistic and art directed hair and feathers that are easy to manipulate. Everything from human auburn hair to fantastical alien feathers are possible with just a few controls.

You compute realistic human hair color by modeling melanin concentration in hair fibres. Melanin is a dark brown to black pigment occurring in the hair, skin, and iris of the eye in people and animals.

This is based on a "An Energy-Conserving Hair Reflectance Model" (EGSR 2011, Eugene d’Eon, Guillaume Francois, Martin Hill, Joe Letteri, Jean-Marie Aubry).

Usage

PxrHairColor outputs 3 colours to provide physically plausible results with  the PxrMarschnerHair BxDF. They should be connected like this:

For realistic results, the PxrMarschnerHair's Primary Specular Color should always be white while using the Physical controls.

When using the Artistic Mode controls, we recommend you set the following parameters on the PxrMarschnerHair material:

diffuseGain to 1.0 (Zinke model)

specularGainR, specularGainTT, specularGainTRT, specularMixFresnel, and specularEnergyCompensation to 1.0

We always recommend at least 2 indirect bounces for beautiful hair. You can set this in your chosen Integrator.

Parameters

Mode

Physical Mode: This is the default set of controls providing a realistic result based on natural hair color and response. Combined with Dye, users can create any plausible result.

Artistic Mode: This mode replaces the Melanin controls with Color options. While this can produce unrealistic results, it allows for greater art directed freedom.

Hair Color

Physical Mode


Melanin

 

The melanin concentration in the hair fibers, from 0.0 to 1.0. Zero creates white hair and higher values create darker colors. For lighter hair you may need more Diffuse Gain in the PxrMarschnerHair material. Darker hair can use reduced values or even 0.0 for the darkest shades.

Melanin Randomize

Randomize the melanin concentration, if hairIndexPrimvar is defined.

Artistic Mode


Color

You can select an RGB color or use another pattern to supply an arbitrary color for your hair. Care is taken to replicate the chosen color as accurately as possible when rendered.

 

Color Randomize

Using an RGB color or selected pattern, you can supply a random color to mix into the color chosen above.

 


 

Darken Roots

Progressively darken the fiber's root by progressively adding more melanin. The value corresponds the additional amount of melanin at the root. The gradient can be shaped using Darken Slope and Darken End Position, below we darken the whole hair with Darken End Position set to 1.0.

Darken Slope

Tweak the slope of the darkening. This controls the transition from dark to light.

Darken End Position

Most of the time, the darkening should happen close to the root and leave the rest of the hair un-modified. The end position defaults to 0.5 so that only the first half of the hair is darkened. The correct range is 0. to 1.0

Stray Hair Color

Stray Density

The frequency at which stray hair appears if hairIndexPrimvar is defined. White stray hairs typically appear when people start to get older or experience amazing levels of stress.

Physical Mode


Stray Melanin

The melanin concentration for stray hairs. It works like the main Melanin parameter allowing you to control the resulting color.

Stray Random Melanin

Randomize the melanin level of stray hairs, if hairIndexPrimvar is defined.

 

Artistic Mode


Stray Color

This allows you to choose an arbitrary RGB color or pattern for the stray colors. Below the Color is white with the stray hair colored with a solid color or a ramp. Stray Density is set to 0.5

 

Stray Random Color

This allows you to choose an arbitrary RGB color or pattern for randomizing and combining stray colors. Below the colors are set to black/none, dark red, red. The hair color is selected at blue. Stray Density is set to 0.5

 

Dye Color

Dye

Hair can be dyed with a color. This color will be combined with hair color in a plausible way. In the first example, the hair is very dark because a deep blue dye on red hair results in this color. A purer saturated color or a color chosen on hair with melanin set to 0.0 will have a more vibrant color like the red example.

Dye Random Hue

Randomize the dye hue, if hairIndexPrimvar is defined. Below we use hair with no melanin and a green dye, then we increase the randomization. Notice that this result is a random color of any kind while random melanin controls will be some form of plausible hair color.

Dye Random Saturation

Randomize the dye saturation, if hairIndexPrimvar is defined. Less saturation reveals the set melanin color of the hair. You may find you need values higher than 1.0 for more hair to become less saturated or you can increase Random Pivot parameter above 0.5 where 1.0 may eliminate the Dye Color completely if this Random parameter is set high.

Random Setup

Hair ID Primvar

 If hairIndexPrimvar is empty, none of the randomizing options will work! You may see a warning in Maya, this is because the shader ball previews do not have such a primvar so their preview renders may generate an error.

Here is a list of known primvars:

Hair GeneratorPrimitive Variable
Maya Hair/Furindex
Maya Xgenid_XP
Yetifur_id

Random Pivot

Offset the random values to allow you to create centered, additive or subtractive random variations.

RandomizationPivot Value
Additive0.0
Centered0.5
Substractive1.0

Random Seed

A global random seed to make sure you get different random results. Especially useful if you have duplicate grooms but need different coloring through random parameters.

View Index Random

Output the per-curve random values, if hairIndexPrimvar is defined. This is a debugging switch to check if the hair ID primitive variable has been correctly setup. Below is an example of correct IDs.