Random Hold opacity

Moderators: Disciple, zlovatt

Post Reply
barrypsuydam
Posts: 9
Joined: May 7th, 2009, 11:01 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: July 20th, 2005, 12:07 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
Posts: 9
Joined: May 7th, 2009, 11:01 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: June 5th, 2004, 7:59 am
Location: London, UK

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.
Post Reply