![]()
![]()
![]()
This topic came up recently on CGTalk and I also covered it in the compositing course I taught at the Queensland College of Art. I do have a video screencast as well that I did that I will try and dig up as I think it is on my main PC which is in pieces at the moment.
Inspiring, no?
The question was: “How do I use ID passes (or RGB mattes) in my compositing?”
I guess the first place to start is to remember that compositing is all about colour channels. Pretty much the first thing you do when you get your plates is check the colour channels (red, green and blue) to see what kind of information is there. When you are working with straight CG images, it is a bit different. You will often have various black and white mattes rendered out for you to isolate various objects in a scene.
As we (hopefully) know by now, mattes are essentially greyscale (grayscale for you North American types) images that affect an area of your based on the intensity of the pixel colour value, usually with pure white affecting the change the most and black affecting the least. These can be things like images, patterns, keys or rotoshapes.
The good thing about CG is you can output just about anything relating to your render. Diffuse, specular, shadow, reflection, refraction, velocity, ID’s . . . the list is long. The most basic pass you will get will be something like a foreground character that has it’s alpha channel already pre-multiplied (RGBA). That is, you could stick it straight over a background as it already has an alpha channel.
Often, however, you will be given a pass that has an object, or several objects, shaded pure red, pure green and pure blue. Why? Well, we know that we can use this colour information to mask our objects. By using or reordering/shuffling our channels, we can isolate a particular object using our RGB.
Let’s look at an example scene. Behold the power of Autodesk Maya. I fully realise that this scene is beyond average and should not be used as an example of my actual 3D skills. I am trying to make this as simple as possible. No, really!

Basic colour pass
Now, our very nice lighting and rendering department has given us not one, but two extra passes to help finesse our scene. The first is a straight RGB matte pass:

RGB matte pass
The second pass is an RGB lighting pass. This is essentially our scene with 2 or 3 lights (key, fill and rim) and a basic shader. Again, the lights are pure colours:

RGB lighting pass. Only red and green in this example.
So how do we use these passes? I am going to use Shake and the reorder node for clarity here. In Shake, and other compositing apps, you can often just choose in the node or effect which channel you want to use to affect that node or effect. I am a big fan of clarity though, and as such, I prefer to use the Reorder node so I can instantly see which channel I am using:
So, as you can see, I have split off three Reorder nodes from the tips_RGB_matte image:
RED

tips_RGB_matte RED channel
GREEN

tips_RGB_matte GREEN channel
BLUE

tips_RGB_matte BLUE channel
And here are the reordered red and green channels of our tips_RGB_lights pass:
RED

tips_RGB_lights RED channel
GREEN

tips_RGB_lights
ALRIGHTY!!!!! We are pretty much ready now. As we can see, now we have a bunch of nice clean mattes which we can use to modify not only the objects in the scene, but possibly use to relight the scene entirely.
Soooooo, going down my super mega awesome compu-tron 2000 script, we can see that I have brightened the cube, multiplied the sphere by a strong green and added a slightly horrific shade of orange to the cone. Not brilliant but you get the idea.

Brightening the cube

Greening the sphere

Orange cones are good cones
On to the basic relighting, we can use the two lighting channels to change the colour and intensity of our key and fill lights. To change the intensity I expanded the alpha after the reorders (essentially a levels call):

Relighting using the key light (red tinge)

Relighting using fill light (green tinge)
It’s possibly not as clear as day and night in the above shots, but as you can see, with just two extra passes from your 3D application, you suddenly have a lot more options for adjusting the looking of your comp without fussing about.
As always, if you have question, comments or suggestions, let me know below.
Tags: 3D, Compositing, Maya, Shake, Tips & Tricks
you dont need to re-order if you are just using the mattes for a single mask. Just nominate the channel you wish to use as a mask inside the mask parameters of your colour correct nodes.
Yeah, I know. I mentioned that in the CGTalk thread talking about RGP passes, but I must have missed it here. The Reorder was used to visually show the process. Having said that, I tend to use name Reorders in Shake because I hate having to go into a node to find out what channel I am using as a mask. Personal workflow preference I guess!
Thanks for the input Tahl, I actually took your Shake course on FXPHD back in the day and worked with JBot (the dirty Canuck swine!
Thanks heaps Matt. This is the kinda stuff that helps out in terms of learning alot. Ive just been learning all the thorough techniques of 3d passes and the way you explain the types of things that you have discovered in production is more real than most of the stuff you read about.
An idea for another tutorial would be to show the way you go about about importing tracking data into a shake comp.
Hope the star wars exhibition was all that and more!
It looks like this specific technique was used extensively when doing work on animalia too, right?
Absolutely. Initially on Animalia we had *tonnes* of passes but it was just too slow for the turnaround needed on the show. In the end we had a beauty, rim light, RGB, z-depth and sometimes a red/green lighting pass, if we needed specific lighting. We had to do everything with just those passes! We came up with a neat way of using them to do fake depth of field, cutting out the characters, blurring the BG’s and putting them back over the top.
It’s funny, with less passes you were forced to come up with interesting ways to use them to get desired effects.
I suppose this is where you got it all from then, as much of a pain it would have been.. you’re probably thankful now that you had the limited passes to work with. Very interesting!