2
$\begingroup$

I am trying to get the File Output Node of the compositor to create a new file with a different name (appending a number would be best) if one already exists. Controlling the name with some extra input perhaps would also work.

I'm in this situation because the time is being controlled by a speed track on the VSE. The frame are actually sub-frames, but the File Output Node generating the output file name based on the integer frame number. The result is that there are less files than there should be, because multiple sub-frames end up overwriting themselves.

Any ideas?

$\endgroup$
3
  • $\begingroup$ Can you simply change the project scene properties Frame Remapping? To make sub frames instead of a speed strip? Then ramp in compositor with a driver on the image input frame start and offset values? See this example blenderartists.org/forum/… $\endgroup$
    – 3pointedit
    Aug 28, 2016 at 10:47
  • $\begingroup$ @3pointedit Seems possible, but it would require time remapping "to the slowest part", which would require rendering lots of useless frames, right? $\endgroup$
    – Rojo
    Aug 28, 2016 at 13:29
  • $\begingroup$ Correct. And I'm not sure that time remap affects the node file output, you'll have to test that. $\endgroup$
    – 3pointedit
    Aug 28, 2016 at 13:57

1 Answer 1

1
$\begingroup$

A workaround is to make the base path of the File Output node change according to the subframe, before every render, using a Python script. In this way, the output file names won't be overwritten. This script must be run once before rendering.

import bpy

def add_subframe_to_fo_path(scene):
    if scene.name == 'SceneName':
        scene.node_tree.nodes['File Output'].base_path = '//sth/' + str(scene.frame_current) + '-' + str(scene.frame_subframe)


bpy.app.handlers.render_pre.append(add_subframe_to_fo_path)
$\endgroup$

You must log in to answer this question.

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