2
$\begingroup$

I want to render every 2nd(or even) frame and every 5th frame that end in '5' is it possible to do that in one render job.....not very good at scripting but will take any advice I can get

$\endgroup$
4
  • $\begingroup$ can unchecking overwrite help, does blender check the directory before or after rendering $\endgroup$
    – Smee
    Sep 25 '18 at 19:19
  • $\begingroup$ Can you please elaborate if you want to render either every second frame or every fifth frame – in which case Jan Matys' answer should help – or whether you're looking for a way to render frames 0, 2, 4, 5, 6, 8, etc. at one go without having to set the ranges and the Frame Step in between? $\endgroup$
    – binweg
    Sep 25 '18 at 20:18
  • $\begingroup$ to clarify I want to render in the first instance every even frame 2,4,6,8.... then I want to render every 5th frame that's ends in 5 so 5,15, 25.... and so forth.....can that be done in a single render job, I think I got the answer to the ends with 5 question though $\endgroup$
    – Smee
    Sep 25 '18 at 23:00
2
$\begingroup$

It's possible loop over a list of the desired frames, set the correct frame and render it within a Python script.

I didn't manage to automatically enumerate frames according to the Blender Output Panel documentation, so I set the filename manually for each frame and restore the original value afterwards.

The following script should render all even frames as well as all frames that end in a five.

import bpy

scene = bpy.context.scene
tmp_filename = scene.render.filepath

all_frames = range(scene.frame_start, scene.frame_end + 1)

for f in [f for f in all_frames if f%2 == 0 or f%10 == 5]:
    scene.frame_set(f)
    scene.render.filepath = '//frame_{:04d}'.format(f)  # frame_0000 etc.
    bpy.ops.render.render(write_still=True)

scene.render.filepath = tmp_filename

You can select the desired frames by list comprehension like above or use Python's filter function.

The “render with script” approach will make Blender unresponsive during the job, but I think the operating system won't shut the process down unless you tell it to do so, i.e. click on the “Blender is not responding” dialog box.

$\endgroup$
2
  • $\begingroup$ ok thank u very much, this is also helpful though my need to multitask might make the script approach prohibitive, still good to have this option...much appreciated....but I feel manually rendering both sets with the suggestion of Jan for getting the "end with 5 frames" will be best..........again thanks much for the python approach will be useful for times I can fully dedicate the PC to rendering $\endgroup$
    – Smee
    Sep 26 '18 at 14:23
  • $\begingroup$ ok I misunderstood something that was said the script works well in the background thanks much $\endgroup$
    – Smee
    Sep 26 '18 at 23:14
0
$\begingroup$

on the image below the green rectangle shows the settings of Your interest...

enter image description here

FrameStep 2(5) will render every 2nd(5th) image and by setting the StartFrame You will choose the desired stepping - if U want every frame ending with "5" then choose StartFrame=5 and FrameStep=10 so frames 5,15,25,35 etc will be rendered.

Also if U want to render only every 5th frame ending with "5" then choose the starting frame and FrameStep=50. So when You choose starting at 5, then frames 15,25,35 and 45 will be skipped and next one rendered will be 55. Hope this helps buddy.

Sincerely, Jan

$\endgroup$
2
  • $\begingroup$ this is helpful thanks at least I don't have to waste render time on duplicate renders of 10,20,30 and such, what I am try to do is render a sequence like such "2,4,5,6,8,10,12,14,15,16....." and wanted to know if it could be done in one shot, but at least my duplication problem is solved even if I have to do two render jobs thanks $\endgroup$
    – Smee
    Sep 25 '18 at 23:15
  • $\begingroup$ Ouch, I didnt understand it right as it looks. Still happy its helpful somehow ;). $\endgroup$
    – Jan Matys
    Sep 26 '18 at 13:19

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