How to correctly render Char/BG layers in maya


#1

Hi I am trying to understand the best way to render a Character/BG beauty layer in maya.
I know I can add the char into a render layer and the BG into another but that wont take into account how the the character reflects the environment, receives shadows, FG, etc…
So an approach that I’ve been taking is to add the BG to the char layer and then turn off Primary visibility on the BG objects. But this feels a bit cumbersome, is there a better way to do this?


#2

What renderer are you using?


#3

Mental Ray, sry forgot to mention it.


#4

Try using Contribution Passes in Render layers. You select both character and background, then create a new render layer, then select just the character and go to Pass Contribution Maps in the new render layer and select Create Pass Contribution Map and Add Selected. Do the same for the background. You’ll now have a single render pass with both character and BG, but each will have it’s own Contribution Map.

Then you have to set up the passes in the Passes tab of Render Settings. Create the passes you want, associate them with the current render layer (it has to be selected in Render Layers), then associate them with the Contribution Maps at the bottom of the Passes tab. The drop-down menu will list all the Contribution Maps you created for each Render Layer. Be sure to name everything logically (the Render Layer, the Contribution Maps, and the Passes).

IMPORTANT: you have to create a separate pass, like a beauty pass, for each Contribution Map…they can’t share passes if you want them to separate out. Give each render pass a prefix that matches the Contribution Map name.

And make sure that you’re using the mia_material_x_passes shaders.

You have to use an .EXR format to save the files and do a batch render. You get a separate layer in the .EXR file for each Contribution Map…just the items that was originally selected which will be knocked out from the background, but will have all reflections, refractions, etc, correct. There’s no additional render time involved since everything is separated out in the frame buffers and then composited back together in the render output. You’re just saving everything out before it gets composited back together.

If you want the background to NOT have the character knocked out of it, then do this: Select the render pass in the Passes tab of Render Settings and open your Attribute Editor. Under the Render Pass Parameters tab, there something called “Hold-Out”. This is what causes everything to be knocked out. Turn it off for your background pass and nothing will knock out of it.

Let me know if you need a more detailed explanation.


#5

Thanks a lot lhitch, I managed to do a you explained and it’s even faster to render as you said =)
the pass/contribuition map was a bit tricky to grasp but i think I got it now =)