• No results found

This time around, you will make branches for each pass as you go. This gives you instant access to every pass in your tree, which is very handy, but it also creates a very big tree. To not lose your bearings, you need to be very careful how you build the tree and where you place nodes.

one of the interface elements you’re going to use a lot is the Dot. The Dot is a circular icon that enables you to change the course of a pipe, making for a more organized tree.

1 . Select Crop1 and press . (period) on your keyboard.

2 . Select the newly created Dot, and then insert a Shuffle node from the Channel toolbox.

3 . Make sure you are viewing Shuffle1 in the Viewer, and then change the In 1 prop-erty to Lgt.

4 . From the In 2 property’s drop-down menu pick RGBA instead of None.

5 . Check the In 2 alpha to alpha check box to direct the alpha from input 2 to the alpha output (FigUrE 3.24).

FIGURE 3 .24 Using Shuffle you can mix channels from multiple channel sets.

What you did here was take the R, G, B from the Lgt channel set and the alpha from the original RGBA channel set, and output these four channels into a new RGBA. You did this so that your Lgt pass, which doesn’t come with an alpha channel, will have the correct alpha channel.

Because you will do this a lot, it is a nice reminder if you name your Shuffle1 node according to the name of the input channel set. You can simply change the name of the node, but that is less advised. Instead, you have a label for each node, accessed via the Node tab in each node’s Properties panel.

6 . Switch to the Node tab in Shuffle1’s Properties panel.

Whatever you type in the Label field will display on the node in the DAG.

7 . In the Label field enter lgt.

You can see that lgt displays under Shuffle1 (FigUrE 3.25).

You can simply type this for every pass. However, you can also use a little scripting to automate this process.

8 . In the Label property’s field replace lgt with [knob in].

Breaking down what you typed, the brackets mean you are writing a TCL script. The word knob means you are looking for a knob (knob = property). The word in is the name of the knob (the pulldown knob, in this case).

FIGURE 3 .25 Whatever you type in the label box displays on the node in

The result of this script shows the value of the property called “in.” Therefore, you will see that the node in the DAG still displays as lgt.

9 . To make this a little more readable, add a space and the word pass after the script, so it reads like this: [knob in] pass (FigUrE 3.26).

The word pass is just a word—because it’s outside the TCL brackets it will simply display as the word (it’s not part of the script). The node in the DAG now shows the label lgt pass (FigUrE 3.27).

Now, just by looking at the Node Graph, you can see that this is your Lgt pass branch.

You will have a similar setup for your other passes.

Because the passes came in from the 3D software as premultiplied, and by multiply-ing and addmultiply-ing passes together you are actually domultiply-ing color correction operations, you need to unpremultiply each of the passes before doing almost anything else with them. That’s why you made sure you have an alpha channel for the pass by shuffling the rgba.alpha channel to the new rgba.alpha channel. The node Unpremult negates any premultiplication.

10 . Insert an Unpremult node from the Merge toolbox after Shuffle1.

Use the Lgt pass as your background for all the other passes. It will serve as the trunk of your tree. The rest of the passes will come in from the right and connect them-selves to the trunk of the tree. To do the next pass, you’ll first create another Dot, to keep the DAG organized.

11 . While nothing is selected, create a Dot by pressing the . (period) key.

12 .Connect the newly created Dot’s input to the previous Dot.

13 .Drag the Dot to the right to create some space (FigUrE 3.28).

FIGURE 3 .26 The label should display this text.

FIGURE 3 .27 Shuffle1 in the DAg will display the new label with the TCL script resolved.

FIGURE 3 .28 Keeping a node organized with Dots.

14 . Hold down Ctrl/Cmd and drag the yellow Dot in the middle of the pipe between the two Dots to create a third Dot. Drag it to the right and up so it forms a right angle between the two Dots (FigUrE 3.29).

Now you will create the content for this new branch by copying everything, changing a few properties, and rearranging a few nodes.

15 . Select both Shuffle1 and Unpremult1 and press Ctrl/Cmd-C to copy them.

16 . Select the bottom right Dot and press Ctrl/Cmd-V.

