Setting up batch render tasks (multiple sequential renders)

(Gekko) #1


Someone on freenode’s #blenderaid wondered why Blender doesn’t have a batch rendering thing like in 3ds Max, so I wrote one myself. It allows setting up multiple render jobs to be done in sequence. For example

First render frames 1 - 50 at 1920x1080 at 1000 samples
Then render frames 60 - 200 at 800x600 at 200 samples
Finally render frames 1 - 5000 at 1920x1080 at 10000 samples

This helps when you have a large project and want to do one of the following

  1. Render into multiple resolutions
  2. Try rendering the project in smaller quality first to see if it works. You might want to make the computer continue the rendering to the full scale version automatically after the test it done without you doing that manually.

Tell me what you think and if something else is needed.

To install, place the script in blenderdir/2.65/scripts/addons, go to user preferences -> addons -> render and enable batch render, click save. The tool is now available at the bottom of the render panel.

Github page:

Current features in version 1.3 for Blender 2.68a:

  • Can create any number of sets to be rendered

For each set:

  • Can choose a range of frames to be rendered
  • Can choose a resolution at which they are rendered
  • Can choose a resolution percentage at which they are rendered
  • Can choose Cycles samples which are used for each batch
  • Can choose which layers are rendered
  • Can choose which camera is used
  • Can choose an output path where the frames are saved / how they are named


(nooki) #2

I’ your fan. Very useful tool (also for 3ds max user in past) Thank you man.

some ideas:

  • select camera or view
  • layer or layer group (layer addon) or maybe object visibility (because of there are only 20 layers)
  • select custom path and naming (according to layer or object or set name)
  • background rendering.

(nooki) #3


  • about start and end frame,
    start - 1
    end - 2
    result: render frame -1
    I think better:
    start - 1
    end - 1
    result: render frame -1
  • delete selected option doesn’t delete all the selected sets but pressing for each set individually.

(stilobique) #4

It’s good ! It’s posible to add a field “camera” ?

(sssampo) #5

This is exactly what I was wishing for! Thanks!

(harleynut97) #6

I haven’t tried it yet, but I’ve been hoping for something like this, makes it great for overnight renders for animations. One other thing I would love to see implemented, is a way to have it do an automatic shutdown of your computer after the batch process is complete. I have a backup program (Acronis) that shuts your computer off after completion of the image, so I know it’s possible do…

Thanks for putting this together.

(Gekko) #7

Fixed the bug with deleting items (in github). Looking at the other features. Thanks for the feedback.

(Gekko) #8

Version 1.2 released

New features:

  • Can now choose the camera used for rendering a batch. This is done by writing the camera’s name. I took a look at making a selection box containing only cameras, but didn’t figure it out in reasonable time.
  • Can now choose which layers are rendered
  • Can now choose the resolution percentage
  • Can now choose an output path for each batch. Each batch also gets a custom name so the files don’t overwrite each other.
  • Fixed a bug with batch deletion deleting wrong items



(Gekko) #9

Possible, but I don’t want to do that. It sounds like a security risk. From what it seems it’s about two lines of Python to add that, but I’m not comfortable about the script doing that sort of things. If there’s a bug in that feature the computer might be shut down against the user’s wishes.

(harleynut97) #10

Well you would know best if you feel it is a security issue, one additional question I have is… say that I have an animation that has multiple cameras set up to be the active camera at different points of the timeline. So if I want to render 2 sequences

from frame 1 to 50 (2 different active cameras during these frames)
from frame 220-290 (3 different active cameras during these frames)

would this make your addon not able to be used?

(nooki) #11

Like your work.
I have some suggestions.

P.S. Sorry for my english.

(Gekko) #12

I’m not sure how this is usually done. Can you set keyframes for cameras? I know people have set up some kind of scenes where the camera is changed at some point. My script won’t override that - it simply changes the active camera at the starting frame, and that is ignored anyway if there is a keyframe overriding this change.

Well formatted and thought. I’ll think about these.

(harleynut97) #13

Hey Gekko, to reply to the question you asked

  1. Yes what I was referring to was having multiple cameras set up in a animation, so as an example at frame 1 it would be using camera a, then at frame 30 it switches to camera B for a different angle. This is all set up by using camera markers in the timeline. I don’t know if actual keyframes are set, but camera markers show up in the timeline. If set up right, blender just automatically switches to the correct camera based on what was set with the markers in the timeline.

But it sounds like that won’t be a problem with your script.

(redw) #14

Hallelujah, after few day on Google, I finally found this easy and powerful solution for batch rendering. This should be included in Blender build :yes:
Unfortunately, I found two problems, with basic setting (start frame 1, end frame 2) script produces two identical renders.
And when start frame is 1, end frame 1 - “Start frame greater than end frame” problem appeared

This is easy fix, I just removed = from this code

<b>if (it.end_frame &lt;= it.start_frame)</b>

correct one is

<b>if (it.end_frame &lt; it.start_frame)</b>

Second problem is:

in second batch, layer 1 is rendered even though it is not enabled.
I tried to fix it by myself, but it somehow complicated (I have never worked with python before)
I will be very grateful if somebody can fix this.

(harleynut97) #15

Normally I always render PNG image sequences. Lets say I set up a batch render such as this:

render 1 frame1 - 80

render2 frame 110 -170

Are you able to tell the add on to output image sequences for render 2 in a seperate folder, than what was used for render 1?

It probably is too early to say, but do you know if this works OK with the 2.69 official version?

This really is a great addon, and thanks for all your efforts.

(harleynut97) #16

Sorry about the second post here… but I found a little time to do some basic testing with a couple things…

-At least in my basic tests it works with 2.69… but I only used 1 layer. Redw brought something up a couple posts back that may in fact be occuring… hopefully Gekko will look into it.

-What I was really wondering about is how this would work if you were to use multiple cameras with automatic switching during these batch renders. I noticed on the add on it has some type of camera setting for each batch. But I just left that alone and basically set up a two areas for rendering on the timeline

  1. Batch 1 frame 1 to frame 20. I used 2 cameras and around 1/2 way thru had it automatically switch to camera 2 ( select camera, set marker, and then ctrl B to bind camera

  2. Batch 2 frame 40 to 60 I did a similar thing as above with multiple camera switching

It rendered each image sequence with no problems, and did include the camera switches with each batch,.

I did find out that you can have it output the batches to different folders which is great and needed for what I want to use this for.

One thing really did throw me off on this plug in … After hitting execute batch render button (or whatever it was called). The only thing that you see (in windows) is the blue circular arrow that you see when Blender locks up. I actually thought this is was happening at first. But as it turns out it was actually rendering.

I would suggest to the developer to add some kind of progress bar or something like that while each batch is rendering to avoid confusion to the user.

So just thought I would share this info. This is going to really help my ability to overnight renders of more than one scene at a time.

(Pitiwazou) #17

It is possible to add render layers to this addon ?

It’s really usefull, but without render layers it’s too limited.

(Alain) #18

I guess Oscurart Tools would solve that task.

You make a linked Scene for every Camera.
You can set individual Rendersettings for every Scene.
In Oscurart Tools you can set a Checkbox for each Scene you want to render.

Kind regards