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?

  • $\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 '16 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 '16 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 '16 at 13:57

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)


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.