17 . Arrange Shuffle2 and Unpremult2 so that Shuffle2 is to the left of the Dot and Unpremult2 is to the left of Shuffle2 (FigUrE 3.30).

FIGURE 3 .29 it’s easy to snap elements to right angles in the DAg.

FIGURE 3 .30 After arranging the nodes, the tree should look like this.

18 . Double-click Shuffle2 to display its Properties panel and choose Col from the drop-down menu (FigUrE 3.31).

Notice how the label changed to reflect this in the DAG, thanks to our TCL script (FigUrE 3.32).

FIGURE 3 .31 Picking another pass by choosing Col from the drop-down menu in the Shuffle node.

FIGURE 3 .32 The TCL script made the label change automatically.

19 . Select Unpremult2 and press M on the keyboard.

20 . Connect Merge1’s B input to Unpremult1.

21 . Make sure Merge1’s Properties panel is open and change the operation prop-erty’s drop-down menu from over to Multiply.

22 . Move Merge1 so it’s directly underneath Unpremult1 and in a straight line from Unpremult2 (FigUrE 3.33).

FIGURE 3 .33 Merge1 should be placed like so.

The light multiplied by the unshaded texture essentially creates what’s commonly called the diffuse pass (FigUrE 3.34).

Now for the next pass—the Inc pass (short for Incidence pass).

23 . Select the horizontal line of nodes that starts with the Dot and ends with Merge1;

press Ctrl/Cmd-C to copy it (it’s highlighted in Figure 3.34).

24 . Select the Dot at the bottom right of the tree and press Ctrl/Cmd-Shift-V to paste.

25 . Drag the newly pasted nodes down a little and connect Merge2’s B input to Merge1.

26 . Double-click Shuffle3. Click Shuffle3’s In property’s drop-down menu and choose Inc.

27 . Double-click Merge2. From the operation property’s drop-down menu choose Plus (plus, meaning: to add).

You have just added the Inc pass to the composite. You’ll need to color correct it, but first you’ll finish adding the rest of the passes (FigUrE 3.35).

FIGURE 3 .34 The Col pass added. The highlighted line will be duplicated for each additional pass.

Note You held Shift to branch a copy of the above group of nodes rather than insert.

You’ll repeat this process three more times to connect the Indirect (Ind), Specular (Spc), and ShdSelf (Self Shadow) passes. You will copy the same line and branch, and then paste it back into the last bottom right Dot, connecting the Merge node and changing the Shuffle node, and sometimes the Merge node’s operation property.

28 . Repeat the process. Select the last line starting from the bottom right Dot and ending in the bottommost Merge node, copy, and then branch-paste to the bot-tom right Dot. Connect the new Merge’s B input to the previous Merge node.

29 . This time, change the Shuffle node’s In property to Ind. Don’t change the Merge node’s operation property.

30 . Repeat the process, this time for the Spc pass.

31 . Go through the process a third time. Choose ShdSelf for the Shuffle node’s In property, and change the Merge operation to Minus.

32 . Make sure you are viewing the output of the last Merge node, which should be called Merge5 (FigUrE 3.36).

Shadow is a subtractive pass. It is light that needs to be taken away, so it needs to be subtracted from the rest of the tree. Using the Minus operation sounds like the right thing to do—however, judging by the resulting image, something isn’t right. It’s all black.

FIGURE 3 .35 With a few changes, each of these lines will repre-sent a pass.

The way the Merge node works is A then B. For the over operation, normally this means A over B. For the Plus operation, this doesn’t matter as 1+3 is the same as 3+1.

For the Minus operation this means A minus B, which will work on some occasions, but in this case you need to subtract the shadow from the composite, not the other way around. You need B minus A. one way to do this is to switch inputs (the hot key Shift-X will take care of that and is worth remembering), but there’s an alternative. The operation From does exactly what Minus does, only the other way around. It sub-tracts A from B.

33 . Change the same Merge operation from Minus to From.

Using these passes, you completed the basic building of the lemming’s beauty pass.

Your tree should look like FigUrE 3.37.

FIGURE 3 .36 The bottom Merge node’s Operation property is set to Minus.

FIGURE 3 .37 The tree at the end of the beauty pass build.