Creating a Simple Tree


This section walks you through the process of creating a simple tree.

Loading Images

Before creating a process tree, you need to load in some images:

1.

Open Shake.

2.

Go to the Image tab and select the FileIn node.

The File Browser will open up.

3.

Navigate to the Lesson02 folder. You should see five sequences.

4.

Click the Type heading to sort the clips by type.

5.

Select the first file, background.1-60#.iff, and then click Next.

6.

FileIn the remaining four sequences: foreground.1-60#.iff, robot.1-60#.iff, robot_comp.1-60#.iff, and shadow.1-60#.iff.

7.

Close the File Browser when done.

Tip

You can select a file or sequence from the File Browser in one step by double-clicking it.

You now have five nodes in the Node View. They are background, foreground, robot, robot_comp, and shadowall named automatically by Shake. Because the parameters of the last node you created pop into the Parameters workspace automatically, you can see the shadow parameters listed in the bottom-right window.

The first parameter shown is SFileIn, which should list shadow. If you want to rename the node, you can do so here. You can see the parameters of any node by clicking that node's right side, and you can view any node in the Viewer by clicking the node's left side.

8.

If you want to see a fancy glow around your nodes, place your pointer over the Node View and press Control-E.

This is Enhanced Node View mode. When turned on, it draws a bluish glow around nodes that are animated. This includes nodes that are QuickTime movies or multiple-image sequences, nodes containing keyframed parameters, or nodes utilizing expressions that change a parameter's value over time.

Note

Screen shots for this book were taken with Enhanced Node View on.

If you double-click the node, you simultaneously load the node into the active Viewer and list its parameters in the Parameters workspace. If you drag the pointer over the nodes, you see the node name, function type, and image information in the contextual help field at the bottom center of the Shake screen.

9.

Click the left side of the robot_comp node to view the final shot.

You'll need to set the Globals timeRange parameter, but instead of typing it manually, you can use the Auto button to do it for you.

10.

Go to the Globals tab in the Parameters workspace.

11.

To the right of the timeRange parameter, click the Auto button.

The Auto button sets the time range to the length of the longest FileIn node. In this case, the range is set to 160.

12.

Click the Home icon at the bottom-right corner of the interface.

The Time Bar is automatically set to the Globals timeRange.

13.

Now click the Flipbook icon at the bottom of the Viewer to launch a flipbook of your clip with the desired frame range.

14.

Press the > key at any time while the clip is loading to see it play.

You can press the spacebar before the clip is done to stop loading it, and you can resume the load by pressing the spacebar again.

This is the final composite of the effect that you will be building.

The shot is a combination of four computer-generated elements. Your job will be to composite the elements together so that they look like one shot.

15.

Close the flipbook.

Note

Whenever you are done playing a clip, close the flipbook window, because it eats up precious RAM when left open.

If you would like to see the finished commercial with music, you can view a QuickTime version of it, located in the Lesson02 folder.

16.

Minimize Shake by double-clicking its title bar.

17.

Navigate to your Lesson02 folder, double-click the citroen_C4.mov file, and play the clip.

This is really a fun commercial.

18.

Close the QuickTime Player.

19.

Maximize Shake by clicking its icon in the Dock.

Take a look at each of your elements.

20.

Load the background, foreground, robot, and shadow clips into flipbooks and play them.

These are the elements you will be combining to create the composite. The foreground and background will be added together, then the shadow, and finally, the robot.

21.

Close all open flipbooks.

22.

Double-click the robot clip.

23.

Toggle the Channel Viewer from full color to the white dot icon to view the alpha channel.

The robot clip has an alpha channel that you can use to place the robot over the background. Alpha channels are basically a cookie cutter, and they are the heart of compositing. It just goes to show how simple compositing is. In an alpha channel, the white areas represent your foreground, and black areas represent your background in the final composite. Because the robot clip is a computer-generated element, a single click of a button creates and embeds the alpha channel into the clip during the rendering process.

24.

Place your pointer over the Viewer and press the C key to view the RGB channels.

Understanding Thumbnails

