• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Lesson 4. Intermediate Compositing, Part 1 > Essentials of Compositing

Essentials of Compositing

The visual effects supervisor has just dumped a shot on you. It consists of two elements. How do you put them together? As always, it depends. There is never really a right way. Here's my way.

Loading Images

Start Shake.

Select FileIn from the Image tab and go to the Lesson04 folder.

FileIn all the clips in this folder by pressing Cmd-A and clicking OK.

The bathroom, blob, and blob_comp clips all appear in the Node workspace.

Set the Globals timeRange by clicking the Auto button.

The Globals timeRange is automatically set to the length of the longest clip.

Double-click on the blob_comp clip, click the Flipbook icon and play the clip.

This is what your final composite will look like. As you can see, a squishy, blob-shaped creature is tip-toeing across the screen.

Make flipbooks of the blob and bathroom clips and play them.

These are the elements to be used in your composite.

Close all your flipbooks and then double-click the blob clip to select and view it.

Go to frame 23 by dragging the Time Bar.

The blob clip has an alpha channel that will be used to layer it over the bathroom clip.

With the cursor in the Viewer window, press the A key to look at the blob clip's alpha channel. Press the C key when done to view the clip in color.

Both of the elements are 46 frames long, so you're going to set the Time Bar to 46 frames. Since the Globals timeRange has already been set to 1-46, you can automatically set the Time Bar to the same value by clicking on the Home icon.

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

The Time Bar is automatically set to the Globals timeRange.


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 blob image in the preceding example, the thumbnails also indicate transparency if there is an accompanying alpha channel.

A bit about the thumbnails:

  • They take frame 1 as the thumbnail 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 cursor over the thumbnail and press A. To return to RGB color, press C with the cursor over the thumbnail.

  • Any node can have a thumbnail—just 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.

  • Under the Globals tab, reveal the guiSettings and you can change the displayThumbnails control. This is the same as pressing T in the Node view.

Here's a nifty trick: Drag the blob node over the bathroom node in the Node workspace.

Shake does a mini composite for you. Does this help you composite or change your tree at all? Nope, but it's cool, isn't it? To do an actual composite, you have to hook up the nodes. You will do that soon, so stop fidgeting.

Setting Resolution

Shake makes it easy to composite images of different resolutions.

With the blob clip highlighted, select Layer from the Layer tab.

The Layer node automatically connects itself to the blob clip and incorporates most of the other Layer operations, with the exception of KeyMix and AddText. There is no particular advantage to using Layer instead of one of the specific layer operations, except that you can try out different modes quickly.

Connect the bathroom clip to the right input of the Layer1 node.

The default compositing operation in the Layer node is an Over function that places the foreground over the background based on the foreground clip's alpha channel. This is what you want.

You may have observed that the blob image is a smaller resolution (201 × 175 pixels) than the bathroom image (388 × 388 pixels) and that the resolution of the composite is cropped to the smaller size of the blob clip. The resolution is printed either in the Viewer title bar, or in the help field at the bottom of the screen when hovering over a clip.

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

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 background.

Drag the Time Bar back and forth so that you can see the blob moving across the screen.

Before you get too far into this composite, you should save your script.

Choose File > Save Script.

The browser will appear and wait for you to type in a name.

Open your Home directory and select the Shake_Output folder that you created in Lesson 2.

In the File name path, type the name of your script and click OK.


Get in the habit of saving your scripts periodically as you add new elements, because who knows when your cat will finally chew through your computer cables and leave you without power.

Transforming Images

Did you see that the blob gets cut off at frame 1 and should be repositioned? You can use the Move2D node to transform or move the image.

Insert a Move2D node from the Transform tab between the blob clip and the Layer1 node. To do this, first select blob and then click on Move2D.

The Move2D function combines many of the other transform nodes together, including Pan, Scale, Shear, and Rotate.

When the parameters for Move2D1 come up, Shake conveniently pops up some On-Screen controls in the Viewer to help you.

The button that turns on the On-Screen controls is located under the Viewer and has three positions.

Click and hold on the On-Screen controls icon to bring up the pop-up list.

  • This means the controls are always on. This is the mode you want to be in to interactively drag an image around.

  • The controls disappear if you move the image. They reappear when you release the mouse.

  • The controls are always off, but you can still move the image in the Viewer by using the sliders in the Parameters workspace.

The On-Screen controls work like this:

If you don't like the colors of the On-Screen controls, you can change them with the On-Screen controls Color Picker.

Click on the On-Screen controls Color Picker and it brings up the Color Picker in the Node workspace.

In the Palette, click on the red color square.

The On-Screen controls turn red.

Click on the white square to turn the On-Screen controls back to white.

Now that you know how to turn the On-Screen controls on and off and change their colors, you can be trusted to use the Move2D node.

Click on the Node View tab under the Node workspace to remove the Color Picker and see your nodes.

Drag the blob clip around with the various On-Screen controls.

