It is possible to define custom Maya nodes to be used along with a RenderMan shader file. The following should be considered for the custom nodes to be correctly assigned and output by the 3Delight for Maya:
shaderType attribute
The shader node should contain a string attribute named "shaderType"; this attribute is assumed to be set to a value corresponding to the type of shader that the node is related to. The following string values are available:
surface
displacement
atmosphere
interior
light
imager
Node type registration
The shader node type should be registered by passing its type as a string to DSN_addCustomShaderNodeType.
Node type unregistration
The shader node type can be unregistered by passing the node type string to DSN_removeCustomShaderNodeType
.
Output procedure definition
An output procedure should be defined as follows:
global proc DSN_outputCustom_<custom_type> (string $shader node name, string $shader type, string $light handle)
<custom_type>
is a placeholder for the custom node type. The procedure will be passed the following parameters:
Parameter | Description |
---|---|
| The name of the custom shader node to be output. |
string $shader_type | The type of shader expected to be output. |
string $light_handle | The handle of the light source assigned to the shader. An empty string is passed when the shader node is assigned to something else than a light source shape. |