Create a new scene in Maya, and ensure the Render Passes plugin is loaded. You should see the Render Passes menu in Maya's main window menu bar when in Rendering mode.
![]() |
Open the Render Pass Editor from the new Render Passes menu. Click the Add Pass button in the dialog, which will create a new pass named newRenderPass1. On the right side of the editor, change the name to RedPass and click Save Changes to this Pass. You now have a new pass, but applying this pass will not currently do anything to your scene.
Next, click the Add Override button, which will create a new override named newOverride1. On the right side of the dialog change the name to RedMaterial, and select the RedPass in the list of passes to apply this override to. Click the Save Changes to this Override button. You now have an override which will be used when you apply the RedPass to your scene. However, as there is no MEL code in this override (except for the default comments) it will have no effect on your scene. |
Now we will write a short piece of MEL code so this override knows how to override the material of the object in your scene. Type the following into the Override MEL Code text area (you can either remove the comment line there, or put this code underneath that line):
source "buildShaderMenus.mel";
assignSG blinn1SG nurbsSphere1;
In the MEL Code to revert Override section, add the following:
source "buildShaderMenus.mel";
assignSG initialShadingGroup nurbsSphere1;
Save the changes to the override. The code above will assign the red shader to the sphere when you apply the RedPass, and will revert to the default grey material when you select any other pass (including the special <none> pass which turns off the effects of all passes). NOTE: the first line in each of these pieces of code makes available the assignSG command to assign a shading group. For some reason this command is not available by default, until you right click on an object in one of the Maya viewports.
![]() | ![]() |
Congratulations, you've just set up a scene with a special pass for rendering your normally grey sphere red.
You should continue getting familiar with using Render Passes for Maya on a simple scene like this one before using passes with any production scenes you are working on.
You should also find a demo scene included in the package you downloaded (with versions for Maya4.0 and Maya4.5). This scene contains a number of pre-configured render passes. Just open the render view, and select each pass in turn and render it to see the results. You can then inspect the override code in the Render Passes Editor to see how it works.