Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions triggering a repeated expression based animation with keyframes on another layer

  • triggering a repeated expression based animation with keyframes on another layer

    Posted by Dirk De jong on November 25, 2017 at 9:57 pm

    I’m creating a template where users of the template will be keyframing a parameter on a layer (it happens to be a null with a slider expression control) and I would like those keyframes to be able to trigger simple short pulse style auto-animations on another layer.

    Similar to the idea seen here [ https://helpx.adobe.com/after-effects/using/expression-examples.html#expression_example_animate_scale_at_each_layer_marker ] but instead of being based on markers I would like to be “triggering” the animation based on keyframes from another layer, and I would actually like the animation to be “centered” on the keyframe rather than beginning at the keyframe (so “trigger” isn’t exactly the right work) – this is a screen grab to help illustrate what I’m trying to do. ;

    Basically the expression based animation would be something like an exposure bump and/or a brief blurring (going from zero to some peak value) with the peak occurring at the point in time of the keyframe on the other layer (but paying no attention to the actual value of that keyframe).

    Ideally the expression would also allow for 2 other expression control sliders for the user to define the peak value of the “bump” and the number of frames over which the animation occurs – but I’d be happy just to get started with the basic idea of what I’ve described above… Thanks in advance for any advice.

    Dirk De jong replied 8 years, 5 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    November 25, 2017 at 11:11 pm

    Something like this maybe:


    p = thisComp.layer("Other Layer").effect("Checkbox Control")("Checkbox");
    maxVal = 70;
    dur = 7; // duration of pulse in frames
    if (p.numKeys > 0){
    kt = p.nearestKey(time).time;
    d = framesToTime(dur)/2;
    linear(Math.abs(time - kt),0,d,maxVal,0);
    }else
    value

    Dan

  • Dirk De jong

    November 26, 2017 at 3:47 pm

    Fantastic. Just what I needed. And I think knowing how to do that will be a very useful thing for me. Thanks again.

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