AWS Thinkbox Discussion Forums

Obscurity of CoronaDR submission via custom Python script

Hello!
I’m facing some issue which could be very obvious for you but I’m stuck and don’t know how to deal with it.

Well, I have my master PC where I’m submitting my 3ds Max scene (via CoronaDR plugin) with my custom Python script (at least I’m trying to make it :D). Everything seems fine, my another PC, which is “slave”, launches the DrServer.exe and 3ds Max’s rendering status bar without any errors or anything.

But the problem is that the render doesn’t start, and the status bar says “waiting for render start”. At the same time, you can observe that this computer is displayed in DrServer.exe as a “slave”. But the “master” section is empty. It is logical to assume that this is the problem. The computer just waits for the “master” to appear and only then will it start rendering.

Maybe I don’t understand something, but how do I get my slaves PCs to render if I submit the task not through the integrated submitter in 3ds Max itself, but through my custom script?

Perhaps the problem is in my script, which should specify that the slave PC should be the master PC at the same time, but I doubt it, since a similar problem occurs even if you submit the task through the interface of Deadline Monitor itself.

Again, the answer is probably obvious, but I’m at a dead end. I have to ask for help :pleading_face:

Just to be clear, so that it is easier for you to understand what I am trying to achieve.
Here is the simplest possible explanation of what is happening to me:

So the “master” is the machine which must be running 3ds Max interface visible, right? But is there an option to submit the Deadline job using any Deadline plugins (3ds command/3dsmax/coronadr/corona?) without 3ds Max interface and manual rendering start? (I mean without clicking the Start Render button inside the 3ds Max’s interface).

Because for now, I have several render nodes (PCs) which are “slaves” according to the DRserver.exe and they are waiting for the master PC to start rendering. But they won’t wait for the master because job was submitted by the custom python script, not with the integrated submission plugin in the 3ds Max interface. That’s why the render wouldn’t be initiated. Only if I run the 3ds Max application and start the rendering manually.

@Justin_B @mois.moshev you guys helped me last time with my stupid questions, could you help me now one more time? :sweat_smile:

As far as I know for Corona DR a human has got to hit the ‘start render’ button, so you may be out of luck on this one.

But I know next to nothing about Corona DR, just how it’s run by Deadline so I expect I’m wrong.

1 Like

Yes, that’s the problem. I’m trying to figure out if it’s possible to somehow run distributed rendering without pressing the start button by a human. Maybe this can be done through other plugins, but the main thing is that these plugins work with Corona Renderer (I mean, support it) :face_holding_back_tears:

Is there any way I can contact Deadline tech support directly and find out about it? If so, how do I do it?

I apologize for the ping and the concern (You may have missed my message), but I still want to clarify who should I contact with my question? :sweat_smile:

No worries - I’m a part of Deadline’s support. I’ve got no clue how you’d make Corona DR start rendering programmatically.

I don’t have time this week, but if you’re rolling your own custom script I’m hoping digging into someone else’s code isn’t too spooky.

To that end I’d go hunting for the ‘Start Render’ button’s backing code in the 3dsMax submitter’s code (“C:\DeadlineRepository10\submission\3dsmax\Main\SubmitMaxToDeadline.ms”) and see what it does. Deadline’s not doing anything that cannot be done with an API or maxscript, so the answer should be in there.

My usual tactic is to use the names of buttons as used here to figure out what’s calling what.

On that CoronaDR docs page there’s also this section that discusses rendering without submitting in Max, but it still ends in a “. . . you can initiate the distributed render manually from within the application” which leaves us no further ahead.

So setting up the Deadline job is easy, the hard bit is initiating that render.

1 Like

Thanks a lot for the reply!

Yes, you’re absolutely right. The documentation does not say anything about how to initiate distributed rendering without using the 3ds Max interface, or whether it is possible. In theory yes, it should be possible if you make an additional script for 3ds Max (maxscript) to my custom script for deadline.
By the way, yes, I found some information in the 3dsmaxCoronaDR2Deadline.ms file:


