@Peter
MR hair geometry is flat ribbon, but the normal is computed from a virtual
cylinder like a normal map with full control over shaft radius and taper
along the length. For most practical purposes it should create the desired
look. Using the utility shaders (math/lookup nodes) available in the
rendertree, you can read hair UV coords and surface normal yourself if you
want to shade them differently than the provided hair shaders. Mental ray
stores hair information in the state which can be accessed by any shader
which cares to dig into that information.
The reason for flat ribbon is to allow hair to be represented as physical
geometry which can be styled and groomed, respond to dynamics, and use
material/texture shaders for shading while keeping memory consumption
low/reasonable (representing hair as geometry is hugely expensive). Mental
ray does offer true cylinder hair, but to get cylinder hair would require
the hair shader to be implemented as a volume shader (which would have it's
own set of issues). I believe that was how the original softimage hair
shader from 10 years ago was implemented. It rendered hair convincingly for
the basics such as highlights, but most people didn't like it because as a
volume shader it did not permit styling and grooming (or at least not much
control over it), and rendered quite slow with frequent crashing as mental
ray volumes can be a bit finicky.
I experimented with hair rendering in mental ray for Barnyard all those
years ago. From a purely technical point of view, writing shaders for hair
isn't too hard - it's just standard material/texture shader with additional
metadata for the hair. The key to getting results is being smart with your
render settings. You must be stringent on ray depth, recursion, shadow
type, memory limits, and so on. Setting them too generously will make your
render times go through the roof as you're telling mental ray to wander and
find things to do which probably aren't necessary. the default render
settings in Softimage are probably too generous for hair.
Matt
- realistic hair shading SI-MR Matt Lind
-