3dsmax render multiple configurations

Hello all I am new to Deadline and I’ve got a question about rendering a model in a lot of different configurations without the need of opening the 3dsmax file and manually making the unique configurations.

For example:

I have a base model of a car and the file contains multiple layers with different types of wheels, spoilers, colors etc etc…

My idea is to let deadline launch the file and then do a post load script. when the file get’s opened all the wheels and extra stuff would be hidden, then the postload script would unhide either layer A or layer B and then render a

sequence of frames in that given configuration. Then close the file without saving it and the next job would be to open the same file but unhide and render a different configuration.

A hierarchy in the max file would be.

|-----Base model
|--------Wheels
|-----------Wheel_A
|-----------Wheel_B
|-----------Wheel_C
|--------Lights
|-----------Light_A
|-----------Light_B
|--------Spoilers
|-----------Spoiler_A
|-----------Spoiler_B

Only one option per category has to be activated on render time.
Base model, Wheel_A, Light_A, Spoiler_A
then the second render job could be Base model, Wheel_C, Light_A, Spoiler_B etcetera resulting in lots of different combinations.

Now I want to use an external xml file (or any other format) that defines all possible combinations and let deadline submit each different configuration as a separate job to the render queue.

So based upon a single max file and a single xml I want to render lots of different configurations. From this info I would like deadline to generate multiple different jobs, and it should also generate postloading script that have to go

with the job to actually tell max to render the correct combination of layers and colors.

The output name of the render would also be dependent on the config so it could be: Car_Wheel_A_Light_B_SpoilerA.png

I think it would be wise to split up the process in two parts. the first one would be to generate all the pre render scripts. and the second process would be to submit all the pre render scripts as a unique job.

What would be the best way to approach this whole process?

Thank you in advance,

Ron

Sounds like “Stage Sets” to me? Have you checked into those?

That would stil mean that I would have to make every single state set (in the given example hierarchy thats only a couple but in the end it will be lots and lots more) and if a change would happen to some part I would have to change it in every single state set. But thank you for your reply

This should be quite easily doable.
You have several possible approaches though, with different pros and cons.

One way would be to write a simple Submission Script in Max that sends N jobs to Deadline. It would perform the unhiding and preparing of the pass, setting the output file etc. and resave a temp. copy of the scene before submitting it. The drawback is that if the file is large, the saving and submitting would waste a lot of time.

A variation of the above could be done by sending ONE job to Deadline as a Workstation Mode MAXScript Job. That job would open Max in Workstation mode (with UI and using a license), and would then spawn all the other jobs, so your own desktop machine would be freed up to do other things. Then the slaves would run the produced jobs and save the various images with the correct layers.

The alternative is what you described - if you are interested in only rendering a single image, you could pass a Post Load script that reads the current Frame (Task) number, and unhides a different set of layers based on that. The output filename would be the same, with just the frame number changing.

If you need to render animation sequences though, the above approach would not work, because modifying the output filename from the Post Load script would not be possible - it is enforced via the controlling Lightning.DLX and would not stick if changed via script. The same limitation applies to changing the camera on the fly from the Post Load script - it is asking for trouble.

There is also a combination of the two major approaches described above - you can take the existing single file, and store it in the info file as an external reference (just by file path) without copying it to the Repository. As long as the file is on a network share and all render nodes can see it, they will all be able to load it. Your submission script would send the file N times, once for each variation, and also set the output filename, camera and whatever is needed in the Job Info files. You can pass arbitrary values in those files, and you can attach a post load script that can read these custom values to know which entry from the XML it is supposed to process. So the hiding/unhiding would be performed in the Post Load script based on some flag written to the Job Info file during submission, and no Max file will be saved/submitted at all with the many jobs.

This last approach is what I would do if I were in your place :slight_smile:

Hope this helps. Please let me know if you need more details.
Also be sure to take a look at the Simple MXS Submission Tutorial here:
thinkboxsoftware.com/custom- … ission-tu/

Thank you for your answer Bobo,

The last way you described sound best to me.
I will go and have a look and see if I can figure out how to get this working.