Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Straightening the scale speed

  • Straightening the scale speed

    Posted by Alberto Brancolini on September 4, 2017 at 4:41 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 < increment) {
    difference = sub(ref.valueAtTime(time),ref.valueAtTime(time-1/24));
    accum += difference;
    counter++;
    }

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

    Alberto Brancolini replied 8 years, 11 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy