Prev | Next


Custom Geometry


When RenderMan for Maya goes to render and encounters a plugin shape node in Maya, the shape is skipped unless you tell RfM what to do with it. This example demonstrates how you can make RfM recognize your custom shape and render it with a RenderMan procedural plugin. As our custom shape, we'll use the quadricShape from Maya's devkit, which is a plugin that draws your choice of a sphere, cylinder, disk, or partial disk. There are attributes on the node, like radius, height, and sweepangle which will be interpreted.

 1 — CREATE THE quadricShape.

On your platform of choice, locate the quadricShape plugin in the Maya devkit, and compile it. Check out the Maya documentation for information on compiling the plugin.

Once you have the quadricShape plugin, open the plug-in manager in Maya and load it up. Then create a shape, like this, in the Script Editor:

	createNode quadricShape;
	select -r quadric1;
	sets -e -forceElement initialShadingGroup;
	

You should see a cylinder in the scene, and since it's initially created without a shading group, we've attached the default shading group. Try changing some of the attributes on the node. Notice that the quadric is missing from renders.

 2 — MEL SCRIPTING

Next, some MEL scripting is necessary to tell RfM about the procedural plugin, which we'll build later on.

 3 — THE QUADRIC PROCEDURAL

Now the maya scene is set up. Next, we'll build the procedural quadric plugin, which will be dynamically loaded when its bounding box is encountered during rendering.

The code and makefile for the quadric procedural is located in the RenderMan Studio devkit, which is included as part of your RenderMan Studio installation, in the devkit directory.

 4 — RENDER!

At this point, you should be able to render with RenderMan for Maya. If you don't see the quadric in the render, the most likely problem is that the searchpath isn't set correctly. You should see the quadric shape in both internal RfM renders and spooled RIB renders, assuming that the location of the quadricProcedural is accessible from the machine where the spooled render is happening.

 5 — BUT CAN WE MOTION BLUR…

So you want to motion blur your custom shape, eh? When the transform for the custom shape node is animated, motion blur happens automatically. Your procedural doesn't need to do anything special. However, if your shape node deforms and you want to motion blur that, you'll need to do some extra work.


Prev | Next


 

 

Pixar Animation Studios
Copyright© Pixar. All rights reserved.
Pixar® and RenderMan® are registered trademarks of Pixar.
All other trademarks are the properties of their respective holders.