Zcompose – Apple Shake 4 User Manual

Page 469

Advertising
background image

Chapter 16

Compositing With Layer Nodes

469

ZCompose

The ZCompose node composes the input image over the background image using the
Z values of both images to determine which image’s pixel is placed on top. You should
note that the ZCompose node uses an Over operation to compose the foreground and
background input images after it has determined which should be in front, and which
should be behind.

Z values are depth measurements from the camera to each object. A premultiplied
image is assumed since Z values are normally produced by a render. With a ZCompose
node, one of the image’s pixels is either on top or not. This is sometimes a problem if
you have subpixel objects. You might have ten dust particles in a single pixel, but if
only one is in front of the corresponding object in the other image, then the pixel
containing all ten particles is placed in front of that object. The problem is that the
pixel does not contain the subpixel objects, just a representative color. For similar
reasons, object edges can also be a problem.

For a tutorial on Z-compositing, see Tutorial 3, “Depth Compositing,” in the Shake 4
Tutorials
.

Note: The MayaZ Depth macro (see page 996) puts elements that have been rendered
in Maya into a positive “normal” space; that is, using values such as 0 to 100, rather than
using Maya’s default -1/z formula.

Parameters

This node displays the following controls in the Parameters tab:

clipMode
Toggles between the foreground (0) or the background (1) image to set the output
resolution.

invert
Turning on invert reverses the logic of the ZCompose node—0 becomes the most
distant value, and higher values are considered progressively closer.

tolerance
The tolerance parameter determines how different, numerically, a value must be from
another value to be considered equal. With the default tolerance of 0, comparing two
input images with Z channel values of 40 and 50 will result in the image with 40 being
promoted. With a tolerance of 10, both images are considered to have the same depth.

Advertising