The content of this section is mostly useful if Joe Alter's Shave and a Haircut plugin is installed.
Selecting an Output Method
3Delight for Maya offers two approaches to render Shave and a Haircut hair nodes. The first one is included in the 3Delight for Maya plugin itself and asks the Shave and a Haircut plugin to generate one RIB file per shave hair node. The second approach is to load the 3dfm_shave
plugin; this plugin interacts with the Shave and a Haircut plugin to retrieve hair data and render them directly.
The benefits of using the Shave and a Haircut support embedded in the 3Delight for Maya plugin are (this method is used when the 3dfm_shave
plugin is not loaded in Maya):
- No extra plugin to load.
The "voxels" attribute in the Shave Globals RenderMan section can be enabled to reduce memory usage when rendering.
Requires less memory when caching the scene.
The benefits of using the 3dfm_shave
plugin are (this method is used when the 3dfm_shave
plugin is loaded in Maya):
- No extra RIB file needed to store hair data.
- No extra current time changes to support deformation blur on shave hair nodes.
- Possible to use more than two samples for hair deformation blur.
Shave Hair Shapes Primitives Variables
With both rendering methods, the attributes in the Shave Globals RenderMan section control what primitive variables are outputted. Opacity will also be affected by the value of the Tip Fade attribute of each Shave shape. The available primitive variables are listed in the table below.
Shave Global Attribute | Primitive Variable |
---|---|
Export Normals | uniform normal N_Srf |
Export Opacity | varying color Os |
Export Root/Tip Colors | uniform color rootcolor, tipcolor |
Export Vert Colors | varying color Cs |
Export W Coords | varying float w |
Export UVs | uniform float s, t |
Export Root Positions | uniform point P_Srf . Outputted only when 3dfm_shave plugin is not loaded. |
Using the Shave Support Embedded in 3Delight for Maya
When using the Shave and a Haircut support embedded in the 3Delight for Maya plugin, all options offered in the RenderMan section of the Shave Globals are supported, except the Global RIB Text attribute and the motion blur and shutter attributes. Motion blur options are specified in the rendering attributes, except that the number of samples for deformation blur is limited to two. The RIB files will be outputted in the directory specified by the 3Delight Fur Files project setting (see 3Delight Data Locations). When turning on Enable Voxels option, consider either turning on the Use Full Paths attribute, or adding the path to the 3Delight Fur Files project setting to the Archive Path attribute in the Scene Elements: Search Paths group of rendering attributes. When the Enable Voxels option is enabled, Shave and a Haircut may attempt to create illegal file names if the shave hair shape name is long, so it is recommended that shave hair shape names are made unique and short.
Shading and Lighting
By default, Shave and a Haircut hair nodes are not assigned any Hypershade shading group, excluding them from the light linking system. In 3Delight for Maya, geometric objects that have no Hypershade shading group nor a RenderMan Shader Node attached to them are rendered using the defaultSurface
shader, which does not take into account any lighting. Simply assigning a RenderMan surface shader node while rendering with the default Render Pass values will make the lack of light links on the Shave and a Haircut node obvious since it will appear black. Some possible solutions for this problem are:
- Create an object set containing all lights lighting the Shave and a Haircut node. Create a Geometry Attributes Node and attach it to the Shave and a Haircut node. Set the Illumination From attribute of this geometry attributes node to the lights object set that has just been created. Note that the Shave and a Haircut node will still not be part of shadow maps; to fix this, select all objects that need to appear in the shadow map and create an object set with them. Create a The Light Attribute Node and attach it to a desired light source. Finally, select this new object set in the light attributes node’s Shadow Objects attribute.
Assign the Shave and a Haircut node to an Hypershade shading group. This can be done by assigning an Hypershade surface shader to the Shave and a Haircut node, or by issuing the following MEL command once the that node is selected:
hyperShade -assign "initialShadingGroup";
Finally, a simple way to get hair shading similar to what is produced by the Maya software renderer is to attach the Shave shader that is packaged with Shave and a Haircut to the shave hair shape node. 3Delight comes with a precompiled version of this shader.