From Maya, I’m exporting Ass files using the SubmitMayaToDeadline interface.
I’d like to specify a script that would be executed by the slave in the farm prior to export the Ass file.
For example: before translating the maya file to ass files, the slave would (let’s say) move the main character down 2 units in Y.
While I am not sure what kind of script would be needed to do that, I do think a pre render or startup script could, hypothetically, facilitate what you are looking for. If you have found these options wanting, could you please clarify how you would do this, via a script, outside of the Deadline application, so we can try to find a way to make it work? Thanks.
Thank you for you prompt answer.
I manage to get it to work with a pre-render script, using the dedicated field in the common tab of the renderGlobals.
I don’t know how to use a startup script.
My plan is to be able to bypass Maya’s renderLayers, and use a pre-render script per pass.
For example, I would have a python script that applies an occlusion shader to all the objects in my scene, and hide the lights.
This would make my “Occlusion pass”.
Then, another python script would apply a surface shader with a random color to each object and hide my lights,
This would be my “ID pass”.
If I could give these 2 scripts to Deadline, it would submit the job twice, using the same maya scene, but applying the proper pre-render script at render time.
I used to work with such a system in 2 big VFX companies, but they had their own in-house farm manager/submiter.
Following the above example, right now, I would have to save 2 scenes, strictly identical, but with 2 different pre-render script in their renderGlobals. This is far from being ideal.
I would think a batch file to run the two scripts in sequence should be doable, though I would have to check on the feasibility of that. I do understand the process you described is not very efficient.
I would likely build a simple library of functions, add your library directory to Deadline’s “PythonPath” under the “Configure Repository Options”. You could then trigger the right scripts and changes from a master python script based on information from either extra fields in the plugin info file, or from a submitted auxiliary file.
If that sounds like a decent solution, I can dig up the relevant links.
Sorry for the late reply.
I’m afraid I didn’t quite understand your last post.
So let me explain what works for me at the moment, and then what I’m missing.
In a Maya Project, in the script folder, a user can edit a python script based on a template I’m providing.
This python script defines a function per “pass”, a bit like this:
def BTY():
subdivide( hero, 2) # will subdivide the hero character twice
aaSamples( 5 ) # will set Arnold samples to 5
def ID():
subdivide( hero, 2)
aaSamples( 5 )
red( hero )
green( background )
blue( floor )
etc.
Then, in order to submit the scene to the farm, I use my own GUI which at the end runs the
deadlineCommand SubmitCommandLineJob
with “render” as executable
and "-preRender ‘import pythonScript; pythonScript(BTY)’ " among the arguments, for the case where the user wants to render the BTY pass.
or "-preRender ‘import pythonScript; pythonScript(ID)’ " among the arguments, for the case where the user wants to render the ID pass.
My GUI allows for multiple selection (BTY and ID) and a loop runs the deadlineCommand per selection accordingly.
This is working great.
But… what I’m missing is:
in deadline monitor, I can’t just double click on the tasks and play the sequence once rendered (with framecycler for exemple), nor can I browse the the output path from there. In fact, deadline monitor doens’t seem to know what the output directory is (it doesn’t tell in the job details tab).
I’m using a batch render solution, but would like to know how to actually have deadline make a certain number of slaves export Ass files, and everytime one is created, another slave would start rendering it (that’s actually 2 questions, first is how to have slaves load the scene, apply the preRender script and translate the frames to Ass files. The second is how to have other slaves pickup a Ass file as soon as one is created, and render it, while the other ass files are still being created, rather than translating all ass files first then rendering them all).
Sorry if this is not very clear, I’m trying to explain this issue the best I can.
And thank you for your last prompt replies.