1
$\begingroup$

I have 4 scenes, each of which needs to be rendered at a different frame. If I go through each scene and set the proper frame in each scene right before rendering it will render the proper frames. However, after doing this Blender seems to forget the specific frames for each scene and sets them all to the same frame as the scene I rendered from. So I have to go through this process of manually setting each scene's frame every time I render, which is a royal pain. Is there a way I can get each scene to render at a different frame and have Blender remember the frames for each scene?

$\endgroup$
  • 2
    $\begingroup$ Would doing this from a python script be feasible in your workflow? $\endgroup$ – Todd McIntosh Jun 16 '15 at 3:25
  • $\begingroup$ @ToddMcIntosh Absolutely! It would be helpful if you try to explain it step by step though as my Python is a bit rusty. $\endgroup$ – PGmath Jun 16 '15 at 14:05
  • $\begingroup$ I'm not able to replicate this behaviour in my tests, can you post your blender file or a partial file that demonstrates this behaviour. Also, are your scenes linked in any way? $\endgroup$ – Todd McIntosh Jun 16 '15 at 16:37
  • $\begingroup$ Unfortunately the file is massive, I will see what I can do as for replicating the problem on a smaller basis. $\endgroup$ – PGmath Jun 16 '15 at 18:20
  • $\begingroup$ @ToddMcIntosh Did you add some compositor nodes for the other scenes in the scene you are rendering from? Then set each scene to a different frame, go the the main scene, hit render, and then go look at the frames in the other scenes. $\endgroup$ – PGmath Jun 16 '15 at 18:37
1
$\begingroup$

Here's a small script that will run your render and reset the current frame number in each scene.

If you want to avoid the double render of the second 2 scenes, you could set up a fourth Scene for holding the compositing only and then only trigger the rendering of the other 3 scenes.

import bpy

#set the first scene and render it - this will trigger rendering of other scenes as well
bpy.context.screen.scene = bpy.data.scenes['Scene'] 
bpy.data.scenes['Scene'].frame_current=1
bpy.ops.render.render(write_still=True)

#switch context to second scene and re-render frame 20
bpy.context.screen.scene = bpy.data.scenes['Scene.001'] 
bpy.data.scenes['Scene.001'].frame_current=20
bpy.ops.render.render(write_still=True)

#switch context to second scene and re-render frame 
bpy.context.screen.scene = bpy.data.scenes['Scene.002'] 
bpy.data.scenes['Scene.002'].frame_current=40
bpy.ops.render.render(write_still=True)

#now when we switch context back to first scene the compositor will show Frame 1 from Scene, Frame 20 from Scene.001 and Frame 40 from Scene.002
bpy.context.screen.scene = bpy.data.scenes['Scene'] 

Using this to run your render will allow you to keep your original frame range set to 1-250 and then just render the frames you want.

$\endgroup$
  • $\begingroup$ Thanks, this is just what I was looking for! As for your note, I did not test it with the test file I gave you but with my actual scene it definitely renders before it resets the frames. $\endgroup$ – PGmath Jun 16 '15 at 20:31
  • $\begingroup$ I just changed the script to force the render of the other frames instead of rendering the same from from all scenes. I was wondering if you were rendering the same frame with your smoke sim, but it wasn't obvious because it's smoke? I altered your test file so that the sphere and cone where animated to a different location on frame 20 and 40 and switched the animation curve to constant so it would be an on/off movement from frames 19-20-21. This confirmed for me that the original script was rendering the first scene's current frame across all 3 scenes. $\endgroup$ – Todd McIntosh Jun 16 '15 at 20:40
  • $\begingroup$ The smoke sims hardly have any smoke at all the frame I have selected for the main scene. It would be super noticeable if they were rendered then. $\endgroup$ – PGmath Jun 16 '15 at 20:43
  • $\begingroup$ Ok, good, just wanted to make sure. I was definitely getting frame 1 from all scenes when I tried your test file. $\endgroup$ – Todd McIntosh Jun 16 '15 at 20:47
  • $\begingroup$ That's really weird, I'll try and do some testing to figure out why. This is a big help for me, thanks! $\endgroup$ – PGmath Jun 16 '15 at 20:58
1
$\begingroup$

Each scene has a start frame and an end frame in the Scene > Render > Dimensions. If you set those both to the frame you want, then rendering the animation will render that single frame.

This setting is per-scene.

$\endgroup$
  • $\begingroup$ Unfortunately, the reason I need different frames for each scene is they each contain a separate smoke simulation. And the smoke sims need multiple frames to run. $\endgroup$ – PGmath Jun 16 '15 at 18:18
  • $\begingroup$ Would it help to bake the smoke simulation? blender.org/manual/physics/smoke/baking.html $\endgroup$ – Mutant Bob Jun 16 '15 at 18:25
  • $\begingroup$ The smoke sims are all baked, but unlike cloth/softbody/etc I can't apply the sim at certain frame, it needs all the frames. $\endgroup$ – PGmath Jun 16 '15 at 18:32
  • $\begingroup$ I just created a .blend file with a quick smoke. I set the scene frame start/end to 100. The smoke sim has start=1 and end=250. Baking the smoke sim worked, and the frame 100 appears to have the proper smoke state. If this does not work for your case, you might consider uploading the .blend or a small toy .blend illustrating the problem to pasteall.org so we can troubleshoot. $\endgroup$ – Mutant Bob Jun 16 '15 at 18:38
  • $\begingroup$ Huh, it does work for me! I guess I just figured that the smoke simulator wouldn't be able to handle frames outside of the set range. It is a little Mickey Mousey though, I would prefer a little more flexibility (so I can play the animation, etc.). But if nobody comes up with a slicker solution pretty soon I'll accept this. Thanks a lot! $\endgroup$ – PGmath Jun 16 '15 at 18:48

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.