Finalgather Map Copy: fg_copy 3.9

The finalgather map copying and merging utility for mental ray. It supports finalgather map files of previous versions of mental ray as well as the new format based on native 3d Map files.

This tool is helpful when rendering animations. Flickering is reduced with moderate computational effort if several key frames are rendered with final gathering saved to files. Rendering in finalgather only mode of mental ray allows to compute these files quickly without rendering color images. When all the finalgather map files for the key frames are finished, the fg_copy tool can combine them into a single finalgather map file, which can then be used for the beauty render of the entire animation. This method is well suited for render farms, where different hosts can create finalgather maps for different frames simultaneously.

Optionally, finalgather map files can be reduced in size by merging similar points. That means, points that are very close and have similar orientation may be reduced into a single point, which eliminates redundancy and reduces the size of the generated map.


The finalgather map copy utility is started as:

fg_copy [options] infile1 ... infileN outfile

It reads finalgather map files infilen created with finalgather file statements in the rendering options of the .mi scene file or on the command line of the standalone mental ray, and merges them into a single finalgather file outfile. Each file is a collection of finalgather points that represent the irradiance at a specific 3D coordinate, stored either in the classic proprietary or the new 3d Map file format. The file format of the output can be controlled with an option.

If the same file is specified several times as an input file, its points appear multiple times in the output map. If point merging is enabled, the points are not duplicated but just their importance weights are adjusted.


The following options are supported:

-b xmin ymin zmin xmax ymax zmax
Select and copy finalgather points within the specified voxel only. This may be used for reducing the finalgather map size if only a part of the scene is required.
-B xmin ymin zmin xmax ymax zmax
Select and copy finalgather points outside of the specified voxel only. Using fg_copy twice with -B and -b options allows to split a finalgather file.
-f F
Merge finalgather points with similar normals within distance F into a single one. The value of F is related to the minimum radius of the finalgather accuracy statement in the .mi scene file. All finalgather points are tested against all other finalgather points regardless of which file they came from. In particular, fg_copy can be used to reduce the redundancy and size of a single input file.
Print brief help text.
-l on|off 3.9
Control legacy mode of the output.
If set to on the output finalgather map will be written in the classic file format. Otherwise, the new native 3d Map file format is used.
Default: off.
Print verbose progress messages and version banner.

Note The finalgather file statement in the rendering options of the .mi scene file also allows specifying multiple finalgather map files, which will be merged at render time. However, using fg_copy to precompute a merged map for a list of keyframes for the entire animation is more efficient.


To convert a new finalgather map to a classic one:

fg_copy -l on new_map classic_map

Copyright © 1986, 2013 NVIDIA Corporation