When you use the On-Screen controls, you are automatically entering values for the xPan, yPan, angle, xScale, and yScale parameters in the Move2D node. You can also adjust these parameters by moving the sliders.


A cool trick is to use Ctrl-drag in the numeric text field on the slider—this gives you virtual sliders that go beyond the range of the graphic sliders.

Before you proceed, you should reset the node. This will bring all of the parameters back to their default settings.

Reset the Move2D1 parameters by right-clicking in the Parameters1 window and selecting Reset All Values.

At frame 1, use the On-Screen controls to place the right edge of the blob on the right side of the doorway. If you want to type in the exact values, they are xPan=73 and yPan=41.

Drag the Time Bar back and forth.

The blob moves across the screen, but is always in front of the bathroom door. This is pretty obvious when you get to frame 46 or so. What you really want is to place the blob inside the bathroom. To do this, you'll have to draw a matte for the opening of the door.

Creating RotoShapes

The RotoShape function is an image generator that is used for animated garbage mattes. This is where you draw shapes that can be used for a variety of purposes. It is ideal for plugging into the Mask input of a node, or to be used in conjunction with functions such as Inside, Outside, or KeyMix. More on this in a moment.

Since RotoShape creates images like any other node, you can modify them with standard tools such as Blur or DilateErode.

Click on the RotoShape node from the Image tab.

A RotoShape node is created in the Node workspace.

Make sure the On-Screen controls are in the always visible position.

Click on the left side of the bathroom clip to view it.

You should now see the bathroom clip with RotoShape1's On-Screen controls overlaid on it.

Make sure the AutoKey button located under the Viewer is in the off position.

When on, the Viewer AutoKey button will set keyframes every time the shape or its knots (or points) are moved. The shape will not be animated, so it's best to leave the AutoKey button off here.

  • AutoKey off

  • AutoKey on

By default, the RotoShape node sets itself to video resolution (720 × 486), so you'll want to change the resolution to be the same size as the bathroom clip.

Set the width and height parameters to 388.

RotoShape starts in Add Shapes mode, which means that every time you click on a blank spot, you append a new knot or point between the last knot and the first knot.

Click on each corner of the inside of the door to add knots on the screen and close the shape by clicking on the first knot you added.

As soon as the shape is closed, the RotoShape node automatically goes into Edit Shapes mode, where you can adjust the knots.

Click on the left side of the RotoShape1 node to view it.

Once the shape is closed, it is filled with a solid white color.

Click the left side of the bathroom node so that you can see what you are doing when you modify the shape.

Adjust the knots at the bottom corners of the door by clicking and dragging them so that they extend to the bottom of the screen.

Highlight the Rotoshape1 node and press the R key to generate a thumbnail.

A thumbnail for the RotoShape appears. It's magic.

Compositing Functions

Now that you've drawn a shape, there are various ways to use it in your composite to place the blob inside the bathroom. To start with, you'll need to integrate RotoShape1 with the bathroom clip, and since you're already familiar with an Over composite, you'll try an Atop composite in conjunction with a Copy node.

Go to frame 43 of the composite.

Add a Copy node from the Layer tab after the bathroom clip.

The Copy function copies selected channels from image B to image A, replacing them entirely. You commonly copy over the alpha channel.

Connect the RotoShape1 node to the right input of Copy1.

Double-click on the Copy1 node to view and edit it.

In the Channels parameter of the Copy1 node, type an A.

This will place the Alpha channel of RotoShape1 into the bathroom clip. Take a quick look.

Toggle the Viewer to show the alpha channel and then toggle it back to show full color.

Double-click on the Layer1 node and then click on the operation pop-up menu.

Select Atop from the operation menu.

Atop is similar to Over, except that the background matte is also used; the foreground will appear only where there is background matte.

Mr. Blob is now behind the door.

As always, there are a number of different ways to accomplish the same result. Let's try another approach.

Switch Layer1's operation mode back to Over.

Insert an Inside node from the Layer tab between Move2D1 and the Layer1 node.

The Inside node places one image inside the mask of a second image. Only the second image's mask is considered in the composite, the rest comes from the color of the foreground image.

Connect the output of the RotoShape1 node to the right input of the Inside1 node.

You don't need the Copy1 node anymore, so go ahead and delete it.

Remove the Copy1 node by clicking on it and pressing Del.

The Copy1 node is deleted, and the noodle keeps the bathroom clip connected to the Layer1 node.

Your tree should look like this:

Double-click on the Layer1 node and scroll through the composite.

The blob is behind the door and the composite looks good, so it's time to make a flipbook.

Click the Flipbook icon.

Play the clip with the > key.

Looks pretty good, but something's not quite right. There's no drop shadow. Every respectable blob creates a drop shadow, doesn't it? In Lesson 5, you will continue this tutorial by adding a drop shadow as well as some other goodies to make the blob really fit into the scene.

Select File > Save Script.

In the next lesson, you will load this script you continue where you left off.

Quit Shake.

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint