Distributed Rendering (Windows)

To install mental ray manually in a distributed environment, follow these steps:

Checklist for licensing requirements

·      Dedicate one machine as the FLEXlm license server (version 6.1f).

·      Make sure that the LM_LICENSE_FILE variable is set in setenv.bat on a render master computer, and in the system environment variables for each render slave. If the variable is set in both setenv.bat and the system environment variables on a render master, the setenv.bat setting will take precedence.

·      Make sure the Sentinel driver (hardware key) is functioning properly on the license server.

For more information about installing FLEXlm, see the Setup Guide (printed book) and the Licensing Online Help.

mental ray Setup

1.    Install the complete SOFTIMAGE|3D "extreme" package on the render server (or master host). Install mental ray on all of the client (or slave) machines, including shader databases. You can share one shader database, but this is not recommended.

2.    During installation, set up all the rendering machines as FLEXlm clients. The machine designated as the FLEXlm server should not take part in the network rendering. See About FLEXlm Servers and Installing FLEXlm Licensing.

Note: The mental ray software should be installed in the same location on each machine. If this is not the case, you will need to use the linktab.ini file.

3.    The computer you have designated as master host should have as much swap space as possible. A good general rule is 10 megabytes of memory per renderer machine (10 MB x number of computers).

4.    Once you have installed SOFTIMAGE|3D, add the SI_LOCATION environment variable to the System Environment Variables (In Control Panel) to all of the slave machines. This environment variable is used by the render clients to locate the SOFTIMAGE|3D software when they receive a render request.

5.    Create a Softimage user account with Administrative privileges on the Master host machine. Create a .ray2hosts file in the user’s %HOME% directory. If you do not create this file, the default search directory for the .ray2hosts file is %SI_LOCATION%\3D\bin or the current (working) directory. The syntax is one host name per line excluding the Master.

Note: If you have installed mental ray 1.9, the file must be named .rayhosts.

6.    List all slave machine names and their corresponding IP addresses in \\winnt\system32\drivers\etc\hosts file.

Using mental ray

mental ray rendering software is designed to take full advantage of multiprocessor machines. It automatically takes advantage of thread parallelism without you needing to modify anything. The image to be rendered is subdivided into tiles, which generates a queue of tasks to be executed in parallel. Each render process (either on Master or Slave) requests tasks from this queue and renders the corresponding portion of the image. Faster processes request and complete more tasks than slower ones.

Starting mental ray

There are three ways to start mental ray:

·      Type soft –R on the command line in a command prompt window (with Rendering Type in the Render Setup dialog box set to "mental ray")

·      Start the ray.exe or ray2.exe from the DOS command line.

·      Start the ray.exe or ray2.exe from within the interface (Rendering section of the Matter module).

The command line options are the fastest. For testing purposes, the second option is ideal because it allows you to have a verbose output in a command prompt window, which allows you to see what is being processed and if there is any failure.

The verbose output is not recommended for actual production renders because it slows down the process. For a full listing of command line options, type ray –help or soft –R in a command prompt window.

The ray.exe or ray2.exe command takes an .mi file as input. To generate this file, select "Output to file" from the mental ray render options or use the –m option when using the soft –R command.

If you are going to edit the .mi file (to modify output picture or texture paths), you must force it to use ASCII vector data in the file instead of binary. To do this, set the environment variable SI_ASCII_VECTORS to any value before starting SOFTIMAGE|3D.

Environment Variables

These three environment variables can help control the transmission of data to remote hosts (set these in the System Environment variable):

·      MI_RAY_LOAD_NUM specifies the maximum number of servers concurrently loaded. The default is 10.

·      MI_RAY_LOAD_TIME specifies the timeout period (in seconds) for loading a server. The default is 900 seconds.

·      SI_MI_LCL_MAPS uses local texture maps when rendering. Set this to any value to activate it. Texture maps are not transferred across the network from the master to the slave computers. Local copies of the texture maps must be available in the same location on each machine.

Managing Renders

For some scenes, it is not necessary to use all CPUs for a render. For example, you can split up the render with 5 machines doing half the frames and another 5 doing the other half. This would have to be done using the –j option with the soft –R render command.

The linktab.ini File

If you are not working in a homogeneous Windows environment, you may need to set the linktab.ini file.

Handling Symbolic Links with the linktab.ini File