deadline 4 with maxwell 2.5 resume mxi files

Hi,

I’m using maxell 2.5 for maya and we had lot of stability problems with their in house network renderer. so I have tried with deadline.
but one thing they have, is the possibility to send a job in “low/middle” quality and afterwards be able to resume it and add quality but without restarting from 0

is it possible to do that with deadline ?

Thanks

-SeB-

I don’t think this is currently supported by Deadline, but I will download Maxwell 2.5 and investigate further. Deadline uses Maxwell’s command line interface to render, so if this feature is supported by the command line, we should be able to support it with Deadline.

I’ll post back here with my findings once I’ve played around with it a bit.

Cheers,

  • Ryan

I looked into this, and Deadline currently does not support the resume feature. However, this will be easy to add, because we just need an optional mxi setting to use for input (currently, we only support an option to specify one for output). We’ll add this to the todo list, and I’m sure we can support it for the next Deadline release.

Cheers,

  • Ryan

cool Thanks

Hi,

I have tried the new deadline 5 with the resume option for maxwell.
is the resume option works only if we have stopped the job in deadline ?

what would be nice, is to have the possibility to send a job to a low sampling level and let the job finish.
if the render looks correct, requeue it directly into the deadline monitor with an option to increase the sampling level.

is it something possible to do ?

Thx

-SeB-

This should be possible in Deadline 5 already. Follow these steps and let us know if it works:

  1. When you submit the low sampling level job, make sure to specify an output MXI file, and enable the option to resume rendering from it.
  2. After the job has finished, right-click on the job and select Modify Properties.
  3. Select the Maxwell tab and under the Overrides section, enable Override Sampling and bump up the Sampling value to what you want. Then click OK.
  4. Right-click on the job and select Requeue Job.

The job should resume from the existing mxi file, and should use the new sampling level.

Cheers,

  • Ryan

Hi,

I have tried (couple of try) your procedure but I’m not sure if it’s working.
the override seems to work, the render finish to the right sampling level.

But if I read the slave log, I see the MXI start from sampling level 1 and the file goes back to 0KB.
I guess to mxi file is totally re-writed ?

am I missing something ?

Thx

-SeB-

How does resuming normally work if you do it manually? Does the MXI file go back to 0 as well? I thought we were doing things correctly based on the Maxwell documentation and the tests we ran here seemed to confirm it.

Cheers,

  • Ryan

I have tested it manually,

On a simple scene, I rendered to sampling level 6 and when the job was finished I resumed it and set the sampling level to 10

the mxi file was not rewritted from 0KB and when I checked the log, the resume didn’t start from 1 but it starts to the sampling level 6.

-Seb-

Thanks for testing that for us. I think I may have found the problem. It looks like when the MXI file is specified, and the option to resume it is enabled, Deadline will tell Maxwell to write to and resume from the same file. That would explain why it gets set back to 0KB. I’m not sure how this slipped through testing.

I guess what we’ll have to do is have 2 separate MXI paths in the submitter: one for writing to and one for resuming from. This means that after the initial job finishes, you will have to tweak the Maxwell settings for the job before resuming it. You would have to set it up so that the job will resume from the mxi that was saved by the original render, and then write to a new mxi file if desired.

We will try to get this fixed soon, and post something here for testing.

Cheers,

  • Ryan

is it not possible to do all the process with only one mxi ?

what I also notice, if I resume the mxi file, it seems that the file size didn’t change at all.
And In the log, I also notice that maxwell check the “CPU iD” it have used on the preview rendering before starting the resume.

I don’t know if it can help you ?!

-SeB-

That way could work, but it would have a limitation that you couldn’t write to an mxi file and resume from one at the same time. If you’re doing a 2 stage render, that works fine. The first state creates the mxi, then when it finishes, you enable the option to resume from that mxi and requeue the job to launch the second stage.

However, what if you wanted to do a 3rd pass? Because you used the resume option for the 2nd pass, no mxi was generated. That’s why I thought of having separate save and resume mxi files.

