home << prev next >> contents  


Multipass Rendering

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. (This last one is very common in entertainment content production.)

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. Multipass rendering is controlled with a pass statement script in the camera definition that is similar to output statements.

mental ray 3.2 and higher use compression to reduce the size of pass files. 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 3.2 can also merge pass files that were created with dissimilar max sampling rates using appropriate upsampling or downsampling, although it is recommended to use matching sampling densities. Multipass rendering does not work with slave hosts.

home << prev next >> contents  


Copyright © 1986-2007 by mental images GmbH