Sometimes, very large scenes are not rendered in one pass but in multiple passes, because they are too large for the machine, or because different passes are rendered on different machines to increase parallelism, or because some passes are expected to change while others stay the same, so only the modified passes need to be rerendered (which is very common in entertainment content production).
mental ray supports two types of pass renderings: the standard pixel-based passes using frame buffers and regular image output files, and advanced samples passes using multiple values per pixel which are stored in special sample files.
It is generally not sufficient to render multiple images and then composite them into one. Pass compositing is not simple alpha blending but a complex user-defined process that involves at least the Z depth. Although mental ray supports saving the Z buffer to files, there is only one Z value per pixel.
mental ray supports multipass rendering by saving rendering results not as image files but as sample files. Every primary ray is a sample, and is stored with all available frame buffer values. If the scene contains motion, an averaged result over all temporal samples is stored. The file format used for sample files is unpublished and may change with new versions of mental ray, it is not useful as a data interchange format for other programs, and is not intended for long-term storage. Merging is done by a user-defined function (if absent, a simple Z switcher is used) that has access to all frame buffer results of all passes, one sample at a time. Sample pass rendering is controlled with a pass statement script in the camera definition that is similar to output statements.
mental ray uses compression to reduce the size of sample pass files. Sample pass files are generally backwards-compatible, but not forward-compatible. Also, passes created with and without the rasterizer (formerly called Rapid Motion) should not be merged because the sampling patterns do not agree: passes rendered with the rasterizer are based on sampling of (sub)pixels, whenever passes rendered without it are based on sampling of (sub)pixel corners. For this reason, in most cases passes rendered without the rasterizer have 1 sample higher resolution per rendered tile. mental ray can also merge sample pass files that were created with dissimilar max sampling rates using appropriate upsampling or downsampling, although it is recommended to use matching sampling densities. Sample pass rendering does not work with slave hosts.
Copyright © 1986-2009 by mental images GmbH