AE ENHANCERS

Expressions/Scripts/Presets
It is currently Thu Sep 02, 2010 3:48 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Creating a falling leaf effect
PostPosted: Mon May 24, 2004 11:15 am 
Offline

Joined: Fri May 21, 2004 3:03 pm
Posts: 20
Posted by Dan Ebberts on AE List June 18 2003

A falling leaf can be a pretty complicated simulation - sometimes they just
fall gently, sometimes they do barrel-rolls, sometimes glide back and forth, or
any combination. These expression roughly simulate the glide back and forth
variation. I tried this on a 3D solid positioned above the camera view,
oriented with Z pointing down and Y pointing in the positive Z direction
(orientation [90,0,0]).

Then I added these three expressions:

POSITION:

yVelocity = 200; //pixels per second
oscFreq = 1.5; //oscillations per second
oscDepth = 35; //oscillation depth (pixels)
drift = 25; // drift (wind?) (pixels per second: - = left, + = right)

value + [oscDepth*Math.sin(oscFreq*Math.PI*2*time) + drift *time,
yVelocity*time,0]


Z ROTATION:

seed_random(index,true);
random(360);


Y ROTATION:

oscFreq = 1.5;
maxTilt = 15; //degrees

maxTilt*Math.cos(oscFreq*Math.PI*2*time)



If you edit the parameters, you need to make sure that the oscillating
frequency is the same in both the position and y-rotation expressions (or map
it to a slider control). If you wanted to apply this to a bunch of leaves,
you'd want to introduce some randomness into the various parameters along with
a random starting phase.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group