• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

Batch Rendering with Maxwell

Scheduled Pinned Locked Moved Extensions & Applications Discussions
extensions
3 Posts 2 Posters 3.3k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    peter_shaw
    last edited by 27 Dec 2012, 21:14

    Hi,
    Anyone familiar with scrpiting in maxwell? especially batch rendering?

    basically, i have several MXI and their corresponding MXS files in a folder. i want to improve all their SL in stages, f.ex. from 2 to 5 and then the next day from 5 to 10. (when i am AFK, so batch is important). i tried the batch_render.ms script that was included, but it doesnt seem to resume the mxi files. instead it begins from 0 at each cycle.

    the included script looks like this

    // This script gets all the MXS files located in the folder "input" and its children
    // Opens them, changes their SL and resolution and launches each render
    // The output of all the images is stored in the folder "output"
    // The script also shows how to handle render events
     
    var inputFolder = "C;\Users\psw\Desktop\batch";
    var outputFolder = "C;\Users\psw\Desktop\batch";
    var engineVersion = Maxwell.getEngineVersion();
    var mxsCount = FileManager.getNumberOfFilesInBranch( inputFolder, "*.mxs" );
    var mxsList = FileManager.getFilesInBranch( inputFolder, "*.mxs" );
    // Connect event
    RenderEvents["renderFinished()"].connect(renderHasFinished);
    var i = 0;
    var isRendering = 0;
    for( i = 0; i < mxsCount; i++ )
    {
       renderScene();
       while( 1 )
       {
          if( isRendering == 0 )
          {
             break;
          }
       }
    }
     
    //////////////////////////////////////////////////////////////////
    function renderScene()
     
     
    {
       var mxsFile = mxsList[i];
       var imagePath = outputFolder + "\" + FileManager.getFileName( mxsFile ) + ".png";
       Maxwell.print( "rendering Mxs file; " + mxsFile );
       Maxwell.openMxs( mxsFile );
       Scene.setImagePath( imagePath );
       Scene.setSamplingLevel( 3 );
       isRendering = 1;
       Maxwell.startRender();
    }
     
    //////////////////////////////////////////////////////////////////
    function renderHasFinished()
    {
       isRendering = 0;
       Maxwell.print( "Render finished!!" );
    }
     
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    

    i suck at coding, maybe there is just a command like "-resume"?

    1 Reply Last reply Reply Quote 0
    • P Offline
      peter_shaw
      last edited by 27 Dec 2012, 21:36

      ok maybe i posted too premature, i got a solution after browsing the official maxwell forums, just use the script progressive_animation.ms and set the SL steps low

      /close thread

      1 Reply Last reply Reply Quote 0
      • S Offline
        Sophien
        last edited by 9 Feb 2018, 11:00

        Hi! I want to do the same, but render in a network. Dou you knkow how is the code?

        Thanks!

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement