RfM Ribbox
|
Introduction
This tutorial demonstrates how a Ribbox, assigned to a shading group in
HyperShade, can generate geometry at render-time. The geometry created by the
Ribbox is injected into the output rib stream and as such does not appear in
the Maya viewport. For example, figure 1 shows only a curve while figure 2
shows a chain consisting of 700 links generated by a TCL script called by a
Ribbox. By querying xyz positions the TCL script was able to distribute links
that follow the curve at regular 'u' intervals.
|
|
The Scripts
The chain-on-curve "system" consists of two TCL scripts that implement the
following procs. VectorUtils.tcl (listing 1) proc vector { pnt1 pnt2 } proc length { vec } proc aimY {vec} ChainUtils.tcl (listing 2) proc chain { OBJNAME numchains hr thick} proc linkgen {L ratio thick}
The |
AttributeBegin Translate 0 0.275 0 TransformBegin Rotate 180.0 0 0 1 Torus 0.375 0.1 0 360 180.0 TransformEnd TransformBegin Translate 0.0 0.5 0.0 Torus 0.375 0.1 0.0 360 180.0 TransformEnd Rotate -90.0 1 0 0 TransformBegin Translate 0.375 0 0 Cylinder 0.1 0.0 0.5 360.0 Translate -0.75 0 0 Cylinder 0.1 0.0 0.5 360.0 TransformEnd AttributeEnd |
|
The set tclDirectory /Users/$USER/Documents/maya/projects/RfM_tcl # Load the customed TCL procs for use in Ribboxes LoadExtension tcl [file join $tclDirectory VectorUtils.tcl] LoadExtension tcl [file join $tclDirectory ChainUtils.tcl] Listing 1 (ChainUtils.tcl)
|
WorkflowStep 1Create a curve and select its transform tab. 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, LimitationsVersions of RMS after release 3 put all shading information, with the exception of lighting, into files that are separate from the the main RIB files. Such files are called RenderMan Look Files (RLF). As a consequence it is only possible to have one curve render as a chain even when several curves share the same shading group and RIB Box. The only way to avoid this limitation is to prevent RMS from using RLFs. Work-AroundPut the following text into a file named "RMSworkspace.ws" and save the script in the Maya project directory. The script will, in effect, turn off the RLF features of the current version of RfM - but only for a specific project. SetPref DisableRifShaderAttachment 1
|
© 2002- Malcolm Kesson. All rights reserved.