Quick and Basic Lighting & Rendering

Here is a super fast way for animators to texture, light, and render shots to spruce up pieces to have a finished quality for reels. What’s great about this method is that it can be as simple as you want or as complex as you want; like baking a cake you can have plain yellow cake made from a mix out of the box or you can continue to add sprinkles, frosting, and rum to it.

In this tutorial I will be using Mental Ray and in Maya 2014 but it can be done with any render engine and across different platforms as long as you render out the necessary layers of at least the diffuse (color) and occlusion.


Creating the Diffuse Layer

To start off with, use surface shaders for everything. Surface shaders are the utmost basic shaders that are just flat color. Surface shaders do not interact with lights and has no specular or reflections. This is great in that you will not have to worry about making physically accurate materials and everything is just based on color. As there is no need for light information, when rendering the color, everything comes out flat but extremely fast; a few seconds per frame.
To create shaders, go to the hypershade window through Window > Rendering Editors > Hypershade.

In the hypershade either find the Surface Shader in the list or type it in the search bar to bring it up. Click on the surface shader to create the shader.

In the Out Color set the color desired. Do this for each different item in your scene. It would be best to name all your surface shaders so you will be able to keep track of what everything is. 

Sometimes you want a bit more than just a flat color on an object. Again in the Out Color of the Surface Shader, click on the checker icon to the right which will bring up a Create Render Node window. Find the File option and click on it. Then in the Image Name section, browse to where your file is located.

To assign the shaders you can either middle mouse and drag the shader onto the mesh or select the mesh first and then right click on the surface shader which brings up a menu and then drag up to select Assign Material to Selection. I personally prefer the second method due to I know exactly what is being applied where and I don’t accidentally apply it to something else which may tend to happen with the drag and drop method.


Creating the Ambient Occlusion Layer

Since the surface shaders renders everything as flat colors there is no form to anything. Occlusion will help give dimension to everything when we composite it on top.
Occlusion is the shadows created by ambient light and occurs between the objects, such as corner of walls. Maya is able to create occlusion by using mathematical algorithms to calculate occlusion. As occlusion is created through calculations, this will take the longest to render.

To do so, first select all the geometry in your scene and create a new render layer by going to the Render tab of the Channel Box/Layer Editor and pressing the Create New Layer and Assign Selected Objects button, that looks like a blue circle and an orange star on a white plane. This will automatically create a new render layer and put everything selected in it. The button beside it, without the blue ball, just creates an empty render layer. If you press that one you can manually add geometry into it by right clicking on the layer and selecting Add Selected Objects.

Next, right click on the newly created layer and select Attributes.

This should bring up the render layer attributes but Maya likes to give you a random tab at times the first time you do it; if that happens just go back to the render layers and select the attributes selection again. In the renderLayer attributes, click on the Presets button and select the Occlusion option.

This will automatically create a surface shader with an occlusion node attached and assigned to everything in the layer. Either click on the square with the triangle on the right of the Out Color or click on the mib_amb_occlusion1 tab up top to view your occlusion settings. If the occlusion is looking extremely grainy in the render increase the Samples attribute. Increasing the samples will increase the render time so make sure you only raise it if necessary and only as high as it needs to be. Do not arbitrarily start off with something ridiculous such as 50000.

As occlusion is calculated based on object to object, it becomes important that the objects in the scene are clean otherwise you may get some awkward shadows and edges.


Creating a Lighting Layer

This is optional. Going back to the cake reference, this is the sprinkles that you can add on top if you want it. Sometimes you may have a very specific light source that is visible in the scenes and you want it to cast a strong light.

Again, create a new render layer. We will be using the rendered image to be multiplied on top of the diffuse and occlusion composite thus we want everything to start off as gray. Right click on the render layer created and select Overrides > Create New Material Override > Lambert.

Now place lights where you want them. As this layer uses the very basic lambert material and just a few lights to define certain areas, this will render decently fast also. The first six yellow icons are the lights.

Spotlight
As it sounds, this light acts like a spotlight. It emits light from a single point and emanates out in a cone shape. The Cone Angle is how wide the spotlight is and the Penumbra Angle will modify the falloff edge of the light.
With a shade on the ceiling light, it would be nice to have volumetric lighting. To do so, under the Light Effects there is a Light Fog attribute. Click on the checkerbox to the right and a lightFog node will be created.

Point Light
Point lights radiate light in all directions from a single point. Good to use to cast light to fill in areas.
Here I have the Decay Rate set to Quadratic. Decay rate is how far the light can travel before it fades off and quadratic is the mathematical calculation. I want the point light to have a soft fade off instead of having the light travel on infinitely and light everything.
For Shadows you want to use Use Ray Trace Shadows. The Light Radius attribute will determine how soft the shadows are. The shadows may be grainy due to the lack of light rays and thus the Shadow Rays attribute may need to be increased.

Directional Light
Directional lights shoot rays parallel in the same direction. Technically lights all radiate from a single point outward but is good to emulate lights such as the sun where the light source is so far away that the light rays are basically parallel. This light does not matter where it is placed or how large it is, the only important information is the orientation of the light.


Rendering

Before rendering the full shot, it’s good to check how things look first. In the upper right of the toolbar are the render options.

The first button is Open Render View, the second is Render the Current Frame, and the fourth button is Display Render Settings Window. Click on that first button to bring up the renderview window. In the renderview window a few things to do first, set the rendering engine to mental ray in the drop down, in Options > Test Resolution turn the resolution down to something like 50% so that the tests render faster, and then set the camera that you want to render from under Render > Render. The very first button under File is the button you click to begin the render.

Once everything looks good, it’s time to send things off to render! Set your project first so that Maya knows where to save the files. Go to File > Set Project and choose the folder where you want to render to.

If you don’t have a project directory set up, Maya will bring up a dialogue box saying that it can’t find a project definition file. Press the Create Default Workspace option and Maya will automatically create a workspace.mel file in the folder while will generate necessary folders. By default, the rendered images will go into a folder named “images”.

In the render tab of the channel box/layer editor the icons on the left will indicate if the layer will be rendered or not. If the layer has a green checkmark it will be rendered; if the layer has a red X it will not be rendered. Turn on the layers you want to render.
Click on the Display Render Settings Window to bring up the render settings. Set the Render Using dropdown to Mental Ray. Set the File Output to PNG. Set Frame/Animation Ext to name.#.ext. Set the Frame Range to the frame range of your animation. Set the Renderable Camera. Set the Image Size. Everything else should be fine as it is on default.

To batch render, in the Rendering menu set, go to Render > Batch Render. This will take awhile, particularly with the occlusion layer so take a break and socialize with some people, have some coffee, go exercise, and/or have some ice cream.


Compositing

We’ll go to After Effects for compositing as it is more widely known and accessible to people. Import in the diffuse renders and the occlusion renders. Create a new composition quickly by dragging the diffuse and occlusion down into the timeline. Make sure the occlusion is on top of the diffuse. If you do not see a mode option, at the bottom there is a Toggle Switches / Modes option to make the modes visible. On the occlusion layer, set the mode to Multiply.

Done. You know have dimension and form and some simple shadows.

To get the light layer into the composite, do the same by placing it on top and set the mode to multiply.