Sign up for the newsletter

Signup for the Newsletter


Tutorial: Multipass rendering in Maya and Mental Ray

Monday, July 12th, 2010 | Article by Gustavo Eggert Boehs

This tutorial shows a workflow for rendering 3D scenes in separate passes and compositing these renderings for finer control. The 3D rendering will be done in Maya, using Mental Ray and its “mia_x_Passes” materials, that allow the output of all information used by the shader at render-time. The compositing of these renderings will be done in Nuke using OpenEXRs in a linear workflow.

  1. Introduction
  2. Separating scene elements in contribution maps
  3. Separating passes for each contribution map
  4. Saving multi-layer OpenExr files
  5. Compositing shaders in Nuke
  6. Writing custom color buffers

Scene Files for Tutorial

Chapter 1 – Introduction

Chapter 2 – Contribution Maps

Chapter 3 – Passes

Chapter 4 – Multi-layer OpenEXR files

Chapter 5 – Compositing shaders in Nuke

Chapter 6 – Writing custom color buffers

Author Bio
Gustavo Eggert Boehs has a degree in Graphic Design by the Federal University of Santa Catarina,Brazil. He has also atended a one year 3d animation course at Melies, during this time he directed and produced from start to finish his animated short “Chicken’o’Matic”. He now works at a post house in Brazil called Ilegal FX as a Generalist 3d artist.

Author’s Website


You can follow any responses to this entry through the RSS 2.0 feed.

You can leave a response, or trackback from your own site.

  • Pingback: gustavo eggert boehs()

  • Great tutorial! Thank you

  • Chaz

    Are passes broken when rendering with physical sun & sky?

  • kelvin

    hey man, great Tutorial!

    I was wondering. Is it possible to do a tutorial about Seperate Shadow passes?
    I’ve been looking all over, and messing around with Maya 2010, but I still can’t figure it out. thanks!

  • chaz: I have never used physical sky in this workflow, so I don’t know how it responds to it =/

    kelvin: mia_material_x_passes doesn’t have a separate shadow pass. what you can do to control your shadows is output through the writeColorBuffer node (as explained in the tutorial) the Diffuse Level and Diffuse Raw passes.
    Diffuse Level is all the color information from your materials, and Diffuse Raw is all the light (and shadow, since the later is the abscence of the first). You multiply one by the other and you get your Diffuse pass, but now you have control over the shadows.
    Aditionaly if you use GI you also need to output Idendirect Post AO (the result of indirect lighting afected by occlusion) and add it to Diffuse Raw. That is so you get all the light informatio together (direct+indirect). After that multply this by your Diffuse Level and you are done.

    Hope this helps

  • gabriel

    Kelvin: Since Maya 2011 you can now export ShadowRaw (that’s probably what you are looking for) when using mia_material_x_passes and other _x_passes MR materials.

  • Cool tut, I am seeking an answer regarding custom frame buffers.

    is it possible to assign a custom buffer globally rather than per shader? for example I want to connect the MIA fast occlusion to control the global AO setting for an indoor scene.

    Thank you

  • Peki

    Great tutorial. Thanks for sharing the knowledge. No mystification, easy to follow. Just great!


  • andrew

    Hi Gustavo
    Excellent tutorial.
    Thanks a lot for taking the time to share your skills and knowledge.


  • Sokol

    Awesome tutorial 🙂

    Could you make a tutorial about how to comp passes from Maya 2011. ‘Cause they are a bit different from Maya 2010 and older versions x) I can’t comp together the shadow pass. It’s getting jagged edges on some places and there is some black points everywhere. Also if you can make a tutorial about how to gamma correct, ’cause im getting confussed about how it works. especialy in maya 2011 with they new funtion “Enable color manegment”.

    Or if you dont have the time if you could explain it to me by mail?


  • Sokol

    im getting missing knod in Nuke 🙁

    when i try to reconnect others get missing, then i reconnect the other one but then the rest of them get missing too. Like an endless loop.. to further understand its like

    if i got 4 outputs,
    Output 1 & 2 are missing knods, then i reconnect.
    then output 3 & 4 are missing. Then i reconnect but THEN output 1 and 2 are missing again >_<


  • sandra isaksson

    this tutorial taught me more than my teacher could. Well done man!

  • tus

    those are very cool tutorials that I have never seen , you Penetrate the veil of mental ray`s renderpass! well done! thanks for sharing man!

  • Jim

    Great tutorial. Thanks for creating and sharing! But here’s the thing: It describes when you have a self contained environment. I’ve tried using Render Passes where there is a character animated, with a simple poly plane to act as ground to receive shadows only. Thing is, no matter what I do, I do not get a true “Shadow Only” render. I get nothing at all, or I get a shadow with the outline of the plane it’s cast on despite using the Use Background shader, and flipping the visibility options. Now, I am a newcomer, but I’ve done it with Maya 2008 quite easily, and using Maya 2011 the results aren’t the same! Any advice ? I’ve scoured and found no tutorials that cover the simple steps- they might mention it, but only in passing. Nothing showing the 1-2-3’s of it! Thanks.

  • otrocoso

    Great tut man, thanks for sharing.

  • vj

    thnx friend for sharing this.

  • Great Tutorial Man…..Thank ! ………………………..

  • you don’t show work with evaluationPassTrought connections

  • Judhasing Brahma

    Thanks to you sir for this tutorial

  • AB

    Hi man, great tutorial. Thanks for sharing! Hope the best

  • hrishi


    GR8 man thanks for tutorial……

  • Marlus Silvestre

    Thanks a lot, “Compatriota”…

© CG Channel Inc. All Rights. Privacy Policy.