Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Combining two expressions

  • Combining two expressions

    Posted by Mervin James on November 1, 2016 at 5:45 pm

    Hi everyone. I have two expressions which im trying to combine to work on the scale property of a shape layer. The first one is a bounce expression and the second is an expression to use a slider to control the scale of a layer (on the second keyframe). It might help to check out the original thread (https://forums.adobe.com/message/9104388#9104388) where I was given the second expression to get an better idea. If anyone can help that would be greatly appreciated.

    Bounce expression

    amp = .1;
    freq = 2.0;
    decay = 4.0;
    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);
    value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
    }else{value}

    Expression to control scale of the layer

    x2 = thisComp.layer("Null 1").effect("Slider Control")("Slider");
    x = ease(time,key(1).time,key(2).time,key(1).value[0],x2);
    [x,x]

    Mervin James replied 9 years, 6 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