Lighting And Rendering Part - 3

Multi-Pass Rendering
  1. Usually we’d do a multi-pass render for our scene; for example diffuse, shadows, specular and occlusion, because this makes it easier for us to process the renders in a post-production programme, such as Photoshop. However, there is an issue with the Render Pass option between Mental Ray and Maya, and to solve the problem of the Mental Ray render passes you’ll be able to find a free MEL script, called “Mentalray Render Pass Toolkit”, on Highend3d, which has been provided by Mr. Tran Vu Linh. I won’t go beyond my ability to try and explain the usage of this MEL script, but for those of you who are interested I suggest you visit the Highend3d website for details. In this section, I will introduce the basic idea of render passes using the Maya software renderer. So first of all, let’s select all the objects inside the scene, and on the bottom right hand side of the Maya programme, you’ll be able to find a menu for Display and Render. Let’s switch to the Render display layer, which by default is empty, and once we have all our objects selected, click on the last icon at the top of the menu (Fig.20);this will create a new layer for all the selected objects. Let’s rename it “Diffuse” by double-clicking on the default name, Layer
Fig.20
  1. If we right-click on the layer, a menu will pop up, and under the Preset we will able to assign a Diffuse pass for our layer. Repeat all of these steps and assign another layer for the Specular, Shadow and Occlusion layers.Let’s focus on the Occlusion Layer: once the Preset > Occlusion is applied, our objects inside the scene will turn black. This is because an Occlusion shader was automatically applied to our objects. When you click on any object inside the scene, a shader is connected to the Out-colour section of Surface Shader inside the Attribute Editor. Let’s click on the connected Out-colour symbol; this will lead us to the Occlusion shader. Under the Occlusion shader we will adjust the Spread to 1.8 and the Max Distance to 3.6 (double the value of the Spread). Finally, set the Sampler to 32; this will decrease the noise of the Occlusion Layer – something we need to do a test rendering for in order to get the value of those sections in a different scene (Fig.21). 
Fig.21
Once all the layers are created, by default an R will appear at the front of each layer, and this means the layers are renderable. So let’s open the Render Setting windows and set the image format to Targa or Tiff, because both of these formats include an Alpha Channel. Set the Renderable Camera to Camera 1. 
By default, Maya will render out each layer  and save them under the name of the layer we 
created inside our project path. Now we’ll do a Batch Render for each of our layers, so let’s go to Render > Batch Render and Maya will send out our files for rendering until finished.

Post-Production in Photoshop

Fig.22

Once our multiple layers are rendered, we will open all of our layers up in Photoshop (Fig.22).
First of all, the Diffuse layer is our basic layer, onto which we will start to load the Specular layer and blend it with the Colour Dodge layer blending mode, setting the opacity to 50%. For
the next layer, blend the Shadows layer with the Multiply layer blending mood option, and change the Levels of the layer to make it a little darker, along with a Colour Balance adjustment to make the shadows a little more blue-toned. At the end, we’ll then blend in the Occlusion layer with the Multiply blending mode, and set the opacity to 50%. After all the layers have been correctly merged, create a group for all these layers and apply a mask to mask out the sky; this will allow us to import our previous 2D image’s sky as our background. Add a highlight from the sun’s direction, and finally apply a Levels and a Hue/ Saturation layer to do a final adjustment on the contrast and saturation of the image (Fig.23).
Fig. 23
The benefit of multiple-pass rendering is that it allows us to control each layer separately, and
at the same time this can save us a lot of time without the need to re-render the entire scene when only one of the layers may need to be changed. 

Final Conclusion 

Rendering is always related to time; it can vary from five minutes to five hours to render one single frame. Different kinds of setups provide different kinds of results. Most of time we need to choose between the quality and the time – 24 hours for only a single frame doesn’t really mean anything, but 24 minutes for each frame of 100 will become another story. How to get a
good balance is always an important factor of 3D rendering. And on this final note comes the
end of the tutorial. Many thanks once again for reading and following this series, I hope it has
been helpful.


Tiong-seah Yap
For more from this artist visit:
www.schokoladenmann2plus3.blogspot.com/
Or contact them: