RenderMan for Maya (RfM) plugin allows extra rib statements to be added to the output
rib stream generated by the plugin. Extra rib statements can be added by one or
more Mel scripts that have been assigned to the transform and/or shape nodes in
a Maya scene.
RiSphere(1, -1, 1, 360);
would cause this rib statement,
Sphere 1.0 -1.0 1.0 360.0
to appear in the final rib stream. Mel "insertion points" consist of attributes with specific names. The value of such attributes will a string - generally a call to a custom Mel proc. For example, when a scene is rendered if the RfM plugin finds the following attribute, >
on a transform node, and its value is,
then the proc will be called by RfM. The next diagram shows where a users Mel procs can be called and where the additional rib statements they create are added to the output rib stream.
AttributeBegin # transformBeginScript rib statements are # added here... Attribute "identifier" "string name" ["pCube1"] ConcatTransform [1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1] # postTransformScript rib statements are # added here... AttributeBegin AttributeBegin Attribute "identifier" "name" ["pCubeShape1"] ##RLF Inject SurfaceShading -attribute sets@... # preShapeScript rib statements are # added here... TransformBegin ReadArchive ... Procedural "DelayedReadArchive"... TransformEnd # postShapeScript rib statements are # added here... AttributeEnd AttributeEnd AttributeEnd
Making the Process Artist-Friendly
Generally, the Mel "inseretion points" are used as hooks in conjunction with custom interfaces. Such interfaces allow artists to take advantage of the "at render time" generation of extra geometry. The Cutter text editor can greatly reduce the time it takes to design a custom interface and implement it's functionality. Refer to the tutorial "Cutter: Rman & RiMel Scripting" for information about its features.
© 2002- Malcolm Kesson. All rights reserved.