Maybe I’m over-complicating things here, and maybe a better alternative might be to have a right-click option for Maxwell jobs that submits a new job that resumes from the original (and would auto-fill in things like the mxi file to use). What do you think?

Thanks!

  • Ryan

PS: I appreciate you taking the time to discuss this with me. I want to make sure we get this right! :slight_smile:

the only problem with this technique is the volume of data, the mxi files are heavy specially if you do animation.

in maxell, you can do a resume many times as you want without problem. the mxi still stay the same size.

yes it could be a nice idea too.

no problem, it would be nice to fix this option
thx for the support

-SeB-

Just to confirm, if you resume many times this way, does each resume where the other left off? For example:

  1. Initial render: sampling of 5
  2. Resume render: sampling of 10, starts at 5.
  3. Resume render: sampling of 20, starts at 10.

Or, do you mean you can resume many times from the initial render:

  1. Initial render: sampling of 5
  2. Resume render: sampling of 10, starts at 5.
  3. Resume render: sampling of 20, starts at 5.

Since the mxi file doesn’t change when you resume, I would expect it to be the second case here, where you can only resume from the initial render. I think if you can clarify this for me, I will have a proper understanding of how it all works.

Thanks!

  • Ryan

that’s the correct process.

-SeB-

here is a script I found in the maxwell help file, maybe It can give you the right direction.

[code]17.03.05 Progressive render for Animations
// This script renders all the MXS files located in the input folder but instead of rendering
them sequentially until each one reaches the final SL, it renders them incrementally. First
it renders all the frames up to SL 4, producing a low SL version of the whole animation
that you can use for starting post-production tasks, and then continues refining the whole
animation to SL 6, 8, 10,… in steps of 2 Sampling Levels, until the indicated final SL.
// It is useful for quickly previewing animations, and for overlapping the rendering process
with the postproduction process, saving a huge amount of time in animation projects.

// This script gets all the mxs’s located in the folder “input”
// Renders them until a desired Initial SL, to get a first version of the whole sequence, allowing the user to start the postproduction process
// Then continues refining the sequence until the Final SL, advancing in certain steps (slStep), offering continuous refinement

// Edit the following lines with your own project Input and Output folders

var inputFolder = “C:\input”;
var outputFolder = “C:\output”;

