trankillity
06-22-2006, 05:49 AM
Hi there everyone!
I'm working on my first MaxScript but am quite experienced in many other scripting languages so the constructs are nothing new to me. I'm hoping that someone can help me with a few problems with my script.
We are currently involved in a lot of different architectural visualisation projects and use VRay as our renderer. We pre-generate VRay Lightcaches and Irradiance Maps for all our scenes. Setting these scenes rendering is quite an arduous task sometimes taking up to one hour per camera to set rendering because we first have to set the light cache rendering then set the imap rendering with the light cache as a pre-requisite then finally set the render going with both the light cache and the imap as the pre-requisites.
What I'm attempting to do is automate this process by creating a MaxScript that prompts a user for a single output directory then changes the relevant settings and effectively renders the scene three times (once for light cache, once for imap and finally for the render itself) to an RPF stream in the selected output directory. The MaxScript will also prompt the user for a base RPS file to determine the quality settings to be used for the render.
So far I'm able to prompt the user for the destination directory, prompt the user for the render preset file, change all the relevant rendering settings in common properties and in VRay renderer properties and I am able to output the .vrlmap (light cache), .vrmap (imap) and .rpf (render) files.
Unfortunately these can only be done one at a time as it currently stands and I have only managed to achieve this in a fairly rudimentary way. I am using the render() command for the light cache and imap but if I use render() for the frames themselves it appears to ignore the render dialog box settings and doesn't output the .rpf file. This is the first of my issues, which are all inter-related and can probably all be solved by solving the major issue I have; NetRendering.
I wish to be able to farm this process off to our render farm but am not entirely sure of the process to achieve this. The MaxScript documentation on NetRender functionality is confusing and doesn't make sense to me. I would love to be able to automate it such as is loosely outlined below:
Render "vray.vrlmap" Light Cache file on a specific machine in a network render cluster with a critical priority level
Render "vray.vrmap" Irradiance Map file on the same machine as step 1 with a dependancy on step one being complete also having a critical priority level
Render "frame0000.rpf" final rendered output on all machines in the render cluster being dependant on steps 1 and 2 having a custom specified priority level
I would like the above steps to be submitted from a single machine using a one-button approach with my script.
The main things that I wish to know are; (a) Can I get Max to act as if it just hit the render button in the render dialog box? This solution would be superb as I can already change all the properties in the render dialog and (b) How can I set up a relatively advanced net rendering system as I have outlined there that will take the render settings from the current render settings without having to parse them all through the net render commands?
Thanks in advance for any assistance on this matter, if you require any further information or clarification don't hesitate to ask.
Cheers,
Sebastian
I'm working on my first MaxScript but am quite experienced in many other scripting languages so the constructs are nothing new to me. I'm hoping that someone can help me with a few problems with my script.
We are currently involved in a lot of different architectural visualisation projects and use VRay as our renderer. We pre-generate VRay Lightcaches and Irradiance Maps for all our scenes. Setting these scenes rendering is quite an arduous task sometimes taking up to one hour per camera to set rendering because we first have to set the light cache rendering then set the imap rendering with the light cache as a pre-requisite then finally set the render going with both the light cache and the imap as the pre-requisites.
What I'm attempting to do is automate this process by creating a MaxScript that prompts a user for a single output directory then changes the relevant settings and effectively renders the scene three times (once for light cache, once for imap and finally for the render itself) to an RPF stream in the selected output directory. The MaxScript will also prompt the user for a base RPS file to determine the quality settings to be used for the render.
So far I'm able to prompt the user for the destination directory, prompt the user for the render preset file, change all the relevant rendering settings in common properties and in VRay renderer properties and I am able to output the .vrlmap (light cache), .vrmap (imap) and .rpf (render) files.
Unfortunately these can only be done one at a time as it currently stands and I have only managed to achieve this in a fairly rudimentary way. I am using the render() command for the light cache and imap but if I use render() for the frames themselves it appears to ignore the render dialog box settings and doesn't output the .rpf file. This is the first of my issues, which are all inter-related and can probably all be solved by solving the major issue I have; NetRendering.
I wish to be able to farm this process off to our render farm but am not entirely sure of the process to achieve this. The MaxScript documentation on NetRender functionality is confusing and doesn't make sense to me. I would love to be able to automate it such as is loosely outlined below:
Render "vray.vrlmap" Light Cache file on a specific machine in a network render cluster with a critical priority level
Render "vray.vrmap" Irradiance Map file on the same machine as step 1 with a dependancy on step one being complete also having a critical priority level
Render "frame0000.rpf" final rendered output on all machines in the render cluster being dependant on steps 1 and 2 having a custom specified priority level
I would like the above steps to be submitted from a single machine using a one-button approach with my script.
The main things that I wish to know are; (a) Can I get Max to act as if it just hit the render button in the render dialog box? This solution would be superb as I can already change all the properties in the render dialog and (b) How can I set up a relatively advanced net rendering system as I have outlined there that will take the render settings from the current render settings without having to parse them all through the net render commands?
Thanks in advance for any assistance on this matter, if you require any further information or clarification don't hesitate to ask.
Cheers,
Sebastian
