| ZCompose |
Function
The ZCompose function composes the input image over the background
image using the Z values of both images to determine what image’s pixel
is placed on top.
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, 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 “Lesson Three: Depth Compositing” in the Shake 3 Tutorials.
|
Parameters
|
Type
|
Defaults
|
Function
|
| clipMode |
int
|
1
|
Toggles between foreground (0) and background resolution (1) |
Synopsis
image ZCompose( image Foreground, image Background, int clipMode );
Script
image = ZCompose( Foreground, Background, clipMode );
Command Line
shake -zcompose image clipMode
See Also
LayerX