var mxsCount = FileManager.getNumberOfFilesInFolder( inputFolder, “.mxs" );
var mxsList = FileManager.getFilesInFolder( inputFolder, "
.mxs” );

RenderEvents[“renderFinished()”].connect(renderHasFinished);

// The following SL values can be customized to fit your needs

var initialSL = 4;
var finalSL = 12;
var slStep = 2;
var currentSL = initialSL;

var i = 0;
var isRendering = 0;

while( currentSL <= finalSL )
{
for( i = 0; i < mxsCount; i++ )
{
renderScene();
while( 1 )
{
if( isRendering == 0 )
{
break;
}
}
}

currentSL += slStep;
}

//////////////////////////////////////////////////////////////////

function renderScene()
{
var mxsFile = mxsList[i];
var imagePath = outputFolder + “” + FileManager.getFileName( mxsFile ) + “.png”;
var mxiPath = outputFolder + “” + FileManager.getFileName( mxsFile ) + “.mxi”;

Maxwell.print( "rendering Mxs file: " + mxsFile );

Maxwell.openMxs( mxsFile );
Scene.setImagePath( imagePath );
Scene.setMxiPath( mxiPath );
Scene.setSamplingLevel( currentSL );
// Uncomment the following lines if you want to set a different resolution than the indicated in the MXS scene file
// Scene.setResX( 400 );
// Scene.setResY( 400 );
Scene.setResumeRenderEnabled( true );

isRendering = 1;
Maxwell.startRender();
}

//////////////////////////////////////////////////////////////////

function renderHasFinished()
{
isRendering = 0;

Maxwell.print( “Render finished!!” );
}

//////////////////////////////////////////////////////////////////[/code]

-SeB-

Thanks for the script! We currently use maxwell’s command line rendering capabilities, so hopefully the same functionality can be achieved via command line. If not, we may have to look at a scripted approach, but that of course will take more time…

Attached is an updated Maxwell plugin script that appears to fix the problem. To install it, go to \your\repository\plugins\Maxwell and make a backup of Maxwell.py (just in case). Then unzip the attached file to the same folder.

This update changes Deadline’s behavior when the MXI file is specified and the option to resume from it is enabled. Previously, Deadline would always include the “-mxi:” argument, and would also append the “-resume:” argument if the MXI file already existed. This was the problem. It should only ever be one or the other.

With this update, Deadline will only pass the “-mxi:” option to Maxwell if the specified MXI file doesn’t exist. If it does exist, it will only pass the “-resume:” option. This appears to work as expected.

So with this patch, the following procedure should work:

  1. When you submit the low sampling level job, make sure to specify an output MXI file, and enable the option to resume rendering from it.
  2. After the job has finished, right-click on the job and select Modify Properties.
  3. Select the Maxwell tab and under the Overrides section, enable Override Sampling and bump up the Sampling value to what you want. Then click OK.
  4. Right-click on the job and select Requeue Job.

Let us know how it works for you!

Cheers,

  • Ryan

EDIT: Removed original download due to a bug. Grab the new patch a couple posts down.

Hi,
I have tried the new plugin but I have some errors when I send the job to deadline.

[code]Error Message

Exception during render: An error occurred in RenderTasks(): Error in RenderArgument(): global name ‘GetSlaveName’ is not defined
at Deadline.Plugins.ScriptPlugin.RenderTasks(Int32 startFrame, Int32 endFrame, String& outMessage)

=======================================================
Slave Log

0: Task timeout is disabled.
0: Loaded job: Untitled (999_050_999_4c87fcd7)
0: INFO: StartJob: initializing script plugin Maxwell
0: INFO: Any stdout that matches the regular expression “.Error:.” will be handled as appropriate
0: INFO: Any stdout that matches the regular expression “desired rendering time : ([0-9]+.?[0-9])" will be handled as appropriate
0: INFO: Any stdout that matches the regular expression "desired sampling level : ([0-9]+.?[0-9]
)” will be handled as appropriate
0: INFO: Any stdout that matches the regular expression “Time: ([0-9]+)s.SL of ([0-9]+.?[0-9])” will be handled as appropriate
0: INFO: Any stdout that matches the regular expression “Time: ([0-9]+)m([0-9]+)s.SL of ([0-9]+.?[0-9])” will be handled as appropriate
0: INFO: Any stdout that matches the regular expression “Time: ([0-9]+)h([0-9]+)m([0-9]+)s.SL of ([0-9]+.?[0-9])” will be handled as appropriate
0: INFO: Any stdout that matches the regular expression “Time: ([0-9]+)d([0-9]+)h([0-9]+)m([0-9]+)s.SL of ([0-9]+.?[0-9])” will be handled as appropriate
0: INFO: About: Maxwell Plugin for Deadline
0: Plugin rendering frame(s): 1
0: INFO: Stdout Handling Enabled: True
0: INFO: Popup Handling Enabled: False
0: INFO: Using Process Tree: True
0: INFO: Hiding DOS Window: False
0: INFO: Creating New Console: True
0: INFO: Render Executable: “C:\Program Files\Next Limit\Maxwell 2\maxwell.exe”

=======================================================
Error Type

RenderPluginException

=======================================================
Error Stack Trace

at Deadline.Plugins.Plugin.RenderTask(Int32 startFrame, Int32 endFrame)
at Deadline.Slaves.SlaveRenderThread.RenderCurrentTask(TaskLogWriter tlw)[/code]

-SeB-

Sorry about that. This patch should fix that error.

I’ve also removed the original so that others don’t download it by mistake.

Cheers,