You can use the following method for creating output passes if you are using Maya 2008 or below. Currently, the recommended method is multi-render passes.
You can obtain advanced control over the lighting and color values in your scene by creating camera output passes. Using this method, you can isolate the color information into separate passes, for example, RGBA in 8 bit.
To create camera output passes
For more information, see mentalrayOutputPass node.
Repeat as necessary to create multiple output passes.
For each output pass, the output pass filename is appended to the scene render filename set in the Render Settings window. See Step 6 for more information.
Your render output includes one image for your scene and one image for each of your output passes. For each output pass, the output pass filename is appended to the scene render output filename.
For example, if you create two output passes, with the filenames output_pass_1 and output_pass_2, and your scene render file name is scene_render, then your batch render output will include the following images: scene_render, scene_render_output_pass_1 and scene_render_output_pass_2.