If you look at the Node workspace, you might notice the pretty thumbnails. Each of these is a function that you can look at and modify. It just so happens that these are all FileIn functions that read in images.

As you can see from the robot image above, the thumbnail also indicates transparency if there is an accompanying alpha channel.

A bit about the thumbnails:

  • They use frame 1 as the thumbnail image by default.

  • To refresh to the current frame, select the node and press R in the Node View.

  • To see the alpha channel, place the pointer over the thumbnail and press A. To return to RGB color, press C with the pointer over the thumbnail.

  • Any node can have a thumbnailjust select it and press R.

  • To hide thumbnails, select the ones you want to hide and press T. Press T again to see the thumbnails.

  • In the Globals tab, reveal the guiSettings to change the displayThumbnails control. This is the same as pressing T in the Node View.

Here's a nifty trick: Drag the robot node over the background node in the Node workspace.

Shake creates a minicomposite for you. Does this help you composite or change your tree at all? Not at all, but it's pretty cool, isn't it? To do an actual composite, you have to hook up the nodes. So just hold on, why don't ya?

Attaching Nodes

You can insert nodes into a tree in one of six ways:

  • By choosing the node you want from the Tools menu at the top of the screen.

  • By clicking one of the tool tab buttons in the bottom-left window of the Shake screen.

  • By right-clicking any of the tool tab buttons in the bottom-left window of the Shake screen and choosing an insertion method.

  • By right-clicking a tool tab and choosing a node from the pop-up menu.

  • By right-clicking the Node workspace and choosing from the Node menu.

  • By copying and pasting an existing node. Command-C copies, Command-V pastes. You can also perform these functions by right-clicking in the Node workspace.

    Note

    Copy and paste are disabled in the trial version of Shake that comes with this book.

To start compositing, you need to attach a Layer node. By default, nodes are attached to the active node. Now this is important, so pay attention: The active node is the one highlighted in green. You can highlight a clip by clicking it once.

1.

Highlight the foreground clip by clicking it once, and select an Over function in the Layer tab.

The Over node attaches itself to the foreground clip automatically. Shake connects the output of the foreground to the left input of the Over1 node. The Over function places one image over another according to the matte of the foreground image.

2.

Attach the background clip to the Over1 node. To do this, click the output knot (this is the small dot that appears at the bottom of the background node as you move your mouse over it) and drag to the right, or background, input of the Over1 node and release.

Note

The standard practice for layering operations that involve two input images is to connect the foreground to the first (or left) input, and connect the background to the second (or right) input.

3.

Place your pointer over the Viewer and press the F key so that you can see the entire image.

You should now see the background and foreground images composited as one. This composite will serve as the background for the robot.

The next step is to add the robot.

4.

Highlight the robot clip and select another Over from the Layer tab.

5.

Take the output of Over1 and connect it to the right input of Over2.

The color of the robot will need to be adjusted, but you'll do that in a moment.

Setting Resolution

You may have observed that the robot image has a lower resolution than the foreground and background images (960x540 pixels, compared with 1920x1080) and that the resolution of the composite is cropped to the larger size of the foreground and background clips. The resolution is displayed in the Viewer title bar, and in the help field at the bottom of the screen when you hover the pointer over a clip.

Shake allows you to composite images of different resolutions thanks to the clipMode parameter contained in every Layer node. In this case, the Over node defaults to the resolution of the background clip.

1.

Toggle the clipMode back and forth to select the foreground or the background as your output resolution. When you're done, leave the clipMode set to foreground.

2.

Place your pointer over the Viewer and press the F key to make the image larger.

At the lower resolution, the background is clipped to its lower-left corner and would look a lot better if it were resized to fit the resolution of the robot clip.

3.

Highlight Over1 and select a Resize node from the Transform tab.

4.

Double-click the 1920 number field, type 960, and press Return.

5.

Double-click the 1080 number field, type 540, and press Return.

The new size looks much better.

Premultiplication

For the Over node, the most frequently used Layer node, Shake assumes there is an alpha channel to determine the foreground pixels, and that the foreground image is premultiplied by that mask. Most computer-generated elements are premultiplied. This includes the robot element.