on btn_startRender pressed do
		(
			-- Corona renderer
			if getRendererIdString() == "corona" then
			(
				-- Check that DR is enabled before rendering
				startRender = true
				if not renderers.current.dr_enable then
				(
					if queryBox "Corona distributed rendering must be enabled before starting the render. Would you like to enable it now?" title:"Question" then
						renderers.current.dr_enable = true
					else
						startRender = false
	)

				if startRender do
				(
					max quick render					
						Ui_report ("+Render Finished.")
                    if chk_autoComplete.state then
                    (
                        CompleteJob()
                        Ui_report (">Job has been Completed.")
                        ResetServerControls()
                    )

But creating another script and embedding it into my automation chain certainly worries me a little :smiling_face_with_tear:

I just wish everything would happen natively via Deadline without the need to use any third-party tools. And manually launching rendering via the 3ds Max interface is also not suitable for me anyway, since it takes time to launch the program and press the buttons manually. Also, for example, my colleague sends me the scene and some errors appears there (for example, not critical notification may appear that I am missing some internal 3ds Max plugin or texture, but it will not affect the rendering in any way), then the whole script will automatically break and I will have to deal with the errors.

Long story short, if it’s not too much trouble for you, then I’m ready to wait when you have more time (next week, I guess? :sweat_smile:) so that you can give me some kind of tip in which direction I should work.

And if there is no alternative to what I described above, then I will have to accept this fact :confounded:

I think you’ve found the direction to work in already :smiley:

Deadline just runs other applications, you’re going to have to pull in Max if you want to control Max.

1 Like

I got you. Thanks for the help. I’ll try my best :hugs:

In case I have any more questions in the process, can I ask you directly in private messages or continue replying in this thread?

Sounds good! Use the thread, that way anyone else who needs to learn what you have or will learn can benefit.

2 Likes

@Justin_B Okay, I’ve made some progress. However, there are several nuances here too.

I decided to use the 3dsmax plugin instead of CoronaDR.
Before start making my custom script for submitting, I decided to try to submit the task via Deadline Monitor (therefore, the hyperlink in the previous sentence redirects to 3ds Max - Monitor Submiter).

At first sight the functionality of this method of submitting has everything that is required to submit a job, and the workers will pick it up and start distributed rendering. But there is a problem here. In order for DBR to be possible you need to select the appropriate option in this list:

As you can see, there is no Corona option. You can tell that this means that the 3dsmax plugin just doesn’t support this type of render engine. (By the way, the 3ds Command plugin also has a similar rollout, but there is also no Corona). But that’s not the case, and here’s why.

To refute this theory, I decided to use the 3ds Max - Integrated Submitter directly through the 3ds Max interface. And if you open the integrated submitter, then in the Render tab you can find the corresponding rollout with a checkbox where Corona is mentioned:

Moreover, if you submit a job using this integrated submitter directly through the 3ds Max interface, the job will be successfully submitted, all available workers will pick up the task and simultaneously render my 3D scene as if I were using CoronaDR.

So, I couldn’t achieve the same effect using 3dsmax and 3ds Command plugins via Deadline Monitor, because:
A) if you don’t select anything from the drop-down list (the first screenshot above), then the work will be rendered on one computer only, which will pick up the task (it is logical, there will only be one task in the monitor).
B) if you select VRay DBR, for example, then the work will be divided into 2 tasks as expected but one computer will still render, since the second one will wait for the task from VRay, and not from Corona (this can be traced in the logs, since one of the slave computers will launch VRay DBR instead of CoronaDR and that’s logical too).

Even if you forget about this function and continue using the Monitor Submitter, other problems arise. I will not list everything but for example, in the Integrated Submitter there is such a rollout (screenshot below) that does everything correctly (exports all the necessary textures and other components along with the scene):

But there is no such function in the Monitor Submitter and the scene is sent to render without any textures and is rendered without them.

Long story short, the Monitor Submitter is apparently devoid of functionality. Is that so, or did I just not fully figure it out?

It’s just that if there is no such functionality in the Monitor then I won’t be able to make my custom script by accessing the Deadline Python API directly, since such functionality is simply not available. Maybe I’m missing something again because I’ve been dealing with these issues for weeks :hot_face:

@Justin_B Sorry to bother you but so far I haven’t been able to find a solution. Moreover, It turned out that even custom maxscript doesn’t help in solving the issue if you try to submit job through Deadline Monitor.
The fact is that I tried to submit the job by adding my maxscript to the “Pre-Load script” section (screenshot :point_down:), which forcibly ticks the “Corona Distributed Rendering” checkbox to “Enabled” (in the 3ds Max interface). But the problem is that if “Disabled” is specified in the “VRay DBR and Mental Ray satellite” section (screenshot :point_down:) when submitting via Deadline Monitor, then this disables any type of distributed rendering by default and my Pre-Load Maxscript will be ignored.

As I can understand, the settings that I set in this window have priority over everything else. Accordingly, I am at a dead end again.

What would you advise?

When you submit with this option what kind of plugin does the resulting job use? Right click the job in the Monitor → Modify Job Properties → Submission Params. These are the guts that make a job - there should be a ‘Plugin=’ in there somewhere. These files are what the submitters are building, so I’ll bet the answer to your issue is in there somewhere.

Yep, the Monitor submitters are always just enough to submit a job but no more. The idea being that dev work should go into the integrated submitter instead of the more restricted Monitor submitters.

I’d submit your ‘perfect’ job using the submitter and then steal the submission params from the job properties. That’ll let you emulate the job creation without having to puppet the submitters.

1 Like

I will add to what Justin has replied.

You are right the Monitor submitter does lack that because a lot of functionalities you see in the integrated submitter are not deployed in the Monitor submitter. Which is why for complex workflows it is recommended to use the integrated submission scripts.

I am not very familiar with the max script so I might not be able to help there. But I think you could compare two jobs when you submit with your script vs submitting from the integrated submitter. Is there any difference between the submission params of the two with regards to Corona DR options?

So, submit the jobs both ways and then from the Monitor go to the right menu options of the job> Modify Job Properties> Submission Params> You will find a export button on the right side> Click it > It will write two files. Compare both the files (job info and plugin info) check what is different between a job which works and and job which does not. Is there any difference? Maybe share the screengrab of the diff here.

You only need to build a job like the files from the correct job to be able to start the render.

1 Like

@Justin_B @zainali Thanks for the answers!
Yes, I tried to do what you described.

In the first case, when I submit the job directly through the 3ds Max interface using Integrated Submitter, then in the Submission Params in the list of Job Info Parameters, you can see that “Plugin=3dsmax”:

At the same time, in the Plugin Info Parameters list you can see that “CoronaDBRJob=true”:


(btw, there are a lot of other parameters in the Plugin Info Parameters list)

Then I submitted the job via Deadline Monitor by selecting the 3dsmax plugin. As you can see in the screenshot below, the plugin in this case is also 3dsmax. But there are much fewer parameters in the Plugin Info Parameters list:

Everything seems to be logical. The Integrated Submitter has more functions, so there are more parameters and the functionality satisfies me. Deadline Monitor Submitter doesn’t have such functionality, so there are fewer parameters and there is no way to activate Corona DBR. However, both of these methods are combined by one plugin - 3dsmax.

Now the question arises. How can I specify all the parameters I need, which were correctly specified in the case of submission via Integrated Submitter, in my custom script, which will access deadlinewebservice directly through the API (as I originally intended) and is it even possible?

As far as I understand, I just need to copy all the necessary variables from these two files and adapt them to my tasks:

image

By the way, here is an approximate piece of my basic script that will automatically submit jobs on request (this is just a simple example, the original script is not ready yet). As I can understand, here you need to specify all the necessary data for plugInfo and jobInfo?

@Justin_B @zainali I will answer my own questions :grin:

Yes, that’s right, you can steal all the parameters from the Submission Params, adapt the syntax to the json format and submit the work using my custom script. It turned out to be successful and DBR worked.

But this raises other questions. Let’s return to the topic of automating the entire process without human intervention. Imagine a situation where I have an archive with all textures and other files and the .max scene. I want to submit this scene for rendering in the way described above. To do this, I need to know the Job Info Parameters and Plugin Info Parameters, as well as specify the path to all textures and other files that were used in my 3D scene. Therefore:

A) How do I get the Job Info Parameters and Plugin Info Parameters data (without starting the .max scene manually and submitting it through the Integrated Submitter, and then copying this data from Submission Params in Deadline Monitor)?

