Map File Copy: map_copy 3.9

The map file copy and merging utility for mental ray. It converts map files generated by mental ray between different representations, like binary, a packed-size format for optimized performance, or ascii, a human-readable format for editing purposes. The content of multiple map files can be merged into a single output map file. Map files created by external tools in the ascii format may be converted to the binary form, like to accelerate the reading into mental ray at runtime. Map files created by mental ray in binary format for caching purposes, like finalgather maps, may be converted to the ascii representation for inspection or manipulation.

Usage

The map copy utility is started as:

map_copy [options] infile1 ... infileN outfile

It reads the map files infilen, optionally combines them into a single map, and writes it to the output map file outfile. Each input file represents a collection of point data stored in the mental ray map file format. The map file type of the output can be controlled with an option.

Note If the same file is specified several times as an input file, its points appear multiple times in the output map.

Options

The following options are supported:

-h
Help. Print brief usage text.
-o oa|ob|cb
Output format.
Write the output map file in one of the formats: Open Ascii, Open Binary, or Closed Binary.
-v
Verbosity. Print detail information, progress messages, and version banner.
Example

mental ray may create finalgather map files for caching purposes in a binary format. Such a map, here finalgather.fgm, can be converted to a human readable ascii representation as follows:

map_copy -o oa finalgather.fgm finalgather_ascii.txt

The resulting text file finalgather_ascii.txtwill contain the map data in a conveniently readable and editable form, like this:

#
# map_copy, version 1.0.0
# open ASCII map file, 14739 elements
#

declare map
        "map_decl_a03568" (
                dim 3,
                vector "normal",
                color "irrad",
                integer "rays",
                scalar array 3 "grad_t1",
                scalar array 3 "grad_t2",
                integer "point_id",
                scalar "r_mean",
                scalar "min_dist",
                vector "min_dist_dir",
                scalar "occluded_min_dist"
        )
end declare

map "map_a03568" "map_decl_a03568"
        {-0.528161 0.111116 -0.969539 , 0 1 6.12323e-17 , 0.0280499 ...
        ...
end map

This text file can be used by mental ray as a finalgather map as is, since it is given in one of the supported map file formats. The file extension is not relevant. The declaration may not be modified in order to retain the finalgather purpose. However, the data values may be edited to achieve specific effects.

Copyright © 1986, 2013 NVIDIA Corporation