Setting V-ray render options from 3dsmaxcmd.exe

Is it possible to configure the Vray renderer from the command line? I wrote a small maxscript, called `prevray.ms`, that looks like this

vr = renderers.current
vr.system_vrayLog_file = "c:\vrayfoo.txt"

Then execute as
3dsmaxcmd.exe -preRenderScript:prevray.ms myscene.max

But it doesn’t seem to be affecting anything. Is the the prerender script executed before 3dsmax loads Vray, and therefore “renderers.current” is not set correctly?

Is it possible to do this at all?

Generally, when the pre-render script is called, rendering has already started and most of the renderer parameters are already cached by V-Ray. Setting the log file name in particular should work fine though… I have to check what happens with it.

Best regards,
Vlado

Hi Vlado - Thanks for the reply. Changing the log file isn’t really want to accomplish in the long run. I’m really wanting to automate the generation of the irradiance map. So, I’ll be setting `vr.options_dontRenderImage`, and `vr.*_irradmap_*` options.

Changing `vr.system_vrayLog_file` was a simple proof-of-concept, that I thought would be easy to see if scripting Vray from 3dsmaxcmd was possible.

I build a Backburner job generator for that.

First Job renders GI and save it to file.
Secon Job is susspend by default and gets startet by PostRenderScript from the First Job.

This works very well.

You can pass a render preset on the command line, so that might work as well.

Best regards,
Vlado