Network rendering is the distribution of the rendering process across more than one machine (sometimes called a render farm). For example, you can divide an animation into smaller sequences and render each sequence on a different computer. You can also control when and on which computer to render. Rendering across a network of computers is often referred to as distributed rendering.
Using Maya, there are three ways to set up network rendering.
mental ray network rendering allows you to distribute the rendering of each frame in your scene across multiple machines on your network. This requires mental ray rendering licenses, either mental ray for Maya Satellite or mental ray standalone.
The mental ray for Maya plug-in that is integrated in Maya always lets you render on up to 4 local CPUs. With Maya Complete, mental ray satellite rendering can take place on 2 additional remote CPUs. With Maya Unlimited, mental ray satellite rendering can take place on 8 additional remote CPUs.
The mental ray network rendering process can be invoked while working within Maya (in the Render View or batch rendering) or from the command line within Maya.
A mental ray distributed rendering can speed up all of the following tasks:
When using mental ray for Maya and mental ray for Maya Satellite, master refers to the machine that is submitting the network render requests interactively, via batch or command line, and slave refers to an individual machine with mental ray standalone or mental ray for Maya Satellite on the network that receives and performs part of a network render and sends the information back to the client.
Any machine with mental ray standalone can be a master, a slave or both at the same time.
Note: While it is not recommended, you can mix any combination of Linux, Windows, and Mac OS X machines as masters and slaves.
If you want to render Maya scenes (.mb or .ma) from within Maya or batch render with Maya, you need to install mental ray for Maya on all server machines and mental ray standalone on all slave machines.
If you want to render native mental images (.mi) scenes from the command line using the mental ray standalone renderer, you need to install mental ray on all master and slave machines.
If you want to render Maya scenes (.mb or .ma) from within Maya or batch render with Maya, you need to install mental ray for Maya on all server machines and mental ray for Maya Satellite on all slave machines. You can use up to 2 CPUs (with Maya Complete) or 8 CPUs (with Maya Unlimited). For more information about installing mental ray for Maya Satellite, see the Installation and Licensing guide.
You can't render native mental images (.mi) scenes from the command line using the mental ray for Maya Satellite; you must use mental ray standalone.
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 and mental ray for Maya Satellite look for maya.rayhosts in the following directories:
To configure maya.rayhosts files, see Set up a master machine with mental ray standalone (method 2)
mental ray for Maya looks for (maya.)rayrc in the following directories:
maya.rayrc is installed with mental ray and additional configuration is generally not required.
Before you begin, you must have networked workstations. See your system administrator if workstations are not networked.
You can set up masters using mental ray standalone or mental ray for Maya, using different method to specify which hosts to use as network render slaves.
Note: If you have multiple versions of mental ray standalone installed (not recommended), each must have their own TCP port number in the services file to avoid conflict.
For example:
mi_ray3_0maya4_0 7051/tcp
mi_ray3_1maya4_5 7052 and 7053/tcp
mi_ray3_2maya5_0 7054/tcp
If you have multiple versions of mental ray standalone installed (not recommended), each must have their own TCP port number in the services file to avoid conflict.
First, create a file called maya.rayhosts.
The maya.rayhosts file must contain a listing of each slave machines name. These slave machines must be accessible on the network where mental ray for Maya (the master machine) is installed.
For mental ray for Maya masters going to mental ray standalone slaves, you do not need to specify the port if you are using the default port (7007).
For mental ray for Maya Satellite masters, you must add the port number by typing :<port number> after the hostname in the maya.rayhosts file. The port number set on mental ray for Maya Satellite slave machines is 7107. For example:
pc-host1:7107
pc-host2:7107
If you are using a non-default port, you can specify it here as well:
lnx-host2:7555
You can use # to comment hosts out so they wont be used; for example:
# pc-slave4:7107
You can use IP addresses as well as machine names.
Put the maya.rayhosts file in one of the following directories. (They are searched in order and the first maya.rayhosts file that is found is used.)
Windows
\Documents and Settings\<username>\My Documents\maya\2008\en_US\prefs
\Documents and Settings\<username>\My Documents\maya\2008-x64\en_US\prefs
\Users\<username>\Documents\maya\2008\en_US\prefs
\Users\<username>\Documents\maya\2008-x64\en_US\prefs
Mac OS X
/Users/<username>/Library/Preferences/Autodesk/maya/en_US/2008/prefsLinux
~<username>/maya/2008/en_US/prefs
~<username>/maya/2008-x64/en_US/prefs
%USERPROFILE%\My Documents\maya $HOME/maya /Applications/Autodesk/maya/2008 %USERPROFILE% or %HOMEDRIVE%\%HOMEPATH% (usually c:\)$HOME/usr/autodesk/maya2008/ C:\Program Files\Autodesk\maya2008\/Applications/Autodesk/maya2008/Set the verbosity level for messages from the translation process by using the MEL command as outlined in Export Verbosity. During a render, messages similar to the following are output to the Script Editor:
// Info: (mental ray) : loading startup file C:/Program Files/ Autodesk/Maya 2008/mentalray/maya.rayrc // mental ray for Maya: using rayhosts file C:/Documents and Settings/user1/My Documents/maya//maya.rayhosts
Additionally, error messages from mental ray for Maya are printed to the Maya Output Window.
To change the set of slaves being used for mental ray for Maya renders
Close Maya, modify the appropriate maya.rayhosts file, and restart Maya.
To set up a master machine with mental ray standalone - method 1
Note
To verify which hosts file (if any) is being read, and what network render slaves are
being contacted, use the mentalrayrender command with a verbosity setting of 4 or higher.
For example, running
D:\> mentalrayrender -v 4 test.mi
could produce the output:
MAIN .0 info mental ray, version 3.4 MAIN .0 info : [...] MAIN .0 info : MAIN 0.0 info : version 3.4, 4 Dec 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.
To set up a master machine with mental ray standalone - method 2
Use the -hosts option with the mentalrayrender command, for example:
mentalrayrender -hosts machine1 machine2 sceneFile.mi
This uses machine1 and machine2 as render slaves. This overrides any .rayhosts files on the master machine.
All slave machines require mental ray for Maya Satellite or mental ray standalone.
When you install mental ray standalone, the installation automatically sets up your machine as a server to receive network render requests. If you are encountering problems with network rendering follow the steps below.
To verify this, go to the Services window from the Administrative Tools and check to see if the Ray Server service exists and is started.
If the Ray Server service exists but is not started, go to step 5.
mayaray361 7007/tcp
mi-spm 7050/tcp7007 represents the port number used for rendering requests and 7050 represents the port number used for licensing connections to SPM. Make sure the port number used for rendering requests is the same on the master machine and all slave machines (here, 7007).
ray /install
ray.exe should automatically be in your path and is located in the bin directory of the mental ray installation.
When the service successfully starts, the machine is ready to receive network render requests.
When you install mental ray for Maya Satellite on a slave machine, the installation automatically sets up your machine as a server to receive network render requests. If you are encountering problems with network rendering follow the steps below.
To verify this, go to the Services window from the Administrative Tools and check to see if the RaySat Server service exists and is started.
If the RaySat Server service exists but is not started, go to step 5.
mi-raysat 7107/tcp
7107 represents the port number. Make sure the port number is the same on the master machine and all slave machines.
raysat /install
raysat.exe should automatically be in your path and is located in the bin directory of the mental ray installation.
When the service successfully starts, the machine is ready to receive network render requests.
The mental ray standalone installer does not set up your machine as a slave automatically. You need to follow the steps below with administrative privileges on all Linux machines.
/usr/autodesk/mi361/bin/netsetup -s
You are prompted for the name of the SPM license server. It defaults to the local host.
The machine is now ready to receive network render requests.
The mental ray standalone installer does not set up your machine as a slave automatically. You need to follow the steps below on all Mac OS X machines with administrative privileges. To do so, you may need to edit the rayd file in the mental ray 3.6.1 bin directory. Fill in the name of your SPM License server and uncomment the setenv SPM_HOST line. This file may not be modifiable unless you have administrative privileges.
(Mac OS X) /Applications/Autodesk/mentalray3.6.1/bin
The machine is now ready to receive network render requests.
Once you are set up, the process of rendering over the network is fully automatic so that every render you invoke from a client machine is automatically distributed over the network.
Ensure that the maya.rayhosts file has the name of all mental ray network rendering slaves you wish to use (see Set up a master machine with mental ray standalone (method 1)).
You should see messages in the console window (or in the mental ray log file for batch render) telling you which slave machines were connected and which machine is being used to render particular tiles.
Ensure that the maya.rayhosts file has the name of all mental ray network rendering slaves you wish to use (see Set up a master machine with mental ray standalone (method 1)).
Render -r mr sceneName.mb
This works with mental ray standalone only; this operation is not supported for mental ray for Maya Satellite.
Ensure that the maya.rayhosts file has the name of all mental ray network rendering slaves you wish to use (see Set up a master machine with mental ray standalone (method 1)).
mentalrayrender myFile.mi
mentalrayrender -verbose 5 myFile.mi
The instructions below refer to mental ray for Maya 8.5 and mental ray standalone 3.6. For information on previous versions, refer to the documentation for that version of Maya or mental ray.
Ensure you have administrator (or root) privileges on the machine.
Here are various possibilities to check.
Port number
One possibility is that the network port number you are using is already being used by another service. Ensure that there is no other entry in the services file that is using port 7007 (mental ray standalone) or port 7107 (mental ray for Maya Satellite). If that port number is already taken, you need to pick a new available port number and use that same number for all master and slave machines that are to work together.
You may need to change the port number.
To do so on Linux and WIndows, edit the port services file located at:
In the services file, ensure that the following line exists:
where 7107 or 7007 is the port number. Make sure the port number is the same on the master machine and all slave machines.
To do so on Mac OS X:
(mental ray standalone) You may need to edit a file called the rayd file located in the mental ray 3.6.1 installation bin directory. Fill in the name of your SPM License server and uncomment the setenv SPM_HOST line.
To restart the server on Windows, go to mental ray bin directory and type the following:
raysat2008server.exe /stop
raysat2008server.exe /start
rayserver.exe /stop
rayserver.exe /start
(Linux with versions of Redhat prior to 7.2) You may need to edit the inetd.conf file located at /usr/etc/inetd.conf and ensure that the following line exists:
mi-ray stream tcp nowait nobody /usr/local/mi35/bin/rayd rayd
mi-raysat stream tcp nowait nobody /usr/local/mi35/bin/raysatd raysatd
You may need to restart the inetd service by typing the following:
% killall -v -HUP inetd
(Linux only with version of Redhat 7.2 and 7.3) You may need to edit the services in the xinetd.d directory. See "To check your xinetd configuration on Linux" below.
To check your xinetd configuration on Linux
ls /etc/xinetd.dThere should be a file named mayaray (mental ray standalone) or mi-raysat (mental ray for Maya Satellite).
mental ray:
# description: mental ray for maya network rendering service mayaray
{
flags = REUSE
socket_type = stream
user = nobody
wait = no
server = /usr/local/mi35/bin/rayd
log_on_failure += USERID
}
mental ray for Maya Satellite:
# description: mental ray for maya network rendering service mi-raysat
{
flags = REUSE
socket_type = stream
user = nobody
wait = no
server = /usr/local/mi35/bin/raysatd
log_on_failure += USERID
}
/etc/init.d/xinetd restart
ps -e | grep -v grep | grep xinetd
You should see a line similar to this:
980 ? 00:00:02 xinetd
The first number is the process id of xinetd.
If the system is RedHat 7.2, xinetd re-reads its configuration on receipt of the USR2 signal. For RedHat 7.3 it re-reads its configuration on receipt of the HUP signal. So for a RedHat 7.3 system where xinetd's process id is 980 you would execute:
kill -HUP 980
xinetd should have found the new service and you should be able to send it render requests from another node on the network.
If you want to run different versions of mental ray standalone in one machine, make sure that each version has its own mi-ray* entry in the services file.
For example, if you have mental ray 3.3 and mental ray 3.4 in one machine, and you can change the mi-ray entry for mental ray 3.3 (or 3.4).
Create your own mi-ray variable for mental ray 3.3 in the services file.
The services file might look like this
| mi-ray 7003/tcp | # used for mental ray 3.4 |
| mi-raysat 7103/tcp | # used for mental ray satellite 3.4 |
| mi-ray_33 7155/tcp | # used for mental ray 3.3 |
The server also needs to be updated.
To rename the server file (Windows)
To rename the server file (Linux)
{
flags = REUSE
socket_type = stream
user = nobody
wait = no
server = /usr/local/mi33/bin/ray_33d
log_on_failure += USERID
}