Let me define a premultiplied image: It is an image that has its RGB channels multiplied by its alpha channel. Typically, images rendered by 3D software are premultiplied, meaning the transparent areas have black both in the RGB areas and in the same areas of the alpha channel. In a premultiplied image, the value of the RGB channels is never higher than that of the alpha channel.

Scanned elements or other 2D-generated plates require an added alpha channel (also called the matte or mask channel), which is then used to premultiply that image with an optional setting in the Over node. To get that alpha channel, draw it with Shake's QuickPaint or RotoShape node or pull a key with Shake's keying functions. If the alpha channel is provided to you, read it in and then copy it into a foreground image's alpha channel with a SwitchMatte node. Once you premultiply, you can composite. For a more detailed explanation on premultiplication, refer to the Shake documentation.

Saving Your Tree

Before continuing, you should save your tree. Shake saves the tree as a script. A script is a text file that contains all of the information about your tree. The script can be loaded back into Shake for later work and can be rendered either from within the software or from the command line.

Tip

To make your life easier, I have included a completed script not only for this lesson, but for all of them. If you ever get stuck, you can view the finished script in each lesson's folder by using File > Open Script.


Note

Skip this exercise if you are using the trial version of Shake.


To Save your tree:

1.

Select File > Save Script.

2.

Create a new folder in your own home directory to save your scripts and images: Navigate to your home directory, and click the Create New Folder icon at the top right of the File Browser.

3.

When prompted, type Shake_Output for the name of the folder, and then click OK.

4.

Type robot_pt1 for the name of your script and click OK.

Shake automatically adds a .shk extension to the end of your filename when it saves.

Note

If you forget to save the script and exit Shake, you could select File > Recover Script to recall the last autosaved version.

Inserting, Replacing, and Creating Nodes

When you click a tool in the tool tabs, that tool is inserted after the currently selected node (highlighted in green).

1.

Click the robot node so that it turns green, and from the Color tab, select Brightness.

A Brightness1 node is inserted between the robot node and the Over2 node.

Right-clicking any function in the tool tabs will give you five different insertion choices for that particular node: Insert, Branch, Replace, Create, and Insert Multiple.

2.

Right-click the Gamma function in the Color tab and choose Branch.

A new branch of the tree is created for the Gamma1 node off the Brightness1 node.

3.

Right-click the Compress function in the Color tab and choose Replace.

The Gamma1 node is replaced by the Compress1 node.

4.

Right-click Add in the Color tab and choose Create.

A new, unconnected Add1 node is added to the Node workspace.

5.

Drag the Add1 node directly over the connecting line between robot and Brightness1 so that both its knots appear highlighted. You can select which input of a multi-input node to insert by dragging the node to the left or right to highlight the desired input knot.

6.

When you release the mouse button, the node is inserted automatically.

You may have noticed when right-clicking a node in the tool tabs that each node insertion option has associated keyboard shortcuts. The keyboard shortcuts are listed at the end of this lesson for your reference.

Selecting Nodes

There are various ways to select and deselect nodes. Here are some of them:

  • Drag over the robot, Add1, and Brightness1 nodes to select them. If you drag a selection box over any node in the Node View, the node will be selected.

  • Control-drag over the robot and Add1 nodes to deselect them. If you Control-drag over previously selected nodes in the Node View, you deselect them.

  • Press Command-A to select all nodes.

  • Click the background area to deselect all nodes.

    If you right-click in the Node workspace, you'll see quite a few other tree selection options along with their keyboard shortcuts.

Detaching and Deleting Nodes

To delete a connection, position the pointer over the connecting line until it turns red or yellow, and press Delete on your keyboard. (On Macintosh laptops, press fn-Delete.)

1.

Place the pointer over the connecting line between Brightness1 and Compress1, and press the Delete key. Alternatively, click a node and drag violently back and forth, like a squirrel shaking a nut, until the node separates.

To delete nodes, select them and press the Delete key.

2.

Click the Compress1 node and press the Delete key.

3.

Click the Brightness1 node and press the Delete key.

Organizing Nodes

