Error Messages: TCLBox & RIBBox |
The preview icon (see the illustration on the right) in a SLIM window is used to preview of effect of an appearance. Unfortunately, the preview icon is of limited help when determining if the code entered into either a TCLBox or a RIBBox is correct. Almost always a spurious error message will be generated - see below. Its best to ignore such messages and check if the TCLBox and the RIBBox are OK by generating a RIB file and checking its contents. Once you are confident the TCLBox and RIBBox are working then, and only then, should you proceed to render images. |
|
||
THE TCLBOX
First, we must setup the TCLBox. The following screen shot shows the contents of a TCLBox, Line 1: source references a Tcl script that contains the following procedure,
# Based on the size of a bounding box the check
# procedure returns a text string containing a
# Sphere statement. A simple script, but one
# that is adequate for the purpose of testing
# a TCLBox.
proc check { bb } {
set rad [expr $bb * 0.5]
set depth [expr $rad * 0.5]
set height [expr $rad * 0.75]
return "Sphere $rad -$depth $height 360\n"
}
Line 2: the mtor Tcl procedure mattr references the width attribute
of the polygonal cube to which the TCLBox is attached.
|
THE RIBBOX
Next, the RIBBox is setup.
Line 1: for convenience a Surface statement is used to assign a
standard shader to the geometry that will be inserted by the $rib
variable.
The same effect could have been achieved by attaching an imported, or created,
surface appearance to the polyCube1 shape.
|
|
CHECKING THE RIB FILE
To see if the TCLBox and the RIBBox are working correctly choose
the custom renderer ie. notepad, using the RenderMan Controls dialog
box - as shown on the right.
If the TCLBox and the RIBBox have worked correctly you will see the text string that
was generated by the check.tcl script - or whatever text your particular
Tcl script produced.
|
|
© 2002-4 Malcolm Kesson. All rights reserved.