| home | << prev | next >> | contents |
mental ray can generate more than one type of image. There are up to five main frame buffers: for RGBA, depth, normal vectors, motion vectors, and labels. The depth, normal vector, motion vector, and label frame buffers store the Z coordinate, the normal vector, the motion vector, and the label of the frontmost object at each sample of the image. If multiple samples are taken for a pixel, the frame buffer value for that pixel may be either any one sample value, or a blend of all samples. The number and type of frame buffers to be rendered is controlled by output statements. Output statements specify what is to be done with each frame buffer. If a frame buffer is not listed by any output statement, it is not rendered (except for RGBA, which always exists). There are two types of output statements, those specifying output shaders and those specifying files to write.
There are also up to eight user-defined frame buffers that can be defined with any data type, using a frame buffer statement in the options block. In mental ray 3.4, the limitation to eight user-defined frame buffers has been removed.
mental ray versions up to 3.3 store frame buffers in memory. mental ray 3.3 uses a more efficient storage format that prevents memory usage from growing while rendering proceeds. mental ray 3.4 and later store frame buffers in frame buffer files on disk to conserve memory, using memory mapping to avoid the overhead of actually storing data on rotating media if memory allows it. Frame buffer files are stored in the directory specified with the -fb_dir command line option; if none is given the directory specified in the TMPDIR or TEMP environment variables is used. Frame buffer files permit very large frame buffers, or very large numbers of frame buffers, without being limited by available memory.
This introduces an incompatibility for output shaders. The list of frame buffer is no longer available as a fixed array in the state, so output shaders need to be rewritten for mental ray 3.4 to use special frame buffer access functions.
Frame buffer files are removed from disk when rendering has finished.
| home | << prev | next >> | contents |