Wednesday, April 7, 2010

CHARACTER LIGHTING IN MAYA WITH MENTALRAY MULTIPASS RENDERING

MenatalRay for Maya in Maya 2009 gives us a great flexibility to render our scene into multiple render passes and later combine in compositing. All the images are the property of DNA Inc (Dilsukhnagar Arena Incubation). Here I will show a simple character lighting With MentalRay. I am splitting Maya scene into Two render Layers.
One for Ambient Occlusion (I call this renderLayer as No light Layer) and another for Lights. Preparing the scene for render Passes. First select the geometry and create a renderLayer, Maya assigns a separate renderLayer for the selected geometry. Select MentalRay as renderer and in the indirect lighting Tab select Ambient Occlusion option with 256 rays (even you can go with 128 or less rays also). And for this no need to calculate GI or FG.



After this in passes tab create passes AO, diffuseMaterialColor and Specular. Associate the passes with the current renderLayer by using arrow button located in the middle of scene passes and associated passes windows. like this....



Now we will render the scene (sill now we never used any light, we will use lights in the next step) and we will get render image one in render buffer (this is called as masterbeauty) and all the passes in the project images directory under temp folder. like C:\projects\images\tmp\layer1\AO, C:\projects\images\tmp\layer1\diffuseMaterialColor, C:\projects\images\tmp\layer1\specular the same can be accesed from the render buffer or renderview with file>loadrenderpass option.



And the render images looks like this...



Now the actual lighting begins... I am going to put one Key light, one rim light and by calculating Global Illumination controlling the fill light for this. Let we see key light settings. For Key light I used one spot light with raytraced shadows.(here we dont have any complex geometry so ratraced shadow calculation will be the ideal choice, even we can go with Dmap shadows but controlling Dmap shadows in MentalRay is bit tricky. I will post another tutorial on using Dmap shadows with Mentalray) The light placement and the light attributes are here....


I use a bounce dome instead of a fill light (image based lighting option: texture) for indirect light calculation to fill the dark areas of created by Key light and the setting are like this.....



and renders will be like this...(diffuse, indirect, specular passes)



Now the rim light follow the same as key light render layer place the light slightly opposite to the key light position to get a subtle rim light on the character and choose diffuse and specular passes for rendering. The light placement and the renders are here.....



Compositing the render passes:

Am not an expert compositor I am little bit handy with Digital Fusion. Let we connet the passes in Fusion. first connect diffuseMaterial color pass with AO and choose Multiply blend mode. add color corrector to diffuseMaterial color pass and dicrease gain to 0.5, And connect rest of the passes in this order...



and final out put will look like this...



This is raw output and we can tweak it to get more perfect look. I will post advanced lighting tutorial shortly.... The Character what I used in this tutorial is a property of Dilsukhnagar Arena Incubation and all rights reserved with them.....

6 comments:

Muni Pradeep said...

hi there..

thank u or ur comment..

nice blog and nice works man...
i used sss material for the rendering man...

JJB's Art said...

how do you make just a light pass so you can comp it in nuke?

RanjithVFX said...

hai,
very nice posting
pls exolain about the blending modes of other compositing passes.

Namita Sultania said...

Very nice & thanks for sharing this.

ASHOK PALLATI said...

thank you

GameYan Studio said...

Nice post,..
Its very useful for my work...
I m working on http://gameyan.com/