There are two other elements to add to the lemming: the hair and eyes. These passes were rendered separately for several reasons that are not important here. These elements don’t have passes—they only have a beauty pass. The hair will simply be added to the rest of the tree. However, the eyes need to be cut so they fit the eye sockets, so you will use the ID pass for that before adding them to the rest of the tree.
1 . With nothing selected, create another Dot by pressing . (period) on your keyboard.
2 . Connect the new Dot’s input to the bottom right Dot, the one that ShuffleCopy1 is connected to.
3 . Place the new Dot underneath that Dot to create a new branch to start with.
4 . Copy Shuffle6 (ShdSelf pass) and paste it after the new Dot.
5 . Change Shuffle7’s In 1 property’s pull-down menu to Hair.
6 . Make sure all four channels are shuffled from the left—Hair input. This means you need to check on the alpha channel box on the left, In1, side (FigUrE 3.46).
FIGURE 3 .45 The Specular pass branch.
FIGURE 3 .46 Changing the Shuffle node so that the alpha is copied as well.
7 . Select Shuffle7 and press M on your keyboard to attach a Merge node to it.
8 . Connect Merge6’s B input to the output of Premult1 and place Merge6 under Premult1, and then view it in the Viewer (FigUrE 3.47).
FIGURE 3 .47 The hair elements should be added like this to the tree.
9 . Go to frame 70 and view Merge6.
The hair element has been added. However, there is a little problem. The hair and the head are perfectly cut so they fit each other. This means the hair has been cut in such a way that the part that should be behind the head is not there anymore. When doing a normal over operation in the Merge, this actually results in a little error due to the math involved. In these cases, an over operation isn’t enough. Let’s see what this means.
10 . Switch to the alpha channel by hovering the mouse pointer in the Viewer and pressing the A key.
Notice the thin black line where the hair and the head come together. You can fix this with a different over operation designed especially for these kinds of situations (FigUrE 3.48).
11 . In Merge6’s Properties panel, change the operation from over to Disjoint-over.
Look at the place where the head and hair come together. You can see the line has disappeared and the matte looks correct now (FigUrE 3.49).
FIGURE 3 .48 This thin gray line in the matte shouldn’t be there.
FIGURE 3 .49 The Disjoint-over operation saves the day.
12 . Switch back to view the RGB channels by hovering the mouse pointer in the Viewer and pressing the A key.
Now for the eyes. Let’s start by shuffling them into the RGBA channel set.
13 . Copy Shuffle7 and the Dot to the right of it by selecting them and pressing Ctrl/
Cmd-C.
14 . Select the Dot to the right of Shuffle7 and press Ctrl/Cmd-Shift-V to branch-paste another copy. (To branch-paste, hold the Shift key to produce a branch rather than an insert operation.)
15 . Change Shuffle8’s In 1 property’s pull-down menu to Eyes, and view Shuffle8 in the Viewer (FigUrE 3.50).
These are the lemming’s eyes. The whole orb. It’s not very often that one gets to see the whole of a lemming’s eyes. That’s because normally they are held inside eye sockets, which is exactly what you need to do now. Let’s find the matte for that.
There is one more thing to do first, though. If you look carefully, you can see that the eyes are unpremultiplied. This is apparent due to the jagged edge you can see in Figure 3.50, which doesn’t appear in the alpha channel. You need to make them premultiplied before you can put them over the rest of the tree.
16 . Insert a Premult node after Shuffle8 (FigUrE 3.51).
FIGURE 3 .50 The lemming’s eyes—the whole thing.
FIGURE 3 .51 The edge of the eyes is no longer as jagged.
With that fixed, you can move on to finding your eye socket matte.
17 . Make sure you are viewing Premult2.
The eye socket is still in this stream. The only thing you did to this stream, as far as channel manipulation goes, is move the eye channels to the RGBA. Everything else remains untouched.
18 . In the Viewer, change the Channel Set pull-down menu from RGBA to ID.
You can see here that the eye socket matte is the green part of the ID pass. This doesn’t mean you need to key this out. The green part means the green channel.
Let’s have a look at it.
19 . In the Viewer, press the G key to display the green channel.
You can clearly see that the green channel is a black-and-white image, just like an alpha channel. Holding different mattes in different channels is a smart and economi-cal way of doing things (FigUrE 3.52).
FIGURE 3 .52 Setting up the Viewer to display only the iD channel set’s green channel shows a matte for the eye sockets.
So, all you have to do is place the eyes inside the ID channel set’s green channel. You will do this down the pipe, as explained earlier in this chapter, by connecting a Merge node’s A and B input to the same node and changing the channel set to merge inside the Merge Properties panel.
20 . Switch back to viewing the RGBA channel set and press G again to view the RGB channels.
21 . Insert a Merge node after Premult2.
22 . Connect Merge7’s B input to Premult2.
23 . Change Merge7’s operation property from over to Mask.
The mask operation will mask input B inside of the alpha channel of input A. This means you have to tell Merge7 which channel to pick for channel A’s alpha channel.
24 . Change A Channel’s last property from rgba.alpha to id.green using the pull-down menu.
FigUrE 3.53 shows Merge7’s setup. The point to take to heart here is that you don’t have to use a Shuffle node every time you want to use a channel that’s not in the RGBA channel set. You can simply access it from the stream—down the pipe, in other words. Most of the time it’s not as convenient. But in this case it was.
FIGURE 3 .53 Using a Merge node to pull information from other channel sets.
Let’s continue compositing the eyes.
25 . Insert another Merge node after Merge7 and connect its B input to Merge6.
The lemming can see again (FigUrE 3.54). Good for him! You have been working in isolation so far and haven’t seen how the lemming looks over the background. Guess what’s next?
FIGURE 3 .54 The eyes are now added to the lemming.
pLAciNg cgi oVeR LiVe bAckgRouND
Now you’re going to composite the lemming tree over the background. only after you do that will you be able to really gauge your composite and use your complex CGI tree to its full potential. You will then be able to make the lemming feel more like it’s in the scene.
Treat this whole tree as a single element—the foreground.
1 . Click Merge8 (the very last Merge) and insert another Merge node after it.
2 . Bring Read2 (the background) down to the area at the bottom of the tree and con-nect Merge9’s B input to it.
3 . Make sure you are viewing Merge9 to see the whole tree’s output.
The lemming doesn’t look like he’s standing on the ground (FigUrE 3.55). one of the main reasons he appears to be floating is that the composite is missing the contact shadow elements. The drop shadow and the ambient occlusion need to be added.
At the beginning of this chapter, you cropped the image according to the auto crop calculation of CurveTool1. This calculation was performed on the RGBA channel set and so it didn’t include the shadow element, which sits outside the lemming area (it’s dropping on the floor, so that’s a given). If you call up the shadow or ambient occlu-sion elements from the bottom point in the stream, you’ll be getting a cropped ver-sion of those elements. Therefore you have to go back up to a place before the crop, and pick those passes from there.
4 . At the top of the tree, with nothing selected, create a Dot and connect its input to Read1. Drag it to the right until it passes the rest of the tree.
5 . Select the new Dot and insert another Dot, connected to it. Drag the new Dot down until it passes the rest of the tree without passing Read2 (FigUrE 3.56).
6 . Select the new Dot and insert a Merge node after it by pressing M.
7 . Connect Merge10’s B input to the final output of your comp (Merge9) and view Merge10 in the Viewer.
Use this Merge node to combine the Ambient Occlusion pass (here simply called Ao) with the whole comp (the pass affects both the lemming and the floor). Because the Ao pass is wholly white, except for the dark parts representing the shadows, you’ll use the Multiply operation in the Merge node.
FIGURE 3 .55 The lemming over the background.
FIGURE 3 .56 Using Dots to keep the tree organized.
8 . In Merge10’s Properties panel, change the A Channel property’s drop-down menu from RGBA to Ao.
9 . Change Merge10’s operation from over to Multiply (FigUrE 3.57).
FIGURE 3 .57 This is where Merge10 should be.
Here again you saved a Shuffle operation and did the shuffling inside the Merge.
You will combine the drop shadow pass in a slightly different way in the next section.