Redirecting ray3 output


ray3.exe outputs to STDERR, so you cannot simply do this:

ray3 -v 6 test.mi > out.txt

You have to do something like this:

ray3 -v 6 test.mi 2>out.txt

In the above command, 2>out.txt redirects STDERR to the file out.txt.

Or you can do this, which redirects all output (STDOUT and STDERR) to out.txt:

ray3 -v 6 test.mi >out.txt 2>&1

References:

xsibatch -script -render


By combining -script and -render, you can use a script to set up a scene for rendering. xsibatch loads the scene, runs the script, and then does the render.
Any changes made by the script are not saved.

You can also use -script with -export flag. For example, if you wanted to change the output folder for .mi files, you could do this:

xsibatch -processing -export \\server\share\xsiDB\Scenes\test.scn
-script tmpChangeOutputDir.js -frames 1-5 -pass all

where the .js file changes Passes.RenderOptions.OutputDir to the desired output location.

Using ray3 to help the render region in XSI


I actually did not know you could do this. But I was speaking with a customer the other day who does this. He is using his mental ray standalone licenses to get 16 CPUs help out his render regions (there is no limitation on the number of ray3 “satellites” that you can use).

This is an example of “standalone” distributed rendering, which is like “satellite” rendering, but with ray3 and mental ray standalone licenses.

You just have to fill in your ray3hosts file with the names of the ray3 slaves.

Shaders loaded by XSI


In general, mental ray, from inside XSI, only loads shaders from $XSI_BINDIR and $XSI_CPU_OPT.
Both these environment variables are set in setenv.bat (.xsi_7.X on Linux), unless the ray3rc location has been overridden by MI_ROOT.

So if you find that XSI is looking for shaders in the wrong place (eg you are getting black tiles/images rendered), then check that MI_ROOT is not set system-wide to an old location.

h/t: Halfdan