Nov
18

Batch rendering multiple files (windows)

By

This is not directly archviz related, doesen’t even come with a nice image, but found it a great time saver so thought I’d share.

The project I’m working right now presented a special challenge: I got 21 blender files to edit and render separately (it’s a presentation of elevator interiors, with many variations I could not help but making separate files). Yesterday I was really caught with having to prepare in a hurry a whole set of drafts and I hoped I will be able to do a batch render of all the 21 files so I started googling the way to do it.

I found an older discussion on making a .bat file and tried that, but something was not right as blender started but crashed right away. Was losing more time than I expected to gain, so gave it up until my IT specialist husband came home. It took him a while too to figure it out, as he is not a Blender user, but at the end it worked. The reason my first attempt didn’t work was that I had customised my Blender interface, and this .bat thing will only run on the default settings.

So, if you have several files all ready to render and you want for instance to leave them overnight without having to launch each one separately, you can open a simple text file in notepad and write this in:

“C:\Program Files\Blender Foundation\Blender\blender.exe” -b  “E:\current project\elevator-01.blend” -o “E:\current project\renders\elevator-01.jpg” -F JPEG -f 1 –factory-startup

“C:\Program Files\Blender Foundation\Blender\blender.exe” -b  “E:\current project\elevator-02.blend” -o “E:\current project\renders\elevator-02.jpg” -F JPEG -f 1 –factory-startup

and so on.

Where of course you have to put the correct path to blender.exe and your project and output files. The quotation marks are needed when your folders have names with spaces in them. JPEG can be replaced by other formats, and  “factory-startup” takes care of the problem already mentioned.

The file is then saved with a .bat extension and double clicking it starts Blender working invisibly in the background. All blends in the bat file are rendered and saved one by one. Of course all files must be ready to go, with the right camera selected and all size and quality settings in place. Rendering could be faster this way but I didn’t actually test that.

A small application to do this by just picking the files and not having to edit the bat file manually would be of great use.

Categories : Rendering, Workflow
  • Hi, this handy tip just doesn’t seem to work for me..
    i run bat file, some small black window pops out for a second and then nothing happens..
    this is what i wrote:

    “C:\Documents and Settings\user\Desktop\Mantas_N\Soft\blender-2.49b-windows\blender-2.49b-windows\blender.exe” -b “C:\Documents and Settings\user\Desktop\Mantas_N\misc\Pabandymas.blend” -o “C:\Documents and Settings\user\Desktop\Mantas_N\misc\Pabandymas.jpg” -F JPEG -f 1 –factory-startup

    Any ideas what could be wrong?

  • Oana

    Hi, can’t see any problem with that, you’ll have to try running it from the command window (start -> run cmd) and see what message you get. Hope it works for you.

  • Wazovsky

    it works!!! great! thank you.

  • Peter

    Use the “” marks from Notepad not from excel/word etc. I noticed that’s what was blocking my script!!!