ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

triggering a repeated expression based animation with keyframes on another layer

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Dirk de Jong
triggering a repeated expression based animation with keyframes on another layer
on Nov 25, 2017 at 9:57:37 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#expres... ] 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.


Return to posts index

Dan Ebberts
Re: triggering a repeated expression based animation with keyframes on another layer
on Nov 25, 2017 at 11:11:34 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



Return to posts index

Dirk de Jong
Re: triggering a repeated expression based animation with keyframes on another layer
on Nov 26, 2017 at 3:47:00 pm

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


Return to posts index

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