RfM Ribbox
|
Introduction
This tutorial demonstrates how two Ribboxes attached to two shading
groups can be used to create an effect that might be difficult or impossible to
achieve using Maya's standard tools. The workflow outlined in this tutorial
produced an animation of nearly 400 point lights "parented" to a particle system
- figure 1.
The reader should review the following tutorials, Why Use Two Ribboxes?
Instancing a light at particle positions using TCL is not difficult - listing 1.
However, because RfM writes the rib information about a particle system
into an AttributeBegin # List of lights created by a TCL script TransformBegin Translate x y z # position of particle 1 LightSource "pointlight" 1 TransformEnd TransformBegin Translate x y z # position of particle 2 LightSource "pointlight" 3 TransformEnd Attribute "visibility" "int camera" [0] TransformBegin ReadArchive "path_to_particle_archive" TransformEnd AttributeEnd # WOOPS! Previous lights are now INACTIVE AttributeBegin TransformBegin ReadArchive "path_to_an_object" TransformEnd AttributeEnd
Consequently, in order for surfaces to be effected by the "particle lights" they must have a
Ribbox assigned to their shading group or groups. The role of the additional Ribbox
is to inject into the rib stream a sequence of AttributeBegin ArchiveBegin "_ribbox_" Illuminate 1 1 Illuminate 2 1 ditto... ArchiveEnd ReadArchive "_ribbox_" # Now the lights in the particle Attribute block are ACTIVE TransformBegin ReadArchive "path_to_an_object" TransformEnd AttributeEnd |
The Script
The TCL script shown in listing 1 (ParticleUtils.tcl) should be copied to the
users custom TCL scripts directory that is sourced by RenderMan
Studio. Suggestions on how this can be done can be found in the tutorial, set tclDirectory /Users/$USER/Documents/maya/projects/RfM_tcl # Load the customed TCL procs for use in Ribboxes LoadExtension tcl [file join $tclDirectory ParticleUtils.tcl] |
Listing 1 (ParticleUtils.tcl)
|
WorkflowStep 1Create an emitter. Provide the particles with a limited lifetime. Move the timeline and generate a few particles. Select the particles, then choose the transform tab in the Attribute editor. Step 2
From the Attributes menu select, Step 3
Select the intialShadingGroup tab and from the Attributes menu select, Step 4
Enter the following code in the Ribbox, Step 5
Find the shading group(s) of the surface or surfaces to be illuminated by the
particle lights. From the Attributes menu select, Step 6
Enter the following code in the Ribbox, Step 7Because the particle lights use the classic "pointlight" shader copy its file from, RfM_INSTALLATION_DIR/lib/shaders/pointlight.slo to the project directory that Maya is currently referencing. Step 8Open the Outliner and make sure the particle and the emitter appears before the geometry that will be illuminated by the lights created by the particles. |
Possible Issues with RfM Batch Render
If the rendered images obtained from using the Batch Render button renderman/foo_1122110312/rib/0001/0001.rib Open "0001.rib" in Cutter and use control+e, alt+e or Apple+e to render the frame. Look for errors reported in Cutter's Process Monitor. For example, a typical error might be, Cannot find: slim/shaders/foo_1122110312/BaseVolume.slo
One way to fix such a problem is to edit the path to the shader in the attribute editor.
For example, change |
© 2002- Malcolm Kesson. All rights reserved.