Expressions/Scripts/Presets

Moderators: Disciple, zlovatt

 
barrypsuydam
Topic Author
Posts: 9
Joined: Thu May 07, 2009 11:01 am

Random Hold opacity

Fri May 08, 2009 6:38 am

I was wondering if anyone knows how to randomize opacity but while fully opaque hold for random time(1 or 2 sec) then continue.
 
Mylenium
Posts: 139
Joined: Wed Jul 20, 2005 12:07 am

Re: Random Hold opacity

Sat May 09, 2009 9:09 am

barrypsuydam wrote:
I was wondering if anyone knows how to randomize opacity but while fully opaque hold for random time(1 or 2 sec) then continue.


Math.round in combination with a wiggle() or as an alternative, random() used with an array and combined with posterizeTime().

Mylenium
[Pour Mylène, ange sur terre]
 
barrypsuydam
Topic Author
Posts: 9
Joined: Thu May 07, 2009 11:01 am

Re: Random Hold opacity

Mon May 11, 2009 5:33 am

I am new to expressions...and I am sorry to bug you...but can you show me what an example would look like?
 
Paul Tuersley
Posts: 704
Joined: Sat Jun 05, 2004 7:59 am
Location: London, UK

Re: Random Hold opacity

Mon May 11, 2009 6:43 am

Try adding this expression to the Opacity property:
wiggle(1,100);

Then turn on the little graph icon beside the = icon (the icons that appear below the property value when you add an expression) and switch to the graph editor to see the results of the expression. The = icon is the expression on/off button, the graph icon needs to be on for the post-expression result to appear in the graph editor.

The first value in a wiggle expression controls frequency (wiggles per second) and the second controls the amount. So this example will wiggle the value once every second by up to 100%, centered around the original pre-expression value.

If the original value was 100%, you'll find the resulting values stay at 100% for quite a bit of the time, as the values are clamped at the opacity's max value of 100%.

You can also try something like this which will ensure the resulting value is 100% for even longer:
wiggle(1,100)+50;

And then just play around with the values (checking the result in the graph editor) to see if you can get a result you like.

Who is online

Users browsing this forum: No registered users and 5 guests