BACK TO TEACHING HOMEPAGE

BACK TO COURSE HOMEPAGE

   
     

MAA 3312: Advanced Texturing and Lighting

In this course the students will learn to apply traditional paint concepts, tools, and techniques for use in computer animation. They will develop critical ideas for surface treatment, texture, and lighting and demonstrate the layering of light in space to create mood, emotion and theme.
Furthermore, they will demonstrate an understanding of global illumination, final gather, Radiosity, and HDRI. Finally, upon completion they will be able to critically understand how light affects a surfaces’ color based on material: Diffusion, Gloss, Specularity, Reflectivity, Translucence, and Ambience.

 
     
JUMP TO A SPECIFIC WEEK:

 

Week 7: Spliting up your render into Passes-

In Maya 2009, the way this process is handled has dramatically changed. If you are using a previous version of Maya, please visit the tutorial located at this link.

Purpose:
When working with rendering out files, up until this point you are probably used to just hitting the button in the render window or doing a batch render, and accepting whatever image(s) come out. While this can sometimes produce sufficient results, it is by no means the most efficient way to control your scene output. By seperating your Scene into Passes (different than Render Layers which are an older form of this techinique), you can achieve specific tweaks without having to re-render your whole scene. For instance, the standard render is refered to as a Beauty pass, but it, itself is actually comprised of several other parts that get "composited" at render time. See the diagram below:

What happens is that diffuse (Which is "direct irradiance" plus "material color") gets mixed with specular highlights. These become the color pass, that when mixed with cast shadows, equals the beauty pass that we are used to seeing. While this is normally where we pick up the process, we can take these individual elements, separate them out, and tweak them individually in post (which is what we will do in a few momments). However, we can add even more information into this flow chart to create an even more dynamic render. Below is an image representing a few more of the effects that we can add into our render to increase quality:


The great part of Render Passes is that they aren't actually seperate renders. Since they are all part of the final image, we don't have to render out multiple times (as long as they are on the same layer, .... more on layers in a momment). These Passes are able to render out all at once because they are really just a part of Mental Ray's Frame Buffer System. Sometimes you will hear "Passes" and "Buffers" used interchangably as a result.

For this demo, we are going to create the following passes from our Master Layer:

