8
$\begingroup$

Is there anyway to render backwards?

No, I do not want to play it backwards. I know how reverse output frames easily.

I want to render backwards because I want to render on two machines that render at significantly different speeds, and I want one to start at the end, and the other to start at the beginning. Is there any way to do this? Thank you.

$\endgroup$
1

2 Answers 2

5
$\begingroup$

You can use following script to render your animation instead of blender's default render animation functionality

import bpy
from os.path import join
from os import getcwd
import os


C = bpy.context
SCN = bpy.context.scene  # scene object

orig_path = SCN.render.filepath

startframe = SCN.frame_start
endframe = SCN.frame_end

reversed_frames = list(range(endframe, startframe-1, -1))
img_ext = SCN.render.file_extension


for fr in reversed_frames:

    SCN.frame_set(fr)

    # format out put file names
    rendered_image_path = f"{orig_path}{fr:04}{img_ext}"

    # disable overwrite
    if os.path.exists(rendered_image_path):
        print(f"{rendered_image_path} exists")
        continue

    #place holder functionality
    with open(rendered_image_path, 'w') as touchfile:
        pass

    print(f"Initiating render Frame - {fr} -{rendered_image_path}")
    SCN.render.filepath = rendered_image_path
    bpy.ops.render.render(write_still=True)

SCN.render.filepath = orig_path

Above script implements placeholder functionality and prevents overwrite

Cons: You wont see render window while rendering using GUI

$\endgroup$
9
$\begingroup$

I dont know if there is a way to render backwards, BUT !!

if you set the same render output path to some network directory for every machine and tick/check Placeholders and uncheck Overwrite you can render with both.

it works like this: if a machine starts a frame it creates a placeholder file and if the other machine tries to write the same frame it can not because it thinks the frame is allready there, so proceed to next and so on.

for example Machine 1 starts Frame 1, creates a placeholder and Machine 2 starts with 2.
now - 1 is finished and 2 is working
Machine 1 wants to render Frame 2 but Frame 2 is already (placeholder) in the folder it continues with Frame 3 -and so on.
everytime a machine finds a placeholder it skips the Frame and continue with the next

enter image description here

$\endgroup$
1
  • $\begingroup$ Interesting. Might do this as an alternative. Thanks. $\endgroup$ Commented Nov 4, 2019 at 3:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .