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.

22 responses to “Tutorial: Multipass rendering in Maya and Mental Ray”

  1. gustavo eggert boehs said:

    […] Veja o tutorial! […]

    10:07 am on Monday, July 12, 2010

  2. Martin Klekner said:

    Great tutorial! Thank you

    1:42 pm on Monday, July 12, 2010

  3. Chaz said:

    Are passes broken when rendering with physical sun & sky?

    10:08 am on Wednesday, July 14, 2010

  4. kelvin said:

    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!

    6:44 pm on Tuesday, July 20, 2010

  5. gustavoeb said:

    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

    5:45 pm on Wednesday, July 21, 2010

  6. gabriel said:

    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.

    10:20 am on Friday, July 23, 2010

  7. john chen said:

    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

    12:34 am on Wednesday, August 11, 2010

  8. Peki said:

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


    3:51 pm on Friday, September 10, 2010

  9. andrew said:

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


    4:18 pm on Monday, September 27, 2010

  10. Sokol said:

    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?


    10:50 am on Monday, November 15, 2010

  11. Sokol said:

    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 >_<


    2:59 pm on Monday, November 15, 2010

  12. sandra isaksson said:

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

    12:20 pm on Monday, November 22, 2010

  13. tus said:

    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!

    2:47 am on Saturday, December 18, 2010

  14. Jim said:

    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.

    4:04 pm on Sunday, February 6, 2011

  15. otrocoso said:

    Great tut man, thanks for sharing.

    6:29 am on Tuesday, April 12, 2011

  16. vj said:

    thnx friend for sharing this.

    3:28 am on Thursday, May 26, 2011

  17. Jayakanthan said:

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

    6:48 am on Friday, July 15, 2011

  18. SomeSanctus said:

    you don’t show work with evaluationPassTrought connections

    10:59 am on Thursday, July 21, 2011

  19. Judhasing Brahma said:

    Thanks to you sir for this tutorial

    12:45 am on Thursday, April 19, 2012

  20. AB said:

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

    5:57 am on Wednesday, April 25, 2012

  21. hrishi said:


    GR8 man thanks for tutorial……

    11:37 pm on Monday, July 23, 2012

  22. Marlus Silvestre said:

    Thanks a lot, “Compatriota”…

    9:30 am on Saturday, February 14, 2015

Leave a Reply

© CG Channel Inc. All Rights. Privacy Policy.