The RenderMan Code node is a Hypershade node to inject RenderMan Shading Language (RSL) code into a Hypershade network. This means that it is possible to provide any Maya Hypershade node the result of any RenderMan Shading Language computation.

To create a RenderMan Code node, simply click on its icon, which is located in the General Utility section of the node list in the Hypershade. When a RenderMan Code node is selected, the following gadgets are displayed in the Attribute Editor:


RenderMan Code Node
 

Shading Parameters

This attribute lists the parameters for the node. This attribute will define node plugs and shader parameters for the node. Once defined, the Parameters panel will list the input and output plugs. To edit this attribute, click on the Edit in Text Editor button next to it. The parameters need to be declared each on its own line. The following parameters can be defined.

ParameterDescription

type name
___________________________

This will define an input plug of type 'type' and name it 'name'.

'type' can be either float, float2, float3 or string. 'name' is a string that defines the name of the plug.

output type name

Prepending 'output’ to a plug definition defines an output plug of type 'type' and name it 'name'.

'type' can be either float,  float2, float3 or string. 'name' is a string that defines the name of the plug.

shader_input rsl_type name

This keyword is not used to define a plug for the node, but instead it will define a shader input parameter (i.e. a parameter that can be fed a value through the RiSurface call). 'rsl_type' is any legal type in the RenderMan Shading Language. When a parameter value is expected to change during the object shading, it is recommended to prepend varying to the type name. The variable name is specified by 'name'.

shader_output rsl_type name

This keyword is used to define a shader arbitrary output variable (AOV). rsl type is any legal type in the RenderMan Shading Language. The variable name is specified by 'name'.


Shading Code
 

Specifies the RenderMan Shading Language code that will be inserted in the shading network. To edit this attribute, click on the Edit in Text Editor button next to it. The code specified by this attribute will be put in a function where all parameters defined by the Shading Parameters attribute will be available. Additionally, standard variables such as P and N can be accessed with an external declaration. 3Delight for Maya also defines the variables 'float ss' and 'float tt' when translating Hypershade shading networks; these two variables hold the texture coordinates generated and manipulated by the various Hypershade nodes.

Parameters

The content of this panel is generated based on what is assigned to the Shading Parameters attribute. It will list all the input and output plugs defined for this node, with gadgets relevant for the plug type.

  • No labels