VSE: Smooth transition for retiming tool #107197

Merged
Richard Antalik merged 20 commits from iss/blender:retiming-gradual into main 2023-05-16 22:33:19 +02:00

This feature implements smooth transition between 2 retimed segments.

A transition can be added by dragging retiming handle while holding
shift key. When any handle defining transition is removed, the
transition segment is removed and 2 linear segments are restored to
state before transition was created.

These transitions work with video and sound and changes are reflected
in waveforms with correct seeking, therefore it replaces usage of
speed_factor or earlier sound pitch property.

Smooth transition is achieved by evaluating Y value of circular arc,
that is tangent to lines of linear retimed segments. Because of this,
when transition length is changed both handles are moved symetrically.
This way it is possible to make transition without affecting content in
linear segments.
When linear segment after transition is further retimed, this shifts
content inside of a transition segment.

To support sound, SEQ_retiming_sound_animation_data_set and related
data structures has been updated to build speed table for each segment.
Layering of retiming data via meta strips is still fully supported.

This feature implements smooth transition between 2 retimed segments. A transition can be added by dragging retiming handle while holding shift key. When any handle defining transition is removed, the transition segment is removed and 2 linear segments are restored to state before transition was created. These transitions work with video and sound and changes are reflected in waveforms with correct seeking, therefore it replaces usage of `speed_factor` or earlier sound `pitch` property. Smooth transition is achieved by evaluating Y value of circular arc, that is tangent to lines of linear retimed segments. Because of this, when transition length is changed both handles are moved symetrically. This way it is possible to make transition without affecting content in linear segments. When linear segment after transition is further retimed, this shifts content inside of a transition segment. To support sound, `SEQ_retiming_sound_animation_data_set` and related data structures has been updated to build speed table for each segment. Layering of retiming data via meta strips is still fully supported.
Richard Antalik added 1 commit 2023-04-20 22:06:03 +02:00
7ff87edc3d WIP: VSE: Gradual retiming
This feature allows to smooth transition between 2 retimed segments.

Smooth transition is achieved by evaluating Y value of arc that is
tangent to lines of linear retimed segments. Because of this, when
transition length is changed both handles are moved symetrically. This
way it is possible to make transition without affecting content in
linear segments.

TODO:
 - Modal move operation results in precision issues. Not sure why, but I assume, that this is result of new `SEQ_retiming_remove_handle()` and workflow "delete gradient, and create new one".
 - It's probably best to make `SEQ_retiming_remove_handle()` work with gradients based on geometry. Workflow mentioned above also invalidates all pointers which makes code ugly.
 - Make visual feedback, that gradient will be added on shift key.
 - Fix label to show gradient.
 - Bunch of limits are probably missing everywhere.
 - Merge with sound support.
Richard Antalik added 1 commit 2023-04-24 02:07:51 +02:00
Author
Member

@blender-bot package

@blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR107197) when ready.
Richard Antalik added 1 commit 2023-04-24 16:32:49 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
00d18f6f0f
Fix incorrect type
Author
Member

@blender-bot package

@blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR107197) when ready.
Richard Antalik added 1 commit 2023-04-24 17:09:52 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
b08e99fb35
fix build error
Richard Antalik added 2 commits 2023-05-02 14:21:49 +02:00
ee11e688bd Implement sound retiming transition.
Unfortunately, as I thought, my arc style transition and simple linear interpolation between 2 speeds results in sound playback being very out of sync.
Will try to calculate speed based on values provided by `seq_retiming_evaluate`. This is horribly unelegant, but will try to make this feature complete before trying to optimize.
Also have to test synchronization to audio, but ut works with retiming already somehow without touching it, so I think that is OK.
Richard Antalik added 3 commits 2023-05-15 20:59:26 +02:00
Richard Antalik added 1 commit 2023-05-16 12:53:42 +02:00
Richard Antalik added 4 commits 2023-05-16 14:59:22 +02:00
Richard Antalik added 1 commit 2023-05-16 15:00:27 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
8c26feff9b
Fix `operator*` function returning address
Author
Member

@blender-bot package

@blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR107197) when ready.
Richard Antalik changed title from WIP: VSE: Gradual retiming to VSE: Gradual retiming 2023-05-16 15:01:18 +02:00
Richard Antalik added 2 commits 2023-05-16 18:46:44 +02:00
Richard Antalik added 1 commit 2023-05-16 21:38:09 +02:00
Richard Antalik force-pushed retiming-gradual from ff0dd536dd to edee24f246 2023-05-16 21:45:45 +02:00 Compare
Author
Member

@blender-bot build

@blender-bot build
Richard Antalik added 1 commit 2023-05-16 22:02:33 +02:00
Richard Antalik changed title from VSE: Gradual retiming to VSE: Smooth transition for retiming tool 2023-05-16 22:31:42 +02:00
Richard Antalik merged commit 4dc026ec8e into main 2023-05-16 22:33:19 +02:00
Richard Antalik deleted branch retiming-gradual 2023-05-16 22:33:20 +02:00
Howard Trickey referenced this issue from a commit 2023-05-29 02:51:39 +02:00
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#107197
No description provided.