Just would like to share hair shader I've done.
This shader implements well known Marschner model proposed here:
http://www.graphics....r-sg03final.pdf
Video on Vimeo:
Youtube:
http://www.youtube.com/watch?v=IYMF2a_ts2U
Tested both in H10 and H11.
Shader Parameters:
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.
Specular components:
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.
Usage:
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.
UPDATE:
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:
ssh_marschner_hair
Attached Files
Edited by ssh, 13 October 2011 - 01:36 AM.