B) How can I specify the path to all the scene files in my script or maybe in the Deadline Repository settings? (let’s say that all such scenes are stored in one folder, but each scene placed in its own named folder, and inside it there are already its own subfolders with textures, etc.)
(If you use the Integrated Submitter, then it did all this for me at the time of submitting using the Copy ALL External File References to Repository option (see screenshot below), using Asset Tracker as far as I understood.)

Could you clarify how you would do this, or maybe there are specific links in the documentation where it says about it?

The Job info and the Plugin info files are created as a part of the processing the scene data to Deadline. To automate this process, you would need to get an sample structure of the job you submit throught the submitter and do a manual submission of the job filling in the different setting and paths in the Deadline job objects. Here is a documentation on manual Job submission in Deadline: Manual Job Submission — Deadline 10.3.2.1 documentation

This submission is SMTD limited feature and it will be difficult to write a automation to run this without SMTD. Maybe you can just a add a cron job in the automation script to copy the scene to the Repo before submitting the job and then reference the Repo path of the external files in the job objects. This may not be an ideal option to roll into the setup and you could just use a network path for the scene and the external reference files.

1 Like

Thanks a lot for the reply!

About this. I haven’t had time to fully figure it out yet. In process. I will definitely let you know later when I achieve the desired result.

But here I am confused again and don’t understand where to move on. Let me describe in more detail what exactly worries me.

