Script for rendering

Does anyone knows how to make a script that:
- renders one image, low resolution - for irradiance map calculation
- save file
- Then render again using the calculated irrad map in hi res? Saving a bitmap.

I think it´s very easy for someone that know anything about script.

Using backburner, setup a irrmap rendering (with the save and switch on completion settings) and submit it. Then, setup another rendering that uses the irrmap from file (point it to the filename that will be written from the previous job) and submit it to backburner, using the dependency settings in backburner to make it dependent on the other job finishing.

Voila! No scripting necessary

But as I know, after rendering in backburner the irrad map don´t save I don´t know why.

it would be pretty easy, look up ‘Controlling the Renderer’ in the maxscript reference.. command line rendering is also a neat one to look into if you’re feeling frisky.

the maxscript possible variables for editing the renderer can be had by doing a: ‘print (getpropnames renderers.current)’ in the maxscript listener..

the relevant ones to save are:
renderers.current.adv_irradmap_autoSave = true
renderers.current.adv_irradmap_autoSaveFileName = “C:\\test.vrmap”
renderers.current.adv_irradmap_switchToSavedMap = true

and to load
renderers.current.adv_irradmap_loadFileName = “C:\\test.vrmap”

to do it all automatically you probably need to look into callbacks too, which can be annoying for new to scripting folks.

Basically, dyndains way works easier, but if you want to learn, go ahead :slight_smile: