Mtor
|
Introduction
Using Opacity 0.5 0.5 0.5 would make the object to which it is attached semi-transparent! As long as the text in a ribbox represents properly structured rib statements it will be inserted by mtor into the output rib file. |
Using a RibboxThe best way of appreciating the value of being able to insert snippets of RIB statements into an output rib file is to look at a couple of examples. The following ribbox text can be attached to a Maya object such as a nurbs sphere (one unit in radius) or a polygonal cube (2 x 2 x 2). In either case the Maya object is simply acting as a proxy object and as such it will not appear in the final rendered image. Translate 0 -1 0 Scale 0.2 1.0 0.2 TransformBegin Translate 0 1 0 Sphere 1 -1 1 360 TransformEnd Opacity 0 0 0 This ribbox script scales a RenderMan (quadric) Sphere into a thin upright ellipsoid - something that might be useful as a (candle) flame. The Translations ensure that different scale factors would make the top of the ellipsoid appear to move up and down while its base remains stationary. Of course this could easily be achieved in Maya. However, the next script shows a way of "automatically" animating the movement of the ellipsoid. Translate 0 -1 0
Scale 0.2 [expr noise($pct * 15) + 1] 0.2
TransformBegin
Translate 0 1 0
Sphere 1 -1 1 360
TransformEnd
Opacity 0 0 0
The embedded TCL expression uses slims built-in noise() function to
generate values that range from -1.0 to 1.0. A different value is generated
for each frame of an animation by accessing one of Slims pre-defined variables
- $pct. This variable returns a value between 0.0 and 1.0 depending on
the percentage of the animation completed. |
© 2002-6 Malcolm Kesson. All rights reserved.