To install mental ray manually in a distributed environment, follow these steps:
1. Log on as root.
2. Place a copy of the mental ray directory on each machine you intend to use as a render server. There are two options:
- For easier administration, it is recommended that you place a single copy of mental ray in one location on the network. This is more convenient for upgrading and configuring, but it increases network traffic and may slow down processing.
- For faster rendering speeds, use multiple file servers. Make sure that mental ray is installed on a local drive; do not use NFS mounted volumes. Make sure that mental ray is in exactly the same place (such as /usr/mental_ray/bin/ray.irix5) on each machine, or else the distribution commands will not work correctly.
3. Define a TCP service on each machine in the /etc/services file (the service number is user-defined and must be the same on all machines). It is recommended to use 7001, the default set by the SOFTIMAGE|3D Setup program. For example:
mi-ray 7001/tcp ray #mental ray
mi-ray2 7002/tcp ray2 #mental ray
If you are running YP/NIS, don’t forget to set this correctly in the Yellow Pages; that is, set this only on the NIS server. Remember to perform a ypmake after this and don’t reboot the server.
You must now define how each rendering server will respond to a request on the mi-ray service; that is, to which command it will spawn in reaction to the request. Note that you must do this on each machine that will act as a rendering server, even if you use NIS.
4. Search for the line in /usr/etc/inetd.conf that describes the rlogin server. It should look like this:
login stream tcp nowait root /etc/rlogind rlogind
Add a similar line describing the ray server. For example (this should all be on one line):
mi-ray stream tcp nowait nobody
/usr/softimage/Soft3D_4.0/mental_ray/bin/ray
/usr/softimage/Soft3D_4.0/mental_ray/bin/ray –server
mi-ray2 stream tcp nowait nobody
/usr/softimage/Soft3D_4.0/mental_ray/bin/ray2
/usr/softimage/Soft3D_4.0/mental_ray/bin/ray2 –server
If you are not using the FLEXlm license finder, you must use the ray.sh/ray2.sh shell script. This script defines an environment variable needed by FLEXlm. In this case, the line describing the ray server should be similar to the following line (again, this should all be on one line):
mi-ray stream tcp nowait nobody
/usr/softimage/Soft3D_4.0/mental_ray/bin/ray.sh
/usr/softimage/Soft3D_4.0/mental_ray/bin/ray.sh –server
mi-ray2 stream tcp nowait nobody
/usr/softimage/Soft3D_4.0/mental_ray/bin/ray2.sh
/usr/softimage/Soft3D_4.0/mental_ray/bin/ray2.sh –server
For an example of a shell script file, see Sample.
Note: Make sure you specify the correct path for mental ray (the default installation path is used in the above examples).
There are several things to know about the previous line:
· The fifth word is the user ID that is used to execute the command. You can set it to any user ID, including your own. The software executes it with this user ID (including shaders).
- If you set it to nobody, make sure it has a valid gid (group ID number). The default gid is -2.
- If you set it to root, shaders are executed with root permissions, and this can be a security breach. It also depends on who you want to be allowed to kill rendering servers.
· You must specify the correct and full path of the rendering executable. If you upgrade to a newer version of mental ray, make sure that you are running the proper one.
· Don’t forget the -server option!
5. Reinitialize the inetd dæmon with the following command:
/etc/killall -v -HUP inetd
You should get the following message:
killing PID xxxx <inet>
Due to TCP timeouts, this can take up to 5 minutes. You can also check /usr/adm/SYSLOG to see if the initialization succeeded or not. If it failed, there will be an error message related to mi-ray in the SYSLOG file. If the executable is not accessible, the initialization fails.