Showing posts with label Maya 2009 new features. Show all posts
Showing posts with label Maya 2009 new features. Show all posts

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

Thursday, July 2, 2009

LIGHTING AN INTERIOR SET


Now the task is to match this image's look and feel. This interior scene modeled by Jeremy Birn. This scene contains only shader colors and no textures at all. We are going to lit it with maya using maya software in single pass. timing is Night.

First you should set the key direction. this is night lighting so we use cool moon light as our key. for this I used direction light as the key. Edit key lights attributes to match this settings....

adjust the key position like this and you should get the render like this image.

Now set fill lights for wall, ceiling, and room. and settings for all the fill lights are shown below...

adjust the positions accordingly. The final position of the fill lights for wall, cieling and room should look like below given image.

and the renders should look like this...

now add a window key light to illuminate the window sides showing the key, use a point light with no decay and put a cool color with intensity of 0.750, dmap shadows on with dmap resolution of 1024 and sample 10.

Now add a fill light for floor. with settings of intensity 0.175, color cool blue, cone angle 120, dmap size 256 with sample 8, dmap focus 50. match with this image

add one rim light for chimney with 0.2 intensity. leave rest of the settings to default. Add a fire light(a point light) and place in to the fireplace area with warm orange color with settings of intensity 8.750, decay-linear, dmap size 256, filter size 10. match render to this image.

now add lights for fireplace's stacking tubes

now fine tune rest of the objects by adding appropriate rim fill and kicker lights. and the final image looks like this.

DIGITAL FUSION TOOLS --- CHANNEL BOOLEAN

channel Boolean helps us to extract a particular channel of our choice. It exactly works like "sets" in mathematics. if you have 3 channels RGB combined in an image without Alpha channel then you can extract alpha channel from the available color information channels. below picture shows visual information about this tool.

Saturday, June 27, 2009

CG LIGHTING---COMPOSITING ESSENTIALS

I use Digital Fusion to composite renderd images. Its easy and userfriendly application with node based advantage. Let we take look of the work space and work flow of Digital Fusion. this is the interface of Fusion.

now import footage in to Fusion by browsing the footage/render images directory and just drag the image file or image sequence to the flow window, imported footage become a node in Fusion, like layers in After Effects. In After Effects you need to arrange layers the layers one top of another. But in fusion you need to connect the nodes(layers) when ever you connect two nodes Fusion will create an extra node called "merge" merge allows you to change the layer apply mode (blend mode in AE) and one blend attribute.

merge node and tool options like this


now you can choose merge apply mode in tool window to get required effect. usually we choose multiply for Occlusion and screen for rest of the nodes (like key fill rim spec etc.....) after connecting all the nodes just drag the final merge into preview window so you will see the final result of that merge/flow.
SAVING AND RENDERING TO IMAGE OR MOVIE FORMAT:

to render the flow into image or movie format you need to connect a "saver" to the flow. saver tool is available in the tools menu under I/O sub-menu like this...

after connecting saver options window will open and asks for the out put path/directory. choose a directory to save the output in desired format.



render the out put and enjoy.....

Friday, June 26, 2009

MAYA 2009 NEW LIGHTING FEATURES

Hey guys let we explore new lighting features in MAYA 2009. Here is a simple tutorial using MAYA-DIGITAL FUSION. This tutorial based on the newly introduced render passes in lighting. The task is to match the look and feel of this image.

modeled by Juan Carlos Silva.

Maya 2009 allows us to render our scene in to multiple passes like Ambient Occlusion,
diffuse material color, specular, shadow, indirect, incandescent, translucence, indirect etc.. this method gives us greater comfort to fine tune the output quality in post by using softwares like Fusion,shake, AF etc.... let we start lighting.

Maya scene looks somewhere like this


Now create render layers for floor,occlusion,key,fill,rim,shadow and topfill.
after creating all the render layers your layer editor should look like this


Use four lights key,rim, fill and topfill. add each light into its respective render layer.

Now the important task adding passes to layers. Make sure that mental ray selected in render using option in your render settings tab. it should look like this...

in extra to light passes our character needs one occlusion pass. light is not required for occlusion pass. to get the correct occlusion you have to make some changes in the render settings window. first go to the passes tab and click on create new render pass button, this will open a another window contains different render pass options. choose AO, diffuse material color passes form the window. like this.

after creating render passes in order to render with the particular render layer we need to associate that pass with render layer by adding the render passes in to associate passes window. Now its time to set the values for Ambient Occlusion calculation. Ambient Occlusion option is available in indirect tab. opt for final gathering and Ambient Occlusion set the final gather accuracy 100 and rays 512 in Ambient Occlusion. like this

for all the light passes choose maya software as renderer.Be sure every renderusing option must be overrided.(except for key we need specular pass for the key light) for key light add only specular pass. render key shadow on the floor as a seperate pass. for this select character and floor create a render pass rename that render layer as "Shadow". assign use background shader to floor. select the robo and go to the attribute spreadsheet window switch off primary visibility and recieve shadow options in the render tab.finally add key light in this render layer. select all the floor items and switch off cast shadow option. this will give you rendered shadow in alpha channel. adjust the light positions as required by the scene. turn on the shadows for each and every light. now its time to render. set appropriate project directory and render single frame using maya batchrender. It gives images like this.

and all the passes looks like this image.


now its time for compositing... open digital fusion and import all the images into.
start with char_diffuse material clor connect to occlusion node and choose multiply in apply mode option. like this

keep on constructing the Fusion flow... and final flow should look like this.


and your final image in fusion will look like this.



so this is the basic workflow for Maya 2009 render passes. practice it and enjoy. if you have any doubt just mail me on "cglighting@gmail.com"... more tuts are on the way coming soon keep visiting my blog.

Monday, September 29, 2008

GETTING GOOD OCCLUDING SHADOWS/CONTACT SHADOWS

Ambient occlusion is very very important to get good object details in multi pass renderings. Let we see how to get good occlusion using mentalray for maya. For this I used a downloaded model, it looks like this in wire frame view.




let us render with default shader Lambert !





Now let us prepare occlusion shader using mentalray utility " mib_amb_occlusion " to get mentalray utilities in hypershade we need to check 'mayatomr.mll' in plug-in manager. as shown in this picture.




let us connect the occlusion utility to our lambert shader



cool now we will render the scene with default settings. the rendered image looks like this.




we got few contact shadows and the image quality is not good. so let us change the render and shader settings like this.



let us render with the modified settings.....



now its better than the previous render, we will render it for more quality and clarity, by adjustig the main shader (lambert) channels. already we connected mib_occlusion utility to the ambient channel. no change the shader color to 1 (h=0 s=0 v=1) and diffuse, translucence, translucence depth and translucence focus to 0. like this....



and the final occlusion render will come like this.



next compositing occlusion pass in FUSION.