AE ENHANCERS

Expressions/Scripts/Presets
It is currently Sat Oct 25, 2014 7:29 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Simple expression for varying opacity over specific time
PostPosted: Fri Mar 28, 2008 11:50 am 
Offline

Joined: Fri Mar 28, 2008 10:00 am
Posts: 2
Hello,

I have a layer I want to vary the opacity of in a random way between certain values so I enable expressions for the opacity and use the following:

random(60,20)

Easy.

However, I don't want this value to be randomized on every frame, but rather every 15 frames or .5 seconds. It's probably way simple for some of you, but for me scripting is rather challenging!

Thanks!

-GJ


Top
 Profile  
 
 Post subject: Re: Simple expression for varying opacity over specific time
PostPosted: Fri Mar 28, 2008 12:08 pm 
Offline

Joined: Sat Jun 05, 2004 7:59 am
Posts: 698
Location: London, UK
If you want something that gradually changes over time, you could set the Opacity value to the middle of your desired value range (i.e halfway between 20-60 is 40) then use this expression. The first number is wiggles per second, the second number is the max amount the value will change.
wiggle(1,20);

Or if you want an abrupt change in value, but not on every frame, you could use this expression. Although the second line would normally create a new random value between 20 and 60 on each frame, the preceding posterizeTime(frames per second) method is lowering the frame rate of the resulting expression.
posterizeTime(2);
random(20,60);


Top
 Profile  
 
 Post subject: Re: Simple expression for varying opacity over specific time
PostPosted: Fri Mar 28, 2008 12:32 pm 
Offline

Joined: Fri Mar 28, 2008 10:00 am
Posts: 2
perfect - works for me! Thank you much! -g


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

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