Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects same AE expression on two properties, working erratically (to me!)

  • same AE expression on two properties, working erratically (to me!)

    Posted by Val Denelia on April 27, 2014 at 6:05 pm

    Hello experts!

    This is what I have currently: https://reels.creativecow.net/film/4circles

    I would like my four circles to sort of push each other away upon appearing.

    To this end, I’ve used the expression below (inertial bounce), which I’ve used before without any problems, to both the SIZE and POSITION properties.

    ———————
    n = 0;
    if (numKeys > 0){
    n = nearestKey(time).index;
    if (key(n).time > time){
    n–;
    }
    }
    if (n == 0){
    t = 0;
    }else{
    t = time – key(n).time;
    }

    if (n > 0){
    v = velocityAtTime(key(n).time – thisComp.frameDuration/10);
    amp = .03;
    freq = 4.0;
    decay = 5;
    value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
    }else{
    value;
    }
    ————————–

    This is what my layers look like, with the keyframes:

    BUT: it only seems to work on the last sequence (when the last circle comes in), and only on the SIZE property, which rather puzzles me…

    What am I doing wrong?

    Val Denelia replied 12 years, 3 months ago 2 Members · 2 Replies
  • 2 Replies
  • George Goodman

    April 28, 2014 at 1:29 pm

    Remove the easing from the keyframes and see if that fixes it for you.

    PS – when dealing with shape layers, make sure to specify “scale property” rather than size. Size is a different parameter within parametric shape layers. Was irrelevant in this case especially since you included a screenshot, but just wanted to mention that.

    “|_ (°_0) _|”

    Sincerely,

    George

  • Val Denelia

    April 30, 2014 at 8:05 pm

    Yep, that did it! Thank you very much for the mystery-solving! And also for the vocabulary clarification, duly noted.

    Thanks again!

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