mental ray supports caching of textures for some image formats. With texture caching only certain parts (tiles) of a texture are loaded into memory, reducing the memory consumption during rendering dramatically. These tiles and automatically removed or replaced by recently accessed ones.
Texture caching has some advantages compared to memory mapping, especially on 32-bit machines where virtual address space is limited. For scenes with many large textures not all of them would fit into the virtual memory simultaneously. In such cases, mental ray would frequently unmap and re-map textures from memory on demand. This is a relatively slow operation. In contrast, cached textures occupy just a small fraction of their full size in memory. Texture tiles or pages are read from the image file only on demand, unused areas of a texture are not kept in memory.
Furthermore, cached textures have no restriction on supported data type, number of components or bit depths, and endianess. Data type conversions are performed on the fly. Memory mapped textures, on the other hand, need to be prepared for specific data types and endianess of the target machine, which typically requires to pre-convert texture files to the .map format.
The disadvantage of texture caching compared to memory mapping is the small runtime overhead to handle the cache, which applies even in cases where the full scene would fit into the virtual memory.
Caching is enabled only for textures defined as
Texture caching is generally supported for the Autodesk Maya iff, OpenEXR .exr (in tiled format), mental ray .map (in remap format) and BMP image file types. If filtering is requested for a texture in mental ray then further requirements apply: the pyramid level images need to be provided in the image file, they are not computed dynamically by mental ray. This is currently possible for the OpenEXR mipmap or ripmap pyramids and for the filtered .map images. Support for further image file formats may be added in the future versions.
During rendering mental ray reports info and progress messages when texture caching has been used. Texture cache detail messages can be enabled on the command line.
Copyright © 1986, 2013 NVIDIA Corporation