5
$\begingroup$

I'm designing a character with different animations (idle, eating, walking, etc) that are separated in different blender actions in the same .blend file.

I would like to queue the actions to be rendered, so I could leave the computer rendering over night. Is there any way to do that??

$\endgroup$
3
$\begingroup$

There is nothing built into Blender that will batch or queue renders, at the moment.

The simplest, most portable way is to make an animation that consists of those actions one after the other. Render the whole thing to frames, then take the first set of frames for one sequence and render it into a video. Then the next sequence, and so on. Depending on how sophisticated you want to be, you could even make a new Blender file, link (or append, but link would be better) the actions into a new file, and set them up to play one after the other. Then render that one, instead of modifying your original file.

Another way, for things that aren't or can't be in the same .blend file, is to launch Blender from the command line using some kind of command-line script like a batch file on Windows, or a bash script on Nix or Mac. E.g.

cd c:/<blender folder>
echo Rendering the first one...
blender -b filename_one.blend -a
echo Rendering the second one...
blender -b filename_two.blend -a
echo Rendering the third one...
blender -b filename_thr.blend -a
echo Done rendering.

The most robust, but most complicated, way would be to write a Python script that launches Blender with certain command-line arguments. A Python script could be programmed to choose certain arguments based on certain criteria. It could check to see if there are as many frames as there should be in the results, and if there aren't maybe run the render again with overwrite turned off. Interesting things like that.

I hope that helps!

$\endgroup$
4
  • $\begingroup$ Thank you for your reply! Unfortunately, I need the image sequence, not the video, as my final result; so if I put all the actions (there's a lot) in the same timeline I would need to rename every corresponding block of images in order to get the enumeration right. If don't find an easier way, I think I will try your second suggestion and divide everything in multiple .blend files, so I can batch render them. $\endgroup$ – rodrigoaltieri May 2 '16 at 19:32
  • $\begingroup$ The first suggestion produces just an image sequence, just don't go on to the last step ;-) But yeah if you've got more than 4-5 actions, it would be SUPER tedious to go through and manually select each group of frames. OOOH! OH!!H!O!H!H! I JUST HAD AN IDEA!!! Lemme go see if it'll work... $\endgroup$ – Matt May 2 '16 at 19:47
  • $\begingroup$ Nevermind :-( I was thinking that you might be able to animate the Path of a file output node so that you could have the name change for certain frame ranges, but you can't keyframe it. $\endgroup$ – Matt May 2 '16 at 23:58
  • $\begingroup$ =( I was excited with your epiphany moment hahaha. Thanks for trying!! $\endgroup$ – rodrigoaltieri May 3 '16 at 0:08
1
$\begingroup$

I have a solution for this problem.

  • for each action, set it to active action
  • after that, perform render
    import bpy
    obj = bpy.context.object

    for action in bpy.data.actions:
    obj.animation_data.action = bpy.data.actions.get(action.name)
    print(obj.animation_data.action)

    bpy.context.scene.render.filepath = action.name+'_'
    bpy.ops.render.render(use_viewport = True, write_still=True, animation=True)

run line by line in your blender file, console mode. Please note that I tried run it as a script and render by command line, but it not work.

blender -b xxx.blend -P render_action.py
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.