exporting .mi

The mental ray standalone application requires an .mi file for rendering to commence.

These .mi files can become quite large as they contain all necessary information for image creation.  ie any particles, hair, fluids (cache) or animation information will be contained in the file on a per frame basis. The disadvantage to this is the files can become quite large and can take some time for creation.

 

There are 2 approaches to the creation of .mi files

1. Use the File -> Export All ... or Export Selection ... (Options) window.

 

This will create an .mi file that can then be rendered using the Standalone mentalrayrender command from a command prompt.

 

2. Another approach is to use a script to create a separate .mi file for each frame in the sequence.

This can be a very useful and time saving technique. Instead of one very large .mi file that contains all scene elements, separate .mi files will be created for each frame in the sequence.

Once the batchMayaToMR  script has been sourced, execute the following from the Script Editor Window:

batchMayaToMR "C:/miExport/exporting.mb" "myTest" 1 100 "C:/miExport";