Rendering is the most final thing in the 3d animation package.Setting the render is not that much easy as it seems.Simply clicking the render wont give the perfect image even if you did lighting texturing everything correctly.OK I agree if you set the render settings correctly you can get the desired output! But if you know about composting? Why composting is the necessary part for every animated film?Simply because it gives more control over your final image.Even if you know composting you have to get the different layers/passes correctly.In Maya it is simple and very comfortable if you know the technique.In advanced layering Maya lacks some special features such as object/shader ID pass,rgb pass,UV pass etc.
Here I am explaining the basic render layering technique for diffuse,specular,shadow,occlusion,reflection and depth map.I also explain the compositing techniques with After effects.(Even Photoshop will do the trick).Even for node based compositing software the technique will be the same but you have to refer the software manual to arrange the things correctly.
I assumes you have the basic working knowledge with Maya and After effects.
Here we starts.
Create a basic set up like this .
I have a text mesh called text(if you don't know how to create a text visit one of my tutorials Text or ncloth text),a base plane called base, a directional light called key light with intensity 1 and an ambient light called fill with intensity 0.4.Of course a camera called rendercam.
Assign a phong material to the text and give color(you can assign different materials for different text but keep the phong material with default settings.)We need reflection for this material.
Assign a blinn material with white color to the base plane.
Position your keylight (x=-4,y=8.5,z=15: x=-22’,y=-41’,z=0’) >You can adjust the values according to your scene size.
Position the fill light also (x=0,y=7.5,z=-6.5: x=-0’,y=-0’,z=0’)
Now create a camera and rename it to rendercam.Position the camera something like this.
OK now we need to set the render settings.Go to render settings do image size as 640x480 and the renderable camera to render camera. Set the image format to tga.Right click on file name prefix and choose <renderlayer>(this will automatically rename the rendered images according to the render layer we set.)
Now go to Maya software tab and change the quality to production.Turn on the ray tracing and leave the rest as it is.
If you want a render select the keylight and simply turn on the raytraced shadows and leave the settings as it is. (we render the shadows separately with depth map filter). This step is for visual sake only.
You get something like this
Okay Now we get the desired look.But we are here for render layers. So select all the objects including lights (deselect all the objects and right click the empty area in viewport will give the option select all) and go to the renderlayer tab under channel editor.You can see a master layer there. Click on the layers and chose create layers from selected.Now you will get a layer named layer1.Select the layer 1 and click layers>copy layer.Create total 6 layers like this way.Now double click on each layer (except master layer ) and rename them respectively as follows .Diffuse,shadow,specular,reflection,occlusion and depth.
Now do the things carefully. We have render layers but no settings for them.
Select the layer named diffuse and select the base plane.Assign a use background shader and change its parameters as follows.
Now select the layer named specular and right click on it.Select attribute( In Maya 2009 and below this step may differ.)Now an attribute window with specular will open.Click on the preset tab and chose specular.
Now select the layer named shadow and do the same step and chose shadow.
Select the key light (still in shadow layer) and go to attribute editor and turn on depth map shadow and change the resolution to 1024. Leave the rest unchanged.
Now select the layer named reflection (here you can't get the preset because Maya doesn't have a preset for reflection in software render).Here we need to create some shaders.
Select the base plane and assign a use background material to it.Change the parameters as follows.
Specular color to white, reflection limit to 10, shadow mask to zero.
Now do a render.
But we don't need the text, we need only the reflection. so select each letter and turn off the primary visibility.Use attribute spread sheet for a faster work flow.
Do a render again.
Now we got things correctly.
Now select the layer occlusion.Do attribute>preset>occlusion.
Do a test render.
You will get something like this. But we have to adjust it little bit. Select the newly created surface shader( if it is in the attribute editor go to hyper shade and select) . Now click on the out color and you will get mib_amb_occlusion_1 tab.Change the parameters as follows
Samples= 64, max distance to 2.
Okay now we get some thing like this.
One more layer left Depth.
Right click on the depth layer and do attributes >presets>luminance depth.
Do a render.( If you are using Maya 2009 you will get the correct output).
Everything will be white.It is because some bug in Maya settings. Select the render cam and adjust the min clip to 0.1 and max clip to the farthest distance of your object.( here it is 33).
Now right click the text and select assigned material and you will get a surface shader selected.Click on the out color connection you will get a set range attribute.
Now click on select under bottom and do CTRL+A. You will see oldmin and oldmax value have different colors.
Right click on old max and do break connection and set the value of your max clip value of the camera( here 33).
Do a render.
Now we have to render all the layers. Select the master layer and click on the x and it will be changed to a green tick mark.We need this master layer for reference.It is not mandatory.
Now go to rendering mode and do batch render. We set our render range to single layer so the rendering will happen very fast. Once the render get finished you will get following images