ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Wiggle + bounce effects on scale

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Martín Riera
Wiggle + bounce effects on scale
on Mar 14, 2019 at 6:43:36 pm

Hello to everyone,

I'm quite new on after effects scripts and this could be an easy question for most of you but for me is something impossible to solve. I would like to use in a layer two different animations on Scale, on one side a wiggle that should be working all the time; on the other side, at second 9 the layer' scale gets increase and I want to use a bounce effect on it. I tried these two functions independently and they work well, but when I write both together on the Scale scripts just works one of them...

How can I use more than one function on the same script, this is a limit that I always have when using scripts?

Thanks!!

Martin R.

/*Animation1*/
w = wiggle(5,3);
[w[0],w[0]]

/*Animation2*/
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 && t &lt; 1){
v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
amp = .05;
freq = 4.0;
decay = 8.0;
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{
value;
}


Return to posts index

Tomas Bumbulevičius
Re: Wiggle + bounce effects on scale
on Mar 14, 2019 at 9:33:19 pm

Martin,

expression can generate only one final property driving result. Instead, consider one of the followings:

a) Add 'Transform' effect to a layer and apply wiggle effect to its scale transformation (If its selected to Uniform scale, use only wiggle(5,3) without further array).
b) Add null, place it at the center of a layer, parent layer to null and apply wiggle.

On the layer, add the second expression to scale. Its a workaround, but should solve it.

Find out more:
After Effects Tutorials: motion design, expressions, scripting.


Return to posts index

Martín Riera
Re: Wiggle + bounce effects on scale
on Mar 19, 2019 at 7:28:24 pm

Thanks Thomas! Useful videos there, I think I'll use them :D


Return to posts index

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