Page MenuHome

VSE: Speed strip draw target frame as curve and hold
AbandonedPublic

Authored by Peter Fog (tintwotin) on Sep 3 2021, 10:49 AM.

Details

Summary

In the wake of this patch: D6110, which draws f-curves on top of speed strips, and this patch: D12368 which draws hold(freeze frame) areas as light boxes, I realized that it might be more useful to draw the target frame curve and it's holds. And it seems be a quite revealing way to illustrate the results of the various speed options and values. Having the curve show the same thing(target frame) no matter what mode speed is in, also seems to be improving the clarity of what is going on.

The hold areas are drawn as light boxes, since the curves are drawn as a darker color. The hold boxes needs to be transparent because of freeze frames also can happen at values in between max and min, and transparency keeps the curve visible. Imo, it still lacks a bit of clarity what the light boxes really are, and a pattern could be used to distinguish them from the rest: D12340

TO DO:

  • Find and implement a proper array solution with a dynamic size.
  • The last frame is not drawn correctly.
  • the Stretch mode displays an incorrect hold area, this disappears if the source length takes the out offset into account. It seems to me the stretch needs a better calculation based on clear source duration and a clear target duration, by ex. using hold offsets for source and strip offsets for target, or using the movie strip duration as source and an adjustable speed strip(with handles) duration as target. Ref.: https://developer.blender.org/rBb08ab49cceaba9ad541ae5d50720bae6b5c96c40 and D12337

Additional notes:

  • This patch combines curve drawing and hold color for convenience. The latter can be removed if this design is considered useful.
  • It includes T90920 so in Multiply mode, will negative values lower speed immediately.
  • In effects.c I had to add f-curve lookups to the missing speed modes to get proper curve drawing.
  • If the f-curves are drawn as lines maybe both the target frame and the f-curve: D6110 can be drawn.
  • When changing keys, remember to ctrl+r for refresh of the strip-drawing, unless auto-key is on.
  • When changing speed values while having an f-curve, the preview do no display the temp value. It would be very useful if it did.
  • Additional tweaking of f-curve, target-curve and holds needs to be adjusted if the thumbnail patch is committed.
  • The retiming code seems to prioritize effect strips which doesn't that offsets into account, which makes movie retiming prone to errors and unexpected results: D12337 (however correcting this will be much easier with the target frame drawn on the curve, as it reveals what frame is actually going to be displayed)

Demo file:

Video to be used in the demo file:

Diff Detail

Event Timeline

Peter Fog (tintwotin) requested review of this revision.Sep 3 2021, 10:49 AM
Peter Fog (tintwotin) created this revision.
Peter Fog (tintwotin) edited the summary of this revision. (Show Details)Sep 3 2021, 10:57 AM
Peter Fog (tintwotin) edited the summary of this revision. (Show Details)Sep 3 2021, 11:57 AM
Carbon (CarbonX) rescinded a token.

This patch didn't make it into 3.0. As I do not have anymore time or motivation for a continued investment in the Blender project, I'm giving up on this patch for now.