Render Passes and Mental Ray Multi Objects
Maya 2012 Tutorial
How to Render Shadows, Specular and Reflections with Maya Mental Ray Render Passes
The Render Passes feature described in this topic only works with Mental Ray. It is helpful if you want to separate your image into a series of layers that will be reassembled in a compositing program such as After Effects.
Using this process the image shadows, reflections, specular and diffuse color are rendered as separate images.
In this example we will create a series of maps for each object. The scene has a sphere and a plane. We will end up with diffuse, specular and diffuse for each object and a separate shadow map when finished.
Add a sphere, plane and light by following the first eight steps in the Render Passes and Mental Ray topic. Set the render mode to Mental Ray and assign a Blinn texture to both objects. Make sure the sphere casts a shadow.
Open the Channel Box and click the Render tab in the lower section of the panel.
Right-click the Master layer name and choose Select Objects in Layer. This selects the light, sphere and plane.
Choose Layers > Create Layer from Selected.
Name your new Render Layer AllObjects.
Select the light and the sphere and right-click the AllObjects layer. Choose Pass Contribution Maps > Create Pass Contribution Map and Add Selected. Name the map, Sphere.
Select the light and the plane and right-click the AllObjects layer and choose Pass Contribution Maps > Create Pass Contribution Map and Add Selected. Name the map Plane.
Select the light, plane and sphere and right-click the AllObjects layer and choose Pass Contribution Maps > Create Pass Contribution Map and Add Selected. Name the map Shadow.
Open the Render Settings, Mental Ray render, Passes tab.
Click the Create Render Pass icon to open it's panel.
Select Diffuse Without Shadows, Reflection and Specular by Cmd clicking (PC - Ctrl clicking) the choices.
Enter Sphere for the Pass Prefix and click Create.
Change the Pass Prefix to Plane and click Create.
Click the Shadow pass to deselect the other three passes and only select shadow. Change the Pass Prefix to Shadow, then press Create and Close.
Cmd-click (PC - Ctrl-click) to select all seven passes, then click the Associate Selected Passes with Current Render Layer icon.
Choose Plane for the Associated Contribution Map and select the three Plane Associated Passes. Click the Associate Selected Passes with Current Pass Contribution Map icon.
Choose Sphere for the Associated Contribution Map and select the three Sphere Associated Passes. Click the Associate Selected Passes with Current Pass Contribution Map icon.
Choose Shadow for the Associated Contribution Map and select the Shadow Associated Pass. Click the Associate Selected Passes with Current Pass Contribution Map icon.
Make sure you have created a project and set your project. For more information, see topic, Starting a Project. Your scene should be saved in the project's scenes folder.
Create your render passes by choosing Render > Batch Render from the Rendering menu set.
Step Twenty One
Your new images can now be found in the project's images folder. Each image is located inside it's own folder. The folders are named MasterBeauty, PlaneDiffuseNoShadow, PlaneReflection, PlaneSpecular, ShadowShadow, SphereDiffuseNoShadow, SphereReflection and SphereSpecular. The images default to the native .iff format. To change the format, open the Render Settings panel and select a new image format.
The Power of Working in Layers
This workflow gives you incredible control as you create your animations. By breaking your animation into a series of layers it is very efficient to tweak a layer in After Effects instead of going back and re-rendering the entire scene.
Don't Like those Folders?
The folders created in Step 14 may not be the smartest way to work. If you prefer to ditch the folders and have images with a name that is more descriptive, try this trick. In the Render Settings, Common tab, enter the following text in the File Name Prefix Box: <Scene>_<RenderLayer>_<RenderPass>
Now the name is created using the scene name, render layer name and render pass name.
Can't Find Mental Ray?
If Mental Ray doesn't appear in the Render Settings, Render Using: menu, choose Window > Settings/Preferences > Plug-in Manager. Make sure Mayatomr.bundle is loaded.