Rendering with Custom Scene States...

Ok Excuse the slightly rambling post… But I need to come up with a solution to a fairly complex problem and without being too specific here.

Currently 3dsmax r9, Deadline 4.1, Vray 2.01

I need to render out from 1 file, but with about 100+ different options, which include different layers needing to be on, different objects visibilities, different materials for different objects. Ideally all into a predefined folder structure.

So I currently have UI for jumping between all the information, but there’s no way to animate between everything. I don’t want to set up 100 different passes manually as the file is just too heavy to save that many times.

What I would like is for upon opening on the renderfarm Deadline to load the scene and then load the preferences that I have specified, which would include, hiding objects, setting visible to camera, matte objects layer options and material options and the renderoutput path…

So ideally, I have an output from my UI which gives a struct for each render pass and puts this into persistent globals (or to a file) and then I have a pre-render script which loads all this information and Renders to the File.

I’m happy enough writing the scripts but how much can I ‘interfere’ with Deadline with a post-load script? I should be able to modify the properties of the objects on a post-load script but what I want to be able to do is;

a) Know which frame number the job is rendering to be able to get the appropriate struct - eg Datastruct[currentframe].rendername
b) Modify the output path that Deadline will use.
c) Modify the RenderElements Path

The script will have to run on post-load for every frame, so it has to reload the file before each render… (unless I can work out a work-around of one of my other problems which is slightly destructive to the scene)… unless there is a simple way with maxscript to ‘undo’ the actions.

If I was use a ‘MAXScript Scene Processing Job’ if you have a range of frames to render does this maxscript job pass the frame number to the slave via an accessible variable?

Ok Hopefully i’m not rambling too much…

Thanks in advanced for any useful info.

Rgds

Dave

Oh and forgot to mention it’s animated as well. So I may need just 10 frames but I want to render 10 frames x 100 options so 1000 Frames in total (for example)

Hi Dave,
Have you considered Render Pass Manager?
Sounds like the most configurable and fastest thing to deploy solution here, unless you fancy quite a bit of scripting :slight_smile:
Mike

RP Manager doesn’t quite allow me to do exactly what I need to do, would mean I’d have to set up thousands of passes in RP Manager.

I’m never affraid of a bit of coding, and with one days work I’ve just about got it all working :slight_smile:

sounds like you have it under control - but if you get in a bind in the future, we are planning on adding professional services to our offering: we will have a TD on staff for scripting, and we have access [of course] to the developers to customize or build a toolset based on the huge library of code that we have.

cheers

chris

…and that TD has spent the last 3 years doing render pass management pipeline stuff on G.I.Joe, Avatar, SuckerPunch and some more :wink:

Dave,

The solution I implemented back then at Prime Focus was to store the changes to the scene (or, later, all relevant layer and object visibility/material/whatever info) in external MAXScript files. For the object properties, I wrote my own binary format. A single MAX file would be saved to disk and then sent to Deadline together with the corresponding script file describing the “pass”. The slave could then load the base scene, run the script and render the modified scene. At some point the loading of the pass data was so fast that we started doing this at submission time on the workstation, but both approaches are possible.
Since the passes were stored externally from the MAX file, they could live on a network drive and would not affect the scene file size, while being of arbitrary size depending on the scene (our last project had so many objects it wasn’t even funny).

Cheers,
Bobo

Yeah, i was trying to keep it a little bit of a secret, bobo! :astonished:

just kidding, go about your business. nothing to see here. :sunglasses:

cb

Hi Bobo,

I’m a big fan of the pipeline tools you showed from GI Joe, I’ve gone through analysing every interface section from every making-of video that Prime-Focus released and I’ve basically developed something on my own development path which is fairly similar, albeit it a lot simpler. If I had more time I guess it would probably be very similar to what you guys made. But our projects aren’t currently big enough to warrant my R&D time on it annoyingly!

I have a major problem with my render pass manager, I’ve basically created an interface that builds Render Tasks ‘Structs’ and puts them into an array… works locally fine… and the persistent globals stay with the file when re-opening in workstation mode, but I get a problem on Deadline.

persistent global AR_Tasks
AR_Tasks = #()
Struct Task (ID, Frames, Output)

Persistent Global newtask = Task ID:1 Frames:2 Output:“c:\test\test01.tga”
append AR_Tasks newtask

Then in as a Deadline MAXScript Scene Processing Job my script is failing here in the code…

for task in AR_tasks where Task.id == currentframe do

throws the following error…

=======================================================
Exception during render: An error occurred in RenderTasks(): RenderTask: Unexpected exception (Exception caught in 3ds max: – Unknown property: “id” in undefined
2011/06/29 18:08:21 INF: Loaded C:/Documents and Settings/remote/Local Settings/Application Data/Prime Focus/Deadline/slave/jobsData/MASTER_03_dw.max
2011/06/29 18:10:51 INF: Job: C:/Documents and Settings/remote/Local Settings/Application Data/Prime Focus/Deadline/slave/jobsData/MASTER_03_dw.max
)
at Deadline.Plugins.ScriptPlugin.RenderTasks(Int32 startFrame, Int32 endFrame, String& outMessage)

Any Ideas?

Are you declaring the Task struct as global in the maxscript you’re submitting to Deadline? Seems like this problem might be similar to this one:
viewtopic.php?f=11&t=5343&p=21657&hilit=global#p21657

Also, do the scripts that actually declare the Task structure need to be loaded by the slaves when they render? Or does the persistent option embed that in the scene file.

Sorry for the somewhat noob response, but I think Bobo may be on vacation, and I would like to help out if possible. :slight_smile:

Cheers,

  • Ryan

Ok my contents of the Struct aren’t being persistent…

Well the workaround is to make it an Array of Arrays instead of Structs, I’ll work with this for now until Bobo returns and can offer me a conclusive explanation as he normally does!