RfM
An Introduction to Ribboxes


return to main index



Introduction

Ribboxes and tclboxes were important features of RenderMan Artist Tools (RAT) - the predecessor to RenderMan for Maya (RfM). Examples of how they were used can be found at Scripting Related to RenderMan Artist Tools. When RfM was introduced, the hooks and functionality offered by Ribboxes and Tclboxes were replaced by RiMel scripting. Examples of RiMel and .rman scripting can be found at,
    RfM:Introduction to RiMel Scripting,
    RfM:Various Techniques,
    RfM:Rib Archives at Poly Vertices,
    RfM:Particles & Procedural "RunProgram",
    RfM:Polymesh converted to a Blobby.
    RfM:Rendering Blobby Volumes as Clouds.

The combination of RiMel and .rman scripting enables artist-friendly interfaces to be seamlessly added to Maya. With the re-introduction of ribboxes in RfM 3, a RenderMan-savvy artist can now directly perform some rendering tricks without the need for mel scripting. In essence, a ribbox allows additional rib statements to be inserted into the output rib stream when a scene is rendered. The statements can be added directly as plain text or generated by a Tcl script. This tutorial demonstrates the use of plain text.



Example 1: Selectively Disabling Point-based Occlusion

Figure 1 shows a simple scene consisting of a nurbs sphere and a poly plane. An environment light, set to apply point-based occlusion, and a directional light (no shadows) have been added to the scene. Two instances of Blinn, renamed "sphere" and "floor", have been assigned to their respective objects. Note the objects show the effects of both occlusion and direct illumination.



Figure 1
Both objects effected by occlusion and illumination


Figure 2
Selectively disabling occlusion from the floor


In figure 2 the sphere does not show occlusion from the floor because the visibility the poly plane was, in effect, "turned off" during the RenderRadiosity pass and as such its micropolygon data was not baked into pointcloud generated by that pass. This was achieved by adding a ribbox to the shading group of the material assigned to the (floor) plane - figures 3 and 4.




Figure 3
Assigning a ribbox to the floor shading group



Figure 4


The rib statements shown below were added to the ribbox.

    IfBegin "$user:pass_class == 'RenderRadiosity'"
        Attribute "visibility" "camera" [0]
    IfEnd

Example 2: Selectively Disabling an Environment Light

Figure 5 shows a scene consisting of five nurbs sphere and a poly plane. As in the first example an environment light, set to apply point-based occlusion was added to the scene. Three directional lights (no shadows) have been light-linked so that they only illuminate the central sphere. Two instances of Lambert renamed "occlusion" and "no_occlusion" were added to HyperShape. The "no_occlusion" material was assigned to the central sphere; the "occlusion" material was added to the poly plane and the other four spheres.



Figure 1
Both objects effected by occlusion and illumination


Figure 2
Selectively disabling occlusion on the sphere


In figure 2 the sphere does not show occlusion from the floor because the visibility the poly plane was, in effect, "turned off" during the RenderRadiosity pass. Consequently, the micropolygon data of the plane was not baked into pointcloud generated by that pass. This was achieved by adding a ribbox to the shading group of the material assigned to the sphere - figures 3 and 4.




Figure 3
Assigning a ribbox to the sphere shading group



Figure 4


The rib statements shown below were added to the ribbox.

    IfBegin "$user:pass_class == 'RenderRadiosity'"
        Attribute "visibility" "camera" [0]
    IfEnd




© 2002- Malcolm Kesson. All rights reserved.