RMS 3
|
IntroductionThis tutorial demonstrates how to assign a custom light source shader to a Maya light when using Pixar's RenderMan Studio release 3. The "shd_distant" shader used in this tutorial is taken from listing 5 of the tutorial "RSL:Directional Light Source Shaders". The reader may wish to review that tutorial because it provides an introduction to the writing of directional light source shaders. The source code for a simple light source shader called "shd_distant" is given below. |
shd_distant.sl
Compile the source code and save the .slo file in a location convenient for use with Maya. |
Assigning the Shader1 Add a new light to the Maya scene then choose "Add Custom Light Shader" - figure 1.
In the "Extra RenderMan Attributes" panel select the checker box. The attribute editor for a RenderMan shader will open.
Standard Shadow Map2.1 Browse for your shader. Note the parameter named "shadowname" has been automatically assigned a TCL expression. [passinfo rmanShadowPass filename -output 0 -validate 1]
For a shadow pass to be rendered the "Use Depth Map Shadows" checkbox must be selected - figure 4.
Deep Shadow Map2.2 Make sure the "Use Depth Map Shadows" checkbox is not selected. Go to the attribute editor of the custom light shader and right-mouse click in the text field of the shadow map (figure 5) and choose "Create DeepShadow".
To double check if the appropriate shadow pass will be rendered open the "RenderMan Controls..." window - it is available from the main RenderMan menu. Select the "Pass Settings Tree" option from the "View" menu - figure 6.
The "DeepShadow" pass should be listed - figure 7. It may be necessary to choose "Refresh" from the "View" menu in order to update the display of the "pass settings tree".
2.3 Select "Add Shadow Attrs" from the Attributes->RenderMan menu - figure 8.
Once again check the "Pass Settings Tree" to ensure the deep shadow pass will be rendered. |
© 2002- Malcolm Kesson. All rights reserved.