# AE ENHANCERS

Expressions/Scripts/Presets
 It is currently Fri May 24, 2013 2:54 pm

 All times are UTC - 8 hours [ DST ]

 Page 1 of 1 [ 3 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Expression for offset and bouncePosted: Fri Oct 21, 2005 12:49 pm

Joined: Thu Oct 20, 2005 12:49 pm
Posts: 1
I'm trying to simulate the look of a slot machine. I'm using the offset filter with a strip of images, and it's working well. What I can't get it to do is give me that bounce.

Can anyone point me in the direction of where to begin with an expression to do this? I'm an absolute neophyte when it comes to expressions.

Thanks,
Chris

Top

 Post subject: Posted: Mon Oct 24, 2005 12:04 pm

Joined: Fri Aug 12, 2005 8:54 am
Posts: 9
Location: Rochester, NH
I would check Dan Ebberts' amazing expression site Motionscript.com.

After going through the basics of expressions, check out the section on physical simulations:

http://www.motionscript.com/mastering-e ... ics-3.html

Using sine waves and exponential decay, you should be able to build a very decent bounce for your offset effect.

Top

 Post subject: Posted: Mon Oct 24, 2005 2:35 pm

Joined: Fri Aug 12, 2005 8:54 am
Posts: 9
Location: Rochester, NH
If you need a fast solution, set two keyframes for the spinning motion, and try this expression on the 'shift center to' property of Offset:

freq = 10;
amplitude = 25;
decay = 5.0;

t = time - key(numKeys).time;
x = scale[0] + amplitude*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
if (time < key(numKeys).time)
thisProperty else [thisProperty[0], thisProperty[1]+x]

After your last keyframe, there should be a fairly decent decaying bounce. Adjust your freq, amplitude and decay settings as needed.

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 3 posts ]

 All times are UTC - 8 hours [ DST ]

#### Who is online

Users browsing this forum: No registered users and 1 guest

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ Announcements    Announcements Expressions    Expressions Library    Expressions Tutorials    Expression Discussion Scripts    General Scripts Library    Script Tutorials    Scripts Discussion    Script requests User Scripts    Paul Tuersley's Scripts    Impudent 1's Scripts Animation Presets    Animation presets Library