RfM Reyes
|
Introduction
The tutorial
Cutter: HyperShade Node Scripts
gives a brief description of Cutter's ability to convert a RSL function,
implemented in a .h file, to a script (also implemented as a .h file) that when
sourced by RfM at start-up will add a custom node to HyperShade. This tutorial
demonstrates how a sub-surface scattering utility node for use with RMSGPSurface
can be written and integrated into RfM.
The parameters Albedo Tint and DMFP Color are the primary inputs that control the look of the sss. Although there are a number of useful presets,
none of them enable the materials listed in Pixar's
Translucency and Subsurface Scattering document to be conveniently applied to Albedo Tint and DMFP Color.
|
|
|
The RSL FunctionThe original RSL function, listing 1, consists of a list of if-else if statements. The ui-hint embedded within the comment following the declaration "float material;" tells Cutter to define a dropdown menu of names when it converts the RSL function to a hypershade node description. |
Listing 1 (SSSMaterials.h)
|
Before converting a function to a node it is best to check if it will compile. For example, compiling the simple shader shown next will indicate whether or not the function is free of syntax errors. Listing 2 (foo.sl)
|
Generating the HyperShade Node ScriptTo generate the node script select the text of the RSL function, right mouse click (or control + left mouse click) and choose "Export as HyperShade Node".
Cutter will hilite the rfm_nodeid line as a reminder that its value must not clash with an id of an existing node.
Save the script in the directory designated for storing hypershape node files and modify the "RenderMan_for_Maya.ini file" so that the node is installed when RfM starts up. Instructions for both of these operations can be found in the tutorial Cutter: HyperShade Node Scripts. |
Using the Custom NodeIn hypershade, middle mouse drag from the cutrSSSMaterials node to an instance of the RMSGPSurface node and choose "Other...".
In the connection editor connect the outputs of cutrSSSMaterial to the inputs of RMSGPSurface.
Set the appropriate mix of diffuse and SSS lighting (Diffuse Mix), select a material from the cutrSSSMaterial dropdown menu and render. |
|
© 2002- Malcolm Kesson. All rights reserved.