I have a 3D scene that I submitted via SMTD from the 3ds Max interface. There, Copy ALL External File References to Repository was selected, as I said and showed in my last reply. If we pay attention to the Auxiliary Files section in Deadline Monitor, you will notice that all textures and other files were copied to a separate folder in the repository (the screenshot is cropped, btw), which is logical and I need it that way:

But if I submit the same job with my custom script with all the settings and so on, then despite the fact that everything will work properly (I mentioned it in my last reply as well), textures and other parts of the 3D scene that are important for rendering will be missing and in the picture we will observe that on the objects on which textures should be displayed (for example, fabric), it will just be some kind of black material. And the reason is that my script doesn’t specify either the path or anything else that could force the 3D scene to pull out all the necessary textures, as was done in the case of the SMTD method. From here we can observe the following, only the .max file of the 3D scene itself was sent for rendering, but no textures were pulled out:

Now I’m trying to figure out what I need to do so that all the other files that will be involved in rendering (textures, etc.) are sent along with the .max scene if I use my custom Python script with the Deadline Python API?

I tried to specify the network path to the scene. I tried to put all textures in the same folder with the scene and submit it again. But all this is useless because when submitting, only my scene is copied to a separate folder in the repository without textures or anything else.
So I just can’t figure out how to indicate for Deadline (or by a separate line of code in my script) that in addition to the scene, textures should also be copied to the repository?

I still don’t understand what you mean :pensive:
Can you please specify exactly how I should do this or give an example of what it should look like in my case?

Privacy | Site terms | Cookie preferences