ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Straightening the scale speed

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Alberto Brancolini
Straightening the scale speed
on Sep 4, 2017 at 4:41:34 pm

Hello everybody, hello Dan.

I'm dealing with a footage I tracked. It's a zoom. The goal is to create a transition through the eye of a guy.
After I tracked the footage, I wanted to straighten the scale speed from the moment the curve starts to ease out.
Dan has already made available to the world some text to match the speed of an animation at a chosen frame, and continue from that point ahead. But here's the drill: I'd prefer not to freeze the frame, in order to save as much of the original plate as possible.
So, I thought I could compensate the loss of speed by adding back the difference between the projected curve and the actual curve, and I wrote this (ugly) thing below.

Now, the result... comes back.
I repeatedly checked that the "difference" never turns negative (and it does not, at least within the range of frames I cared about). Nonetheless, the "accum" variable does not constantly increase.

Maybe I'm just confused, but I can no longer troubleshoot this code.
May I get a piece of advice, please?


ref = comp("110_740_TrackingProxy").layer("ZOOM DATA (not stabilized)").transform.scale;
trap = thisComp.layer("110_740_TrackingProxy (parented to SCALE)").marker.key("SpeedTrap").time;
target = sub(ref.valueAtTime(trap),ref.valueAtTime(trap-1/24)); //gets the speed at the specified frame
increment = timeToFrames(time-trap);
counter = 0;
accum = 0;
difference = 0;

if (time >= trap) {

while (counter &lt; increment) {
difference = sub(ref.valueAtTime(time),ref.valueAtTime(time-1/24));
accum += difference;
counter++;
}

value+sub(target*increment,accum);
} else {
value;
}


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]