On this page |
Synopsis
izmatte [-v] <rgbpic1> <zpic1> <rgbpic2> <zpic2>... <outrgbpic> <outzpic>
Description
izmatte composites pairs of images. Each pair is an rgba image and a Z image rendered from the same camera of the same scene. To calculate each pixel in the output image, the corresponding pixels of the input Z images are compared. The rgba of the nearest image is used. izmatte uses alpha coverage of the nearer images to determine how much of the farther images to contribute to the output pixel.
The Z-images are expected to be in the 4-byte floating point format as output by the -Z option of mantra.
izmatte is useful when a scene cannot be rendered fast enough with the available memory. The scenes are rendered separately and the user does not need to care about depth sorting objects for compositing. The animation can be decomposed into any convenient groups of objects.
An inevitable property of the algorithm is that some subtle errors occur when mixing pixels with partial alpha coverage, but it appears barely noticeable.
Both the rgb image and Z image need to be rendered in two calls to mantra. This will be simplified to one call soon, so the polygon data can be loaded only once.