Page MenuHome

Animation: Added option to playblast only keyframes of selected objects
ClosedPublic

Authored by Sybren A. Stüvel (sybren) on Dec 18 2019, 4:43 PM.

Details

Summary

Design task: T72229

This feature makes it possible to do a viewport render (a.k.a. playblast) by only rendering those frames on which the selected objects have a keyframe.

The frames to render are stored in a BLI_bitmap, which has a bit for each frame set to 0 (skip) or 1 (render). An alternative approach would be to construct a set of all keyframes to render, but that would make both constructing the list and looking up frames in the list more complex.

The only thing this feature does is skip OpenGL rendering of a frame. As a result, 'skipped' frames are still included in the output, but just use the render result of the last-rendered frame. This is exactly what's described in T72229.

Diff Detail

Repository
rB Blender

Event Timeline

  • Removed is_render_keyed_only from OGLRender struct. With a little reorganisation of the code it's no longer necessary.
source/blender/editors/render/render_opengl.c
550

Discussed face-to-face with @Sebastian Parborg (zeddb) that this behaviour is fine, given that the start frame of a render and the frame step are both integers, and thus we never render a sub-frame anyway.

Other than the nitpick, LGTM!

source/blender/editors/render/render_opengl.c
550

Just remove the TODO from the comment and explain that this will be fine as we don't render out subframes (as stated above).

This revision is now accepted and ready to land.Dec 19 2019, 2:50 PM
  • Transformed TODO into regular comment.

This has the potential to majorly speed-up stop-motion-style renders. Thanks 😄