-
Notifications
You must be signed in to change notification settings - Fork 307
Allow Effects to be applied BEFORE or AFTER a clip's keyframes #932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… AFTER a clip's keyframes are applied. For example, this allows for a mask to apply after an animation/movement is applied to the clip image, like an animated scrolling credits to be masked/faded in a static location.
…e capability to Crop effect.
Codecov Report
@@ Coverage Diff @@
## develop #932 +/- ##
===========================================
+ Coverage 53.66% 53.93% +0.27%
===========================================
Files 182 182
Lines 16829 16917 +88
===========================================
+ Hits 9031 9124 +93
+ Misses 7798 7793 -5
... and 4 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
Not sure if I was affected by this just recently. The issue I had was applying a mask to a clip that had been stretched due to SCALE_CROP. The clip was an image that was very wide but thin, i.e. 1000px wide by 20px high, it had a mask effect applied and a scale keyframe added. I think what happens is the clip is scaled due to SCALE_CROP so it becomes really wide to fit in a 1920 x 1080 video, the width will be > 100000's of pixels wide by 1080px high. The mask is then applied to the huge area, which makes it very very slow. Then a scale was added to shrink it down again to fit in 1920px x 1080px. This might seem like a bit of an edge case and of course you would be better off using SCALE_NONE, but it did make me think if the scaling is done first and then the mask applied then you would be applying the effect on the original shape and not the massive scaled shape. Anyway I am keen to see if this fixes that scenario because it would be huge performance boost. |
|
@jeffski Applying the mask effect after the clip keyframes is much more efficient. I experienced the exact issue you mentioned in the example video above, where I have a tall, skinny SVG image of all credits. Applying the mask before, is very slow per frame, but applying the mask after, is only masking the visible portion of the SVG credits image, and thus, is super fast. |
Effects are currently processed before we apply keyframes on each clip object. This is usually the preferred sequence of events, for example, we might want to apply a crop or mask before we position and resize the clip (i.e. process the clip’s keyframes).
However, there are times when it makes sense to apply an effect after the clip keyframes, for example, we might want to animate some scrolling credits moving down the screen, and apply a mask AFTER we have applied the clip keyframes. In this example, the scrolling credits might fade away mid-screen due to a mask… but because we apply this mask after the clip keyframes, it would appear to animate down the screen and fade away at a static location.