FORUMS: list search recent posts

Using expressions with Animators and Range Selectors

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Baga Defente
Using expressions with Animators and Range Selectors
on Apr 27, 2013 at 5:05:05 am

Hi guys!

After many many many years using Cow forums just as a reader to absorb part of your big knowledge, this is my first post. And I'm also new on AE expressions, so sorry if my questions is too noob.

I'm trying to use the famous Inertial Bounce expression in some letters animations, but I don't know where to insert them. For an example: I have a word that I already made the letters rotate on X axis one by one, but where do I insert that expression to make they keep that little swing before stop?

I've tried on the keyframed Offset inside Range Selector, which already has text.animator("Animator 6").selector("Range Selector 1").offset and on the X Rotation where I inserted the desired rotation, that has text.animator("Animator 6").property.xRotation.

Can anybody help me?

Many thanks,
baga


Return to posts index

Dan Ebberts
Re: Using expressions with Animators and Range Selectors
on Apr 27, 2013 at 5:48:51 am

To get per-character bounce, you'll need to use an Expression Selector, where you can use textIndex to target individual characters/words. There are a couple of examples here, similar to what you are trying to do:

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


Dan



Return to posts index

Baga Defente
Re: Using expressions with Animators and Range Selectors
on Apr 28, 2013 at 7:13:59 pm

Hi Dan,

the link you provided is very interesting and taught me nice things, thanks for it!

but I still couldn't get what I want, maybe cause I didn't make myself clear or cause I don't know how to play with textIndex, Expression Selector and things like that.

I'm also made a search for those things and found another tread where you helped another guy with some similar problem, then I realized that if I use the Text Bounce preset and insert a Opacity property to the same animator set to 0% I almost get what I want...

The letters appears from 0% opacity, drops and bounces, but when they rise up a little before drop again, the opacity is still active and (weaker than before), but I want it just when the effect begins.

(UPDATE) after reply above, I realized other thing: the Text Bounce preset appears to be link with the comp time, 'cause if I move the layer to let's say 00:01:00 instead of 00:00:00, the letters didn't start to drop from the top, and I need to have the possibility to display the words along the movie. Any thoughts?

Once again thanks for your help,
baga


Return to posts index



Dan Ebberts
Re: Using expressions with Animators and Range Selectors
on Apr 28, 2013 at 7:46:59 pm

To get it to start relative to the layer's in point, you need to change the amount expression to this:

f = effect("Bounce Frequency")(1);
// 0 means start at bottom, 1 means start at stop
phase_start = effect("Bounce Start")(1) / 100;
character_delay_param = effect("Bounce Per-Character Delay")(1).value;
character_delay_index = textIndex - 1;
if (character_delay_param < 0) {
character_delay_param = -character_delay_param ;
character_delay_index = (textTotal - textIndex);
}
character_delay = character_delay_param * character_delay_index;
t = (time-inPoint) * f - character_delay;
if (t < 0) {
t = 0;
}
t += phase_start;
w = 2;
bounce_num = Math.floor(t / w);
t = t % w;
y = t * (w - t);
decay = effect("Bounce Decay")(1) / 100;
h = Math.pow(decay, bounce_num);
-h + h*y * selectorValue


To get the opacity to operate only before the first bounce, you would need to add an new animator and expression selector for opacity, with an amount expression like this:


f = effect("Bounce Frequency")(1);
// 0 means start at bottom, 1 means start at stop
phase_start = effect("Bounce Start")(1) / 100;
character_delay_param = effect("Bounce Per-Character Delay")(1).value;
character_delay_index = textIndex - 1;
if (character_delay_param < 0) {
character_delay_param = -character_delay_param ;
character_delay_index = (textTotal - textIndex);
}
character_delay = character_delay_param * character_delay_index;
t = (time-inPoint) * f - character_delay;
if (t < 0) {
t = 0;
}
t += phase_start;
w = 2;
bounce_num = Math.floor(t / w);
if (bounce_num == 0){
t = t % w;
y = t * (w - t);
decay = effect("Bounce Decay")(1) / 100;
h = Math.pow(decay, bounce_num);
-h + h*y * selectorValue
}else
0


Dan



Return to posts index

Baga Defente
Re: Using expressions with Animators and Range Selectors
on Apr 28, 2013 at 8:17:17 pm

That's done the job, Dan!

many many thanks!
=)

best wishes,
baga


Return to posts index

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