mental ray for maya render farm setup

 

parallelism

Parallel network rendering lets you render your images on multiple machines over a network using the mental ray standalone renderer. This requires mental ray standalone rendering licenses and can be invoked while working within Maya (mental ray for Maya plugin) and also from the command line with Maya or using the mental ray standalone renderer.

 

a few terms

When using mental ray, Master refers to the machine that is invoking the parallel network render request interactively, via batch or command line. Slave refers to an individual machine with mental ray standalone on the network that performs part of a parallel network render and sends the information back to the master. Any machine with mental ray standalone can be a master, a slave or both at the same time. You can also mix any combination of IRIX, Linux, Windows, and Mac OS X machines as masters and slaves.

 

what do i need?

If you want to render from within Maya or batch render with Maya, you need to install mental ray for Maya on all master machines and mental ray standalone on all slave machines. If you want to render from the command line using the mental ray standalone renderer, you need to install mental ray standalone on all master and slave machines.

 

important files

To specify which network render slave machines a master uses, mental ray for Maya and mental ray standalone use different configuration files: 

mental ray for Maya uses a file called maya.rayhosts 

mental ray standalone uses a file called .rayhosts

maya.rayhosts

mental ray for Maya looks for maya.rayhosts in the following directories:
User’s Maya preference directory
User’s Maya application directory
User’s home directory
Directory from which the plugin was loaded

.rayhosts

mental ray standalone looks for .rayhosts in the following directories:
Directory from which standalone was launched
User’s home directory

 

How do I?

Set up a master machine to render with the mental ray stand alone?

Specify which hosts to use as network render slaves. Do this one of the following ways: 

On Windows machines, it is specified by %HOMEDRIVE%\%HOMEPATH% (on most machines, this is C:\). On IRIX, Linux, and Mac OS X the home directory is specified by the $HOME environment variable. To verify which hosts file (if any) is being read, and what network render slaves are being contacted, run mentalrayrender with a verbosity setting of 4 or higher. 

For example, running C:\> mentalrayrender -v 4 test.mi will produce:

MAIN .0 info : mental ray, version 3.3
MAIN .0 info :
[...]
MAIN .0 info :
MAIN 0.0 info : version 3.3, 4 Apr 2004
MAIN 0.0 info : compiled on: Windows NT 4.0, x86
MSG 0.0 info : reading hosts file C:\\.rayhosts
MSG 0.0 info : connecting host foobar1:7054
JOB 0.0 info : started thread 0 on foobar1 now known as host 1
MSG 0.0 info : connecting host foobar2:7054
JOB 0.0 info : started threads 0,1 on foobar2 now known as host 2

This indicates that the hosts file C:\.rayhosts was read, and that it specified network render slaves foobar1 and foobar2 for use in this rendering. The started thread 0, 1... messages indicate that the slaves were successfully contacted.

 

Set up a master machine to render with mental ray for Maya?

1. Create a file called maya.rayhosts and put it in one of the following directories (They are searched in order and the first maya.rayhosts file that is found is used.): 

2. To verify which hosts file is being read, turn on Info Messages in the Translation section of the mental ray Render Global Settings window. 

After you render, messages similar to the following are output to the Script Editor: 

// Info: (mental ray) : loading startup file C:/Program Files/AliasWavefront/Maya 6.0/mentalray/maya.rayrc 

// mental ray for Maya: using rayhosts file C:/DocumentsandSettings/user1/MyDocuments/maya/maya.rayhosts 

The same contacting host, etc messages that are described for the standalone are also output to the Script Editor so that users can tell whether or not the slaves were successfully contacted. See "To set up a master machine to render with mental ray standalone" 

3. To change the set of slaves being used for mental ray for Maya renders, you must close Maya, modify the appropriate maya.rayhosts file, and restart Maya.

 

Slave machine setup on Windows. ?????

NB - all slave machines require the mental ray standalone.

When you install mental ray 3.3 standalone, the installation automatically sets up your machine as a slave to receive network render requests. 

If you are encountering problems with network rendering follow the steps below:


1. Ensure there is a rayrc file in the mental ray 3.3 installation directory (default is C:\Program Files\mental images\mental ray 3.3). This file is automatically created during a default installation.


2. Ensure that the RAY service is installed and running.
To verify this, go to the Services window from the Administrative Tools and check to see if the RAY service exists and is started.
If the RAY service exists but is not started, go to step 5.


3. If the RAY service does not exist, edit the services file located at C:\WINNT\system32\drivers\etc\services, and make sure the following line exists:
mi-ray 7054/tcp
Make sure the port number is the same on the master machine and all slave machines.


4. Open a command prompt window and type the following:
rayserver /install
rayserver should automatically be in your path and is located in the bin directory of the mental ray 3.3 installation.


5. Double-click the RAY service in the Services Window (Administrative Tools in the Control Panel) to start it. When the service successfully starts, the machine is ready to receive network render requests.

 

 

network rendering

Now that you are setup, the process of rendering over the network is fully automatic. ie Every render you invoke from a master machine is automatically distributed over the network.

 

To network render within Maya on a master machine:

Ensure that the maya.rayhosts file has the name of all mental ray network rendering slaves you wish to use.


Start Maya, open a scene and select Render > Render using > mental ray Renderer.


To verify that the slave machines are being used, in the Render Global Settings window (Window > Rendering Editors > Render Globals) go to the mental ray tab and in the Translation section select Progress Messages from the Export Verbosity drop-down list. You should see messages telling you which slave machines were connected and which machine is being used to render particular tiles.

Select Render > Render Current Frame.

 

To network render with Maya from the command line on a master machine:

Ensure that the maya.rayhosts file has the name of all mental ray network rendering slaves you wish to use.


From a command prompt window, change to the directory where your Maya scene resides.


To get progress messages to show how the slave machines are being used, in the Render Global Settings window (Window > Rendering Editors > Render Globals) go to the mental ray tab and in the Translation section select Progress Messages from the Export Verbosity drop-down list, and then save the scene.

Type the following:

render -r mr sceneName.mb

 

To network render with mental ray from the command line on a master machine:

Ensure that the rayhosts file has the name of all mental ray network rendering slaves you wish to use.

From a command prompt window, change to the directory where your .mi file resides.

Type the following:


mentalrayrender myFile.mi

To get progress messages to show how the slave machines are being used, use the following command:

mentalrayrender -verbose 5 myFile.mi

 

mental ray Commands and Flags

This is for Maya v6.0 and v6.01 and mental ray Standalone 3.3

There is now a new rendering command-line utility called Render. 

To get quick renderer-specific information, type:

Render -r rendername -help where rendername is the name of the renderer:

When rendering from the command line with the Standalone use the following command:

mentalrayrender filename.mi

ray –help (Standalone) don’t use

mentalrayrender (Standalone with mrfM) shell script that fixes a few inconsistencies with the ray command

mentalrayrender sets some enviroment variables and include/library path for the "ray" command.
It gives include /library path that points to the directory where .mi and .so are installed.