-Diffuse
-Specular
-Indirect Illumination
(won't work automatically)
-Direct Irradiance

-Ambient Occlusion (also won't work automatically)


Sometimes we need to create additional effects that require us to assign different shaders to the same models. For this, we can use different layers, each with their own passes. While this WILL require us to render multiple times, they can be used to great effect.

Using additional Layers, (where we will be overriding and changing shaders), we will create the passes as well:
-Reflections for the table
-Seperate Flames for Glow

For some of our Passes, we will also have to examine contribution maps and hold-outs. These establish which meshes or lights actually show up in a render. For the following Passes, it is going to be necessary to establish seperate contribution maps:
-Ambient Occlusion (seen above)
-Indirect Illumination (seen above)

-Key Light
-Fill Light
-Accent Lights (the three lighting passes will be linked to each light, allowing us great control over the tone and color of each light in post)

 

Demo: Step by Step-
1.
open the file: stilllifedemo_2009.ma, in it you will find this scene, a table with several objects on it, 4 lights, and a camera:


2. Next up, we are going to set the project, edit the directories and reload the file textures. There are two texture files (one for each of the cards) that need to be reloaded, and setting the project is crucial to making sure that they render properly. When outputting our passes, it is crucial that they get rendered into the correct directory as well.
A. Go to File-->Project-->Set

B. Choose the Week 7 folder

C. Go to File-->Project-->Edit Current

D. Set your directories, scenes for "Scenes", images for "Images", and textures for "Textures". Your model is saved in the scenes folder. The card's textures are saved in the textures folder, and the your passes will be output into the images folder.


E. Go to Rendering-->Render-->Batch Render (NOTE: You CAN NOT use the Render Window with Render passes, you must Batch Render)

F. You will see the status line come to life telling your percentage complete

G. When the render reaches 100% then finshes, go to your images directory, and you will see a file called stilllife.tif. That is your Master Beauty pass.





3. Lets open up that render. It should look like this:

Pretty bland for a final render. Using render passes, lets see if we can spice it up. We will keep this image however to compare it with later on.

Next, lets make our first passes. First, so that they name correctly at the time of the render, we are going to set up a dynamic name string in the render settings window.

 

 



4. Next, open up the Passes tab in the Render Settings window (make sure that Mental Ray is set as your renderer or you won't see this tab)

Click the Icon to Create a New Render Pass, just the right of the "Scene Passes" window.



From the list of options, select the following 6 passes and hit

 

 



5. Next, we need to Associate these passes which have been created for the scene, with the current Render Layer. For that we need to pause and talk a little about Layers versus Passes.

Render Layers are just like display layers in many ways. We can add objects to them, and turn them on and off. However, instead of being just visibilty selectors, they can have shader and render overrides. For example, imagine you had a scene with just a basketball, a light and a wood floor (court). In your master layer you could have a ball that looks like a ball, a light which is on and cast shadows, and a court that looks like wood, just like you see in image A:


In image B, we can make a new layer and provide a shader override (just in this layer) for the ball. This image demonstrates the equivalent of applying a white Surface Shader to the sphere, which previously might have been a Blinn with a texture attached. If we go back to the master layer and render, the image will still look like image A, but if we are in layer B at the time of render, then the ball will be all white.

In image C we see the effect of a render settings override. Here I could turn off cast shadows (by disabling it in the light, or in the render settings window... either way would work). Only when I am in this render layer will my objects render without shadows.

Render Passes are the list of elements that we are going to render in each layer. In the master layer for the basketball image above, we could separate out the diffuse, the specular, the shadows, etc... into individual renders, which is what we are about to do with our still life. We will use Render Layers near the end of this process to render out images that need these specific overrides and cannot be achieved with Render Layers alone (hint, Table Reflections will need a shader override and Indirect Illumination is going to need a render settings override.... you'll see in a minute!!!!)

---Make sure in the Channel Box/Layers Menu that you are open to the Render Layers section and that the Master Layer is active:

---Click the button to Associate these Scene Passes with the current layer. You will notice that a pass can only be associated with one layer (or more specifically, one contribution map in one layer) at a time. If I need to render out diffuse passes for two different layers, I will need to create two different diffuse passes. We will look at a system for setting names to tell these apart when we get to it a few steps down the road.


Now Batch Render again. Each of the new associated passes will be rendered, named dynamically, and as well, a new MasterBeauty pass is created with all the effects put together. This should look just like the stilllife.tif that we rendered first. Remarkably, rendering out all 7 of these new images takes EXACTLY the same amount of time as rendering just one.



However, not all of these images turned out correctly.

From here, we will create an working Indirect Illumination Pass and then Ambient Occlusion Pass before we break and move on to examine more specialized passes like linking single lights and creating reflections only.
However, while we are still on this layer, lets examine one more cool pass we can add.
If I associate to my render pass list, check out what I get as a render from my camera:
a full-force normal map! Not usefull for this demo, but..... I'm sure you can think of some uses for it!!!!
Try experimenting around with some of the other passes, they can produce interesting and unique results that you may find useful on your own projects.

Now... moving on. Since we are going to use the Indirect Illumination Pass and the Ambient Occlusion Pass on different layers, lets remove their association from the Master Layer for now.

 

 

 

 



6. Indirect Illumination Render Layer and Pass:

First step here, select everything in the viewport (lights, geometry, and cameras), then in the Render Layers window, click the icon shown (Create New Render Layer from Select Objects). This is what creates that new "layer1" you see below.

Then, lets rename this layer:

Next, we need to associate the indirect illumination pass with this new layer:


Now you may be asking, "Why did we make a new layer only to re-assign the same darn thing????"

Well, In this new layer we can open up the Features tab in the Mental Ray Render Settings.

Right Click on "Final Gathering" and choose "Create Layer Override".


Once the words are Orange colored, you have succeeded in creating the override. Click the check box to make sure the override renders.


Hit batch render and a new folder will appear in your images directory. This will be named after your Render Layer. Inside will be a new MasterBeauty for that layer, as well as the associated pass.


This indirect illumination pass is meant to show bounced light and color only (which Final Gather, Global Illumination, and Irradiance Particles all do). This is now a correct looking pass (as opposed to all black like we saw before):

 

 

 


7. Ambient Occlusion Pass:

Now on to the Ambient Occlusion (AO) pass. AO is meant to simulate where light bounces do not reach, darkening areas between objects, as we have already examined in this course. It calculates indirect illumination only, so as a result, we must include only the objects and not the lights when rendering this pass. There are two methods that can be used to Create an AO pass. While we can use the newer "pass system", I prefer to use the older "layer based system with shader overrides" as it creates an easier to control setup.

Lets make a new render layer as before and rename it AO. At the top of the attribute editor, under the Presets button, select Occlusion (as seen below left). This will create a new surface shader texture as a material overide, assigning it to all objects in the scene that are in that layer only (see below right).

The out color that shader has been mapped to an ambient occlusion mental ray texture node automatically. Alter its settins so that the quality is bosted as (as seen in the image below left). Re-render from camera 1 (see below right). We have a problem here. The glass and flames would not occlude light, they are transparent. To stencil these out of the scene, we must make some alterations.

First, lets return to the the AO layer attributes and remove the shader overide by breaking the connection as seen in this image:

The Use Background Material:

Next, we will open the hypershade, chose that surface shader, and manually apply it to all objects visible in the AO layer.
To stencil out the glass and flames, we will create and apply a "use background." Create one now and trn off it's reflectivity attributes as seen below. Apply this to the vase and the two flames.

re-render. We now have a perfect AO pass. Save this as AO.tiff.

 

 

If I just render out as it is now, a new folder will be created with these images. If you want to avoid that, we can add a new dynamic name:

And momments later after you hit batch render, here is the rendered image, with a new dynamic name. This can be helpful when you have multiple passes coming from the same layer.

 

 

 


8. Table Reflections Render Layer and Pass (with contribution maps):

A contribution map is a way to specify elements which need to render but display elements that are not rendering.... at the same time.

 

"Yeah, that makes no sense" you probably just thought to yourself.

 

Well here's the deal. If we want to make the table have a separate reflections pass, we just want the table to show up. But, we want the elements that are on the table to show up reflected IN the table, and their silhouettes to also cut out the table that they sit on top of. These other elements (the candles, bowl, cards, etc...) they are called Hold Outs. A contribution map for the table, makes all other elements on that layer holdouts. Making a little more sense now?

First up, we need to make another new layer. Select all of the objects AND THE LIGHTS, and make a new Layer from the selected objects. Call this one Reflections

To get the table super shinny so that we can add reflections to the final composite, lets make a new blinn with the following settings,
then assign it to JUST THE TABLE:

Lets make a new contribution map for just the table:

Select THE TABLE ITSELF, but not any of the other objects. Then right click on the Reflections Layer in the Render Layers menu and choose Pass Contribution Maps--> Create Pass Contribution Map and Add Selected:

Then, rename the contribution map something appropriate by right clicking and choosing Rename:

And then create and associate a pass with it, prefixed so that we know it is the table_reflection render

Again, lets dissable the other layers while rendering out to save time.


Hit Batch Render: and you have a succesfull reflections pass, a process that used to be MUCH harder in Maya's old system:

 

 

 

 


9. Flame glow Render Layer and Pass:

Next up, I want one additional pass to help me manually create some glow for the candle flames when I do the composite. For this I will select just the flames, and add them to their own new render layer, making sure that all other layers are temporarily disabled.



After the batch render, you will have an alpha channeled image (i know, the flames are hard to see, but they are there inside that circle, I promise):


 

 


10. Key, Fill, and Accent Render Layer and Passes (with contribution maps):

While the direct illumination pass that we created back at the start of this process really isn't usefull for all that much, if we take it and break it up so that each light has it's own direct illumination pass, we can arbitrarily re-color the lights in post. That will offer a huge benefit to us as artist to spice up our images.

First, select all of the objects and lights, and create a new lighting layer. This could be done on the master layer (and would be handled that way for a production), but for this demonstration it will simply be easier to set this up on it's own layer.



Select all of the objects and just the key light. Create a new contribution map and call it "key". Repeat the process for the fill light, and again for the accent lights, putting both accent point lights into the one accent map.

Now it's time to create 3 direct irradiance passes. We will need one pass for EACH contribution map. So that we can tell them apart, use a pass suffix for each map. That means, create "_accent", "_key", and "_fill".


Then its time to associate the passes with with contribution maps, just as we have done several times before on this project:

 

When we batch render, we should get the following images which will allow us to re-color each light:


 


 

 


11. Compositing with Photoshop:

We are now going to composite these layers in Photoshop. Open the original MasterBeauty image followed by:
AO, accent_lighting, key_lighting, fill_lighting, indirect, table_reflection, specular, flames.

Drag each image ontop of the beauty image in the document in this order using the suggested blend modes:




We are almost there. It is now up to use as a compositing artist to edit each of these layers to your liking. Here is what I have come up with using a combination of hue/saturation adjustments, gaussian blurs, levels, by re-arranging the order of the layers, and more:


and thats it! Lets see what you can come up with by editing your layers:


 

Project 2.5: Rendering a Still Life in Passes

You will be provded with fully textured version of this scene. It will be your job to break it up into render passes as seen in the demonstration above, and composite them in after effects or photoshop. You will modify the render to your liking (see examples below) and turn in images for each of the passes, plus the final composite for week 8.

Image by Ravi Giraputra

Image by Jessica Brunson

Image by Kristine Nakamoto

Image by Lauren Conca

Image by Matt McGee

Image by Alan Vincenzi

BACK TO TOP

JUMP TO A SPECIFIC WEEK: