The image copying and conversion utility for mental ray. It supports all image formats and types that mental ray generates, and can convert between them. Furthermore, image pyramids for texture filtering can be created and stored in appropriate texture format files.
The image copy utility is started as
imf_copy [options] infile outfile [outformat[outtype]]
The file infile will be copied to outfile using the file format outformat and the data type outtype. If no output format is specified then the file name extension of outfile is used to determine the format. If no output type is given then the default data type of the file format will be taken. The map format is especially suitable for creating memory-mapped or tile-based texture images.
These options are supported:
mental ray can read and write a lot of image file formats and use them as textures without further preparation. This typically involves decoding and potential decompression for any texture access, having quite some impact on overall rendering performance. This tool can be used to convert an image to a texture format that is optimized for rendering with mental ray on the local machine. The following command will store image data uncompressed and ready for fast memory mapping:
imf_copy image.tif texture.map
Since mental ray does not depend on the file name extension to determine a texture format, the target file name can be custom and still use the .map format. Like:
imf_copy image.tif texture.tx map
Note Some systems may recognize the .map file extension as a system file.
The original file names may even be re-used after conversion to avoid touching the scene to render:
imf_copy image.tif converted/image.tif map
Note Most external image tools depend on a correct the file name extension to indicate its content. The above command will create files where this rule is not respected, on purpose.
Normally, texture filtering will be performed during rendering only, on demand. If filtering is known to be exploited anyway then pre-filtering can help to speed up rendering later. This command will filter the image down into pieces with smaller resolutions, and store these sub-images as a pyramid into a single texture file (thus becoming larger in file size):
imf_copy -p image.tif texture_pyramid.map imf_info -l texture_pyramid.map width height comp bits gamma line type format file 2048 2048 3 8 1 up rgb map texture_pyramid.map 1024 1024 3 8 512 512 3 8 256 256 3 8 128 128 3 8 64 64 3 8 32 32 3 8 16 16 3 8 8 8 3 8 4 4 3 8 2 2 3 8 1 1 3 83.11 This command can be used to create standard image pyramids in TIFF and OpenEXR formats (similar to the
exrmaketiled
command). They will work in
mental ray as well as in other third-party renderers.
mental ray's texture caching mechanism - the alternative to memory mapping - allows to handle the increasing demand for more higher resolution textures very efficiently, even on platforms with limited memory resources. For this to work, textures need to be pre-separated into rectangular tiles rather than stored as one large image. The following command will create a tiled texture version of the original image using the default tile size that is best suitable in most cases:
imf_copy -r image.tif texture_tiled.map imf_info texture_tiled.map width height comp bits gamma line type format file 2048 2048 3 8 1 up rgb (re)map texture_tiled.map 5402 812 3 8 (remapped)
3.11
This command can be used to create tiled textures in TIFF and OpenEXR
formats (similar to the exrmaketiled
command). They will work in
mental ray as well as in other third-party renderers that support it. Like in
this example, where a specific tile size is enforced to optimize
for a capable computer environment and larger texture resolutions:
imf_copy -r -t 256 image.tif texture_tiled.exr exrheader texture_tiled.exr file format version: 2, flags 0x200 channels (type chlist): B, 16-bit floating-point, sampling 1 1 G, 16-bit floating-point, sampling 1 1 R, 16-bit floating-point, sampling 1 1 ... tiles (type tiledesc): single level tile size 256 by 256 pixels
Copyright © 1986, 2015 NVIDIA ARC GmbH. All rights reserved.