home << prev next >> contents  


Texture Caching3.4

mental ray supports caching of textures for some image formats. With texture caching only certain parts (tiles) of a texture are loaded into the memory. These tiles and automatically removed or replaced by recently accessed ones.

Texture caching has some advantages over memory mapping. On 32-bit machines, the virtual address space is limited. For scenes with many large textures not all of them would fit into the virtual memory simultaneously. In such case, mental ray would memory unmap and re-map textures on demand. However, memory mapping is a relatively slow operation. On contrary to memory mapped textures, cached ones do not to occupy a large part of the virtual memory space. Texture tiles or pages are read from the image file on demand.

Another advantage of texture caching is weaker requirements on the preparations. Unlike memory mapped textures, cached ones may use a different number of components or bits and may have different endian. The conversion is done on the fly.

Caching is enabled only for textures defined as local.

Texture caching is supported for the Alias Maya iff, OpenEXR (tiled images only), mental images .map and BMP image file types. In order to allow texture caching for filtered textures, the pyramid levels should to be provided by the image file. mental ray currently supports those for the OpenEXR file mipmap or ripmap pyramids and for the filtered .map images. Support for further image file formats may be added in the future versions.

The disadvantage of texture caching over the memory mapping is somewhat worse performance for scenes which fit into the virtual memory.

home << prev next >> contents  


Copyright © 1986-2007 by mental images GmbH