Just would like to share hair shader I've done.
This shader implements well known Marschner model proposed here:
Video on Vimeo:
Tested both in H10 and H11.
Diffuse color and intensity.
please note that for dark hair diffuse intensity is usually very small
Overall specular intensity and color. Computed speculars are multiplied with this values.
This parameters are not physically correct and are provided for convinience only.
Different light masks and categories lets specify which lights are contributing to diffuse and specular computation.
Primary Highlight (R ): Strong primary specular peak.
Secondary Highlight (TRT): Colored secondary peak.
Backlight (TT): Colored component that appears in back lighting situations. That is the bright halo around the hair.
Each component has it's own intensity and color multipliers for ease of use and tuning.
Shift sets shift amount of speculars from root to tip.
Width sets width of speculars. The more the width the wider they are.
1. Download and Install ssh_marschner_hair.otl (File->Install Digital Asset Library)
2. In SHOP context start typing ssh_marschner_hair_model and choose this shader.
Update: There are hairDiffuseExport and hairSpecularExport export variables so diffuse and specular data may be separated.
Shader supports texture maps as well as ramps that allows to remap colors and opacity from root to tip.
Latest version of the shader is avaliable here:
Edited by ssh, 13 October 2011 - 01:36 AM.