ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

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

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
val deneliasame AE expression on two properties, working erratically (to me!)
by on Apr 27, 2014 at 6:05:14 pm

Hello experts!

This is what I have currently: http://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?


Return to posts index

George GoodmanRe: same AE expression on two properties, working erratically (to me!)
by on Apr 28, 2014 at 1:29:58 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


Return to posts index

val deneliaRe: same AE expression on two properties, working erratically (to me!)
by on Apr 30, 2014 at 8:05:42 pm

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

Thanks again!


Return to posts index

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