For those of you who like to keep your Node workspace as tidy as your closets, Shake provides several node-organization features:

  • Grab active nodes to drag them around.

  • To organize all nodes, deselect them all and press L, for layout.

  • To organize specific nodes, select the nodes and press L.

Editing Parameters

Before continuing, make sure your tree looks like the following image:

The composite is almost done, but the color of the robot is not quite matched. The Add function, which adds color to the R, G, and B channels, is going to take care of this for you. It's a nifty way to modify the color of an image.

1.

Click the left side of the Over2 node to see it in the Viewer.

2.

Click the right side of the Add1 node to see its parameters in the Parameters workspace.

This configuration will let you view one node while editing the parameters of another. Without the capability to separately view and edit nodes, it would be like blowing down a West Texas country road at midnight. That's bad, real bad. The Add1 node has red, green, blue, and alpha channel parameters.

3.

Click the plus sign (+) to the left of the Color parameter.

A + next to a parameter means that more parameters can be revealed.

In this case, a series of radio buttons is revealed.

4.

Click the + next to the R radio button.

The opening of nested parameters reminds me of one of those annoying gifts where smaller and smaller boxes are inside each other.

5.

Click the number field for Red, type .20, and press Return.

What the #$%? The whole image brightened up, not just the robot. That's because you have just broken a most important rule: Don't color-correct a premultiplied image. If you do, you may have problems with edges or with unwanted changes to global levels. Many people see this type of error and assume it is a mask problem, so they make the mask smaller in an attempt to get rid of the edge. Heathens! Happily, these problems are easily solved through the proper handling of premultiplied images.

To solve this problem, you must first add an MDiv (matte divide) node from the Color tab to divide the robot's RGB channels by its alpha channel. This undoes the premultiplication. Second, you must activate the preMultiply parameter in the Over node. Then you can color-correct to your heart's content.

6.

Highlight the robot node and select an MDiv node from the Color tab.

7.

Click the right side of the Over1 node to edit its parameters and activate preMultiply.

Now, only the robot is color-corrected.

8.

Click the right side of the Add1 node and reopen the Color submenus by repeating steps 3 and 4.

When you entered .20 in the Red parameter, the Green and Blue values were automatically set to the same value. Shake does some parameter linking for you within various nodes; this is signified by the + next to a parameter.

9.

Click the + next to Green.

It says Red, which means that the Green parameter is linked to Red. Whenever Red is adjusted, Green will be set to the same value. If you don't want the parameters to be linked, you can type a new value in the number field or drag the slider of the linked parameter.

10.

In the number fields for Green and Blue, type 0 and press Return.

But wait, there's more. Instead of typing a value into a field, we can do a little drag and drop: You can drag from one parameter to another and transfer values.

11.

Enter 0.03 in the Red field.

12.

Click the Red parameter name, drag, and release on the Blue parameter name.

When you click the Red parameter name, a mutant three-fingered hand appears. It disappears when you release the mouse button over the Blue parameter name. The value from Red is transferred to the Blue parameter.

You can also create a link from one parameter to another by pressing Shift when you drag and drop.

13.

Set the Blue parameter to 0.03.

14.

Shift-click the Blue parameter name and drag onto the Green parameter name.

A + appears to the left of the Green parameter.

15.

Click the + next to the Green parameter.

The expression bar appears, with NRiScript1.Add1.blue listed as an expression for the Green parameter. This is called parameter linking and can be done not only within a node, but also between other nodes in your tree. Parameter linking is covered in more detail in Lesson 12.

16.

To remove this expression, click the number field for Green, type 0, and press Return.

To see the effect of the Add color correction, use the I (ignore) keyboard shortcut.

17.

Click Add1 to make it the active node.

18.

With the pointer over the Node view, press the I key.

Observe how the correction changes the robot in the Viewer. It has a slight warming effect.




Apple Pro Training Series. Shake 4. Professional Compositing and Visual Effects
Apple Pro Training Series. Shake 4. Professional Compositing and Visual Effects
ISBN: 321256093
EAN: N/A
Year: 2005
Pages: 156

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net