FORUMS: list search recent posts

# Inertial Bounce

FAQ   •   VIEW ALL
 Inertial Bounce on Nov 5, 2014 at 6:03:43 pm

Hi guys I'm Ruel,

I'm just new here at creative cow. I am barely new at using expressions in range selector and I'm having a bad time. I tried putting this in the Expression Selector.

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 < 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;
}

Then after that, it ruins all the timings of the key frames that I made from the Range Selector. I don't really know what to do next. Where should I put the Expression, how to make it not ruin the key frames from Range Selector, and does this expression that I'm using is correct?

```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; }```

 Re: Inertial Bounceon Nov 5, 2014 at 6:47:43 pm

It's not clear exactly what you're trying to do, but in general, an expression for an expression selector will involve textIndex to get it to act on a per-character basis. There are a couple of examples here:

http://www.motionscript.com/articles/bounce-and-overshoot.html#calc-oversho...

Dan

 Re: Inertial Bounceon Nov 6, 2014 at 10:28:59 am

Hi dan thanks for the quick response. I got my text bounce using your expression that was posted from another thread.

maxDelay = 2; seedRandom(textIndex,true); myDelay = random(maxDelay); t = time - myDelay; if (t >= 0){ freq =3; amplitude = -100; decay = 1.0; s = amplitude*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t); [s,s] }else{ value }

After using this i don't know how to key frames the timing since im making Lyric video (kinetic typography). I want to move/change the transition of the words. I dont see any options how to do that by looking at the Expression selector.

 Re: Inertial Bounceon Nov 6, 2014 at 5:29:07 pm

You could trigger the words using layer markers. See this thread:

Dan

 Re: Inertial Bounceon Nov 7, 2014 at 5:24:22 am

So meaning this Layer Markers serves as key frames? i just have change the "Based On" option in Expression Selector from Character to Words? Then after i paste the expression to the Amount. The transitions of the words will follow the Marks?

 Re: Inertial Bounceon Nov 7, 2014 at 7:11:03 am

That's the basic idea.

 Re: Inertial Bounceon Nov 7, 2014 at 10:41:14 am

Thank you very much Dan! ill work on this later. You helped me a lot. :D

 Re: Inertial Bounceon Nov 7, 2014 at 11:19:21 am

Dan, i used the the expression that you gave after putting the layer markers... i put animate scale and put it into 0 and delete then i added the expression selector. But when i RAW played it nothing happens and i really don't know what to next. I'm really new to expression so i am having a hard time. Do i have to change/add something to the composition markers?