3
$\begingroup$

I'm currently working on an animation for a character in which I need the animation for in 8 directions (Up, Down, Left, Right, Diagonals). I can keyframe up the camera so it moves to these directions just fine every 12 frames and then just repeat the animation 8 times but I'd like the output for each filename for each direction to be different. Something like WalkingAnimation_00_01.png, where 00 is the direction and then 01 is the frame number for that direction. To clarify, something like... WalkingAnimation_08_(0-7 depending on the direction)_(01-12 depending on the frame for this direction)

I know some programming but I havent learned much of Python but I figure I'll need a double loop for this, but I'm not too sure how to interact with the Blender scripts yet. Any help is appreciated.

$\endgroup$
2
$\begingroup$

To make the output direct to specific directories dependent on frame you could add a handler to automatically set the scene.render.filepath before rendering the frame.

As an example, open a Text Editor window, click 'New' and enter the following code :

import bpy
def handler_set_filepath_based_on_frame(scene):
    scene.render.filepath = '//WalkingAnimation/%i_%i' % (scene.frame_current // 12, scene.frame_current % 12)
bpy.app.handlers.frame_change_pre.append(handler_set_filepath_based_on_frame)

Click the 'Run Script' button to run it and every time the frame changes the File Path should be automatically updated. Check the 'Register' checkbox to make it automatically run each time the .blend is opened.

If you then manually skip through the frames you should see the render output filepath automatically updating.

The calculation 'scene.frame_current // 12' is for the prefix and will increment by 1 for each 12 frames while the 'scene.frame_current % 12' will count the individual frame within each 12.

$\endgroup$
0
$\begingroup$

Well, one easy thing to do is to open many blender windows and in the first window adjust the options so you render frame 1-x to output folder a.In the 2nd blender window frame x-y to folder b.In the 3rd window.....

$\endgroup$
  • $\begingroup$ Using a few lines of Python script seems like a much preferred approach to me. $\endgroup$ – dr. Sybren Jul 3 '17 at 6:25

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.