Expressions/Scripts/Presets

Moderators: Disciple, zlovatt

 
versa
Topic Author
Posts: 3
Joined: Fri Jul 25, 2008 9:27 am

Bounce from the wall like from the floor

Sat Jul 26, 2008 1:04 am

Try to make effect like here http://www.adobe.com/type/, like a Steve Holmes, from Energy Design make. I find bouncing text effect in AE CS3 presets, but it works only along Y axis (vertical direction). How I can modificate it? Or can some one help with scalebel expression for different tasks? Resume: want to make bouncing effect not from the floor only, but from the right or left wall.

Also find this one at http://forums.creativecow.net/readpost/2/917108, but it bouncing and sliding from the floor :(
For Position:

Vy0 = 800; //initial y velocity (pixels/second) 
Vx0 = 450; // initial x velocity (pixels/second)
g = 2500; // gravity (pixels/second/second)
floor = 400;
e = .85; //elasticity

b = floor - position[1];
h = b + Vy0*Vy0/(2*g);
T = Vy0/g + Math.sqrt(2*h/g);

if (time < T){
y = Vy0*time - g*time*time/2 + b;
}else{
Vy = -(Vy0 - g*T);
while (true){
Vy *= e;
t = T;
T += 2*Vy/g;
if (time < T){
t = time - t;
y = Vy*t - g*t*t/2;
break;
}else if (T - t < thisComp.frameDuration){
y = 0;
break;
}
}
}
[position[0] + Vx0*(-Math.pow(2,-time) +1), floor - y]

:D Thank's for help!
 
User avatar
Atomic
Posts: 157
Joined: Mon Apr 30, 2007 5:55 am
Location: United States, Ohio

Re: Bounce from the wall like from the floor

Mon Jul 28, 2008 9:44 am

What about something like this...

maxDev = 122.20; // max deviation in pixels
spd = 8;  //speed of oscillation
decay = 1.0; //how fast it slows down

t = time - inPoint;
x = position[0];
y = position[1];

//Apply v to the axis you want to modulate.
v = position[0] + maxDev*Math.sin(spd*t)/Math.exp(decay*t);
//y = position[0]*position[1]/v;

[v,y]


Play around with the numbers
"Up And Atom

No...No

Up And At Them!"
 
versa
Topic Author
Posts: 3
Joined: Fri Jul 25, 2008 9:27 am

Re: Bounce from the wall like from the floor

Wed Jul 30, 2008 12:01 am

Atomic, thanks! It works, but the text moves softly to the left and to the right without impact of a "wall" at the left. How it is possible to improve? :?:

UPD I mean, that first time it impacts well and bounce to the right in my case. But after thet it to much slide to the left, doing transition through conditional border of a wall. And effect of bouncing loosing. :(
 
kobyg
Posts: 128
Joined: Fri Dec 07, 2007 10:11 am

Re: Bounce from the wall like from the floor

Thu Jul 31, 2008 4:58 am

Try changing the v expression to this one:

v = position[0] + maxDev*Math.abs(Math.sin(spd*t))/Math.exp(decay*t);

Koby.
 
versa
Topic Author
Posts: 3
Joined: Fri Jul 25, 2008 9:27 am

Re: Bounce from the wall like from the floor

Sat Aug 02, 2008 12:48 am

:lol: Ya-ho-o-oooo! now it's wOrK! Thank you guys!

Who is online

Users browsing this forum: No registered users and 1 guest