Network rendering with Mental Ray

Here are some quick tips to help you setup a little network of render boxes for Mental Ray satellite.

First of course you need to install Mental Ray satellite on all the slave machines. It is not setup by default when you install Maya, so you’ll find Mental Ray satellite on your Maya DVD. It is obviously very important that you make sure the internal Maya version of Mental Ray matches the Satellite one. If the versions are different, you simply won’t be able to render.

Once MR satellite is installed, you need to do several things: Add the name of your slave machine(s) in the maya.rayhosts file, which you can find in your My Documents/maya folder. Like so:

#*****************************************************************************
# Copyright 1986-2002 by mental images GmbH & Co.KG, Fasanenstr. 81, D-10623
# Berlin, Germany. All rights reserved. #*****************************************************************************
# Evaluated at startup time of the plug-in to find ray servers for the
# integrated mental ray renderer.
#*****************************************************************************
Renderbox1:7108 SlaveComp:7108

The number at the end of the last line is the port which is going to be reserved for Mental Ray satellite. You can find what that port number is by going to: C:\WINDOWS\system32\drivers\etc and opening the services file (which is a text file). One of the last lines should say something similar to:

mi-raysat2008    7108/tcp

Chances are that if your launch a render now your slave will not be picked-up for the render, because you need to first open the specific port in the Windows XP firewall. So go to Windows Firewall, click on the Exceptions tab and click on Add Port. You then precise the port number (in this case 7108) and give a name to the exception (whatever you want). After that, you should be able to launch a render from within Maya and check the Output window. If everything’s fine you should see right away a few lines similar to those:

// mental ray for Maya: using rayhosts file G:/My Documents/maya//maya.rayhosts
Info: (mental ray) : adding rayhosts
Info: (mental ray) : adding host: Renderbox1:7108
MSG  0.0  info : adding new host 1 (Renderbox1:7108)
JOB  0.0  info : started threads 0,1,2,3 on Renderbox1:7108 now known as host 1
Info: (mental ray) : network rendering slaves: Renderbox1:7108

COMMAND LINE (BATCH RENDERS):

Most of the time, when rendering a series of frames or a particularly big picture, you won’t be able to do it from inside Maya because of a lack of memory. This is a job better fit for the dreaded command line. E.g.:

render -r mr -s 101 -e 532 -b 1 -v 5 -rnm false -x 1024 -y 435 -rp true -of tif -cam sq200s2 -log log.txt -rd F:\projects\satellite\prod\render\images F:\projects\satellite\prod\animation\sq200\s02\blocking_001s.ma

If you’re not sure about the significance of some flags, just run:

render -r mr -help

3GB SWITCH:

Memory is a constant worry with Mental Ray, and the more your computer has, the better. In case you’re running Windows XP 32bits, you might want to have a look at activating the 3Gbit switch. Please read carefully the instructions here.

RENDER TIPS: