Deadline 3DSMax sanity check

We have a small question regarding Sanity Check feature of 3ds Max plug-in. As we all know, deadline is shipped with a great Job Submission scripts that can be integrated with 3ds Max and used to submit jobs directly from 3ds Max. Submission scripts can perform various Sanity Checks to the project.

We think that Sanity Checks is an awesome feature that saves a lot of time and work. We want our users to submit jobs via Deadline Pulse Web Services, and we are currently looking for a way to allow them do a Sanity Checks after sending project files to our Farm. Is it possible to run the Sanity Check scripts against the 3ds Max Project without actually running the 3ds Max ? Is there a way to automate this process to be able to invoke it externally ?

Any tips and suggestions would be much appreciated here.

Thanks in advance,
Grzegorz

Hi!

The Sanity Check and the Submit Max To Deadline dialog that triggers it are both MAXScripts, so they require 3ds Max to be running and the scene to be checked to be open. There is no way around it since no external program can query all the possible issues without access to the 3ds Max core features, and MAXScript cannot be run externally.

Can you explain in simple steps how you envision that Sanity Check to run and why?
What would be the purpose of a sanity check that runs AFTER the submission has been performed?

It would be possible to implement a version of the Sanity Check as a pre-render script on the Deadline Slaves - it would then fail the task if the check did not pass, thus producing Errors on Deadline. It could even fix some minor errors automatically, if set up correctly. If that’s what you hope to accomplish, it would be possible (but isn’t possible right now).

Hi Bobo !

We simply don't want our users to submit jobs to the rendering queue if their project has some obvious errors. We would like to verify and warn users if their project is incorrectly set up before they start rendering their jobs. We also don't want to force them to install anything on their machines in order to verify their project.

We thought about a way to run the sanity checks from command line or something similar. It would allow us to automatically check project sent to us by our users. Pre-render scripts sounds promising, but we were thinking about doing it even earlier in the process. But this at least gives us some starting point.

We have similar problem with reading content of the *.max files. We would like to determine the camera names used by users in their projects. We want to help them, and present a drop-down menu with camera names so they don't have to type anything (just selecting a camera before submitting job to Deadline). We spent quite a while looking for this but no luck so far. It's not exactly a Deadline question but maybe you know some tricks :]

Thanks,
Grzegorz

I guess you assumed I knew who you were :wink:
I don’t, but it sounds like you are running a render service where other people submit scenes for rendering? Or a university render farm?
Is this correct?

Hi Bobo !

We already have a Deadline-based render farm and it is working great for selected people that have remote desktop access to our machines. We want to expose www-based interface to our farm for all students from local universities. We want to provide rendering service to people from architecture, computer science and few other faculties.

Students are usually rendering stuff on their personal machines and we're afraid that they will submit incorrectly set up project to the farm. We also want to help with selecting the rendering parameters, thus we want to suggest as much things as possible. 

If our solution will work for local students, we also want to open it as a commercial service to other people.

Hi Grzegorz,

But if you are allowing external users to use the render farm, you could expect them to at least download and install one script in their 3ds Max copy to make sure the file is correct. In fact, we could mark the MAX scene as “Sanity-Checked” in a file property so that your Web Interface for submission would refuse to submit it unless it was checked. :slight_smile:

All we would have to do is take the existing Sanity Check and provide a separate MacroScript to run it without the Deadline Submitter.

The alternative would be to submit the scene to the render farm to a separate pool where it gets loaded and checked by a dedicated slave, and then resubmitted to the “main” pool for rendering only if it passed the Sanity Check. But at that point we can only reject it or pass it through, but we cannot return it to the user for fixing. So I feel this is a step too late. Of course, we could do both - provide a tool for the user to check before submission, and check a second time on the farm before passing it on to the render machines.

Cheers!

Hi Bobo,

Thanks for the ideas. In fact we already thought about extracting the Sanity Check from the whole submission script. Do you think that thinkbox could provide a standalone version of the Sanity Check ? So that it could be a separate, self contained script that could be send out to users for pre-rendering checks ? I'm not sure how much effort would it be, and is it possible and legal to use this source code outside the official Deadline product.

A dedicate slave would be even better, but then I'm afraid of the performance of such solution when there will be a more users running a check. But with a fast enough machines it might succeed. Maybe we could also tweak the scripts to dump the results into plain text files, to be able to get responses from sanity check. 

Anyway, as you wrote there is no easy solution for this problem an it seems that we'll have to spend some time thinking about it. 

Thanks a lot for all ideas,
Grzegorz

The Sanity Check is already pretty much self-contained. Right now it is only exposed via a button and a checkbox in the Submit Max To Deadline (SMTD) dialog, but it would take literally 5 minutes to make it a MacroScript and let anyone run it even if Deadline is not installed.

I will take a look at it tomorrow. I don’t see a problem, esp. if the Sanity Check script will be used to pre-check files before sending them to a Deadline-controlled farm. Also, we have already made it possible to introduce custom checks and fixing functions, so it is prepared to be used as a general purpose tool…

If you could provide a tool like this it would be just awesome. We would definitely send it out to all people willing to render on our farm. This will check the project before uploading, so I’m sure that it will save a lot of people a lot of swearing (especially when it’s 2 a.m. and you need your master thesis project to be rendered asap :] )

I took a look at the code.
As mentioned already, making the existing Sanity Checker open on any machine is trivial - as long as the 3 related files are loaded in the right order, just calling the function SMTD_PerformSanityCheck() opens the dialog and it works.

There is a problem though. The Sanity Check currently assumes that the SMTD Settings and Functions are already loaded. Half of the checks depend on these structs to be present, in other words the whole Submitter must be loaded for the checks and fixes to apply.

There are two possible approaches here - either make an “offline” version of the Sanity Check that does not perform any of the checks that try to access the SMTD settings, or safeguard all these places via try()catch() to avoid crashes if the Sanity Check is run without the SMTD being initialized. The former approach would mean having two separate versions of the script (which I don’t like). The latter approach is not very clean.

Unfortunately, both will require some time to think about and then some time to deal with the code. So it won’t happen in a day :frowning:
But it looks very doable. Will keep you posted.

Thanks for checking it Bobo. I guess that the only option for now is to prepare a good documentation on how to prepare project before submission and what things to check to avoid problems.

But anyway thanks a lot for responses, you probably saved us an hours of searching :]

Thanks,
Grzegorz