home << prev next >> contents  


Rasterizer

mental ray 3.2 and later support a rendering algorithm called Rapid Motion, which was rewritten in mental ray 3.4 and renamed rasterizer. Its primary difference to regular scanline rendering is its separation of sampling and sample compositing (also called sample collection). Without the rasterizer, mental ray selects spatial and temporal sample points (eye rays) on the image plane in the shutter interval. If an object moves, it will be shaded in multiple samples at different points in time. Since rendering time is roughly proportional to the number of shaded samples, it rises quickly if an object moves quickly.

The rasterizer works by sampling all objects at a fixed time, and caching the shaded samples for re-use. If the object moves, these sample results are re-used at every point the object passes over. The cache is tied to the geometry:

The late compositing of shading samples to form screen samples, and re-using of shading results has several important consequences:

The rasterizer is enabled with the command-line option -scanline rast or the statement scanline rast in the options block of the scene file. mental ray 3.4 controls the pixel sampling rate with -samples_collect, which gives the number of samples per pixel-dimension. For example, the default value of 3 gives 9 samples per pixel. The rate of shading is controlled by -shading_samples, and defaults to 1.0, or 1 shading call per pixel. This drives the internal tesselation depth, and takes effect after the geometry's own approximation has been calculated. It is possible to override the shading samples either per object or per instance. Finally, the shading frequency may be reduced for fast-moving objects with the -rast_motion_factor commandline option, or the corresponding string option "rast motion factor". Both versions take a positive floating point value which divides the shading samples taken, proportional to the speed of the motion of the object in screen space. The default value is 0.0, which disables this feature. A good value for many scenes would be 1.0.

Due to the different sampling patterns, it is not a good idea to use multipass rendering with passes that use the rasterizer together with passes that do not use the rasterizer.

home << prev next >> contents  


Copyright © 1986-2007 by mental images GmbH