Copy link to clipboard
Copied
I'm using an bounce/overshoot expression on the position property of an animated element. On big moves, I want the bounce value to be higher - but on smaller movements I don't want it so dramatic. It seems like the expression is independent of the keyframes - and if change a variable in the expression it changes it for the entire timeline - vs just certain keyframes. Is this possible?
You can also use ExpressionTimeline to combine several instances of your expression with different parameter settings.#
Here is a tutorial showing how to use ExpressionTimeline:
Limit Expressions to a Range of Keyframes with Expression Timeline | mamoworld
Copy link to clipboard
Copied
It depends on your expression and how it's written.
For stuff like this, I'll often make some of the numbers in an expression be variables which are tied to Expression Control effects.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Dan - its your script on that page that I'm actually using! It's great... But Maybe I'm not implementing it correctly. How can i change the values per keyframe vs the timeline as a whole?
Copy link to clipboard
Copied
I suppose you could create frequency and decay arrays, with entries for each keyframe and modify the expression to something like this:
freqArray = [3,2,1,4];
decayArray = [5,6,7,6];
n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time) n--;
}
if (n > 0){
freq = freqArray[Math.min(n-1,freqArray.length-1)];
decay = decayArray[Math.min(n-1,decayArray.length-1)];
t = time - key(n).time;
amp = velocityAtTime(key(n).time - .001);
w = freq*Math.PI*2;
value + amp*(Math.sin(t*w)/Math.exp(decay*t)/w);
}else
value
Dan
Copy link to clipboard
Copied
First, I want to thank @Dan Ebberts and @Mathias Moehl for their long lasting contributions to this community! We all stand on your shoulders...
Alternately, if you are someone like myself with tonnes of AE/compositing experience, but not a deep/real understanding of expressions, you could use one value, like a slider, as an animated multiplier.
I've been scouring the web for a way of transitioning from one position (user controlled via a mogrt in Premiere), to another predetermined position. I had been thinking keyframes, which was breaking my brain, until I remembered this old trick of "fading" the intensity of a value by multiplying it by 1 or 0.
What I like about this method, is that it gives the dynamics controls back to a user who is comfortable in the graph editor, giving traditional animation tools back to the AE user to help shape the intimidating expression for their needs.
In the hopes that this is helpful to the odd ones out there who may be in a similar position to myself:
I created a controls layer and added a Point Control and Slider effect, under expression controls.
On the layer you want to apply the "fade/transition" to a property, in this case X position (separated to X,Y), paste this expression in to the value:
BASE_X = transform.xPosition;
U_OFFSET = thisComp.layer("Controls").effect("Point Control")("Point")[0];
FADE = thisComp.layer("Controls").effect("TRANSITION")("Slider");
[BASE_X+(U_OFFSET*FADE)]
Here is a screen grab of the comp.
Ive used this before for creating transition animations on expression driven graph heights, and its useful for anything you can imagine a multiplier working on... combine with Linear. to remap from one type to another.
I hope this is helpful to someone!
David
Copy link to clipboard
Copied
You can also use ExpressionTimeline to combine several instances of your expression with different parameter settings.#
Here is a tutorial showing how to use ExpressionTimeline:
Limit Expressions to a Range of Keyframes with Expression Timeline | mamoworld
Copy link to clipboard
Copied
Yes - this is exactly what I was looking for. Thank you!