beautypg.com

Apple Shake 4 Tutorials User Manual

Page 99

background image

Chapter 3

Depth Compositing

99

4

In the Reorder parameters, enter “rgbar” in the channels value field. This string specifies
that red goes to the red channel, green to the green channel, blue to the blue channel,
alpha to the alpha channels, and red again to the fifth channel—the Z channel.

You now have a Z channel for the background. Next, you’ll copy this Z channel to the
city_bg image.

To copy the Z channel to the city_bg image:

1

In the Node View, select the city_bg node.

2

Attach a Layer–Copy node.

3

Connect the Reorder1 node to the second input of Copy1.

4

In the Copy1 parameters, enter “z” in the channels field. This copies the Z channel from
the Reorder1 node to the city_bg image.

Now, with the Z channels in place, you can create the composite using a ZCompose
node. ZCompose takes two images and uses the Z channel values to “stack” the RGBA
pixels by comparing which image has the lower Z value. The order in which the layers
are composited does not matter. Instead, the pixels with the higher Z values are
composited on top and passed down the tree.

To composite balloons and city_bg using ZCompose:

1

In the Node View, select the balloons node.

2

Attach a Layer–ZCompose node.