Discussion:
How to wiggle opacity - either 0 or 100% (nothing inbetween)
(too old to reply)
N***@adobeforums.com
2006-08-19 21:30:18 UTC
Permalink
Hey all. How do I make a wiggle expression that picks only within a set of values? For example, I want a layer to flicker with either 0% or 100% opacity (but no values in between).

The standard "wiggle (5,100)" isn't making my layer strobe enough.

I'd really appreciate any help. It's something with arrays, isn't it?
R***@adobeforums.com
2006-08-19 22:19:04 UTC
Permalink
Try this:

wiggle(1, 1, octaves = 5, amp_mult = 100)

It's not arrays, it's octaves and multiplication of the amplitude.
A***@adobeforums.com
2006-08-19 23:29:12 UTC
Permalink
This post might be inappropriate. Click to display it.
R***@adobeforums.com
2006-08-20 04:28:15 UTC
Permalink
Aaron, Did you try my expression? It only generates values of 0 or 100 when used on opacity. You can generate values between 0 and 100 amp_mult values of as little as 20. When used for opacity you get a very short ramp up and down, rather than a switch on and off as in your expression. Either will work, but you can get to mine by simply plugging values into an expression generated by AE's built in Expression Language Menu.

My solution won't work for position though, because position isn't limited from 0 to 100.
A***@adobeforums.com
2006-08-20 05:03:27 UTC
Permalink
Oh, sorry, you're right. Got stuck on the octaves part.
N***@adobeforums.com
2006-08-20 18:19:18 UTC
Permalink
Thanks guys! You're the best!

While they both work, Rick's octave method seems to produce more random flashing in my layer.

Would there be a way to further refine this? For example, if it's been the same value for x amount of frames, force it to flip to other extreme?

And could I add a "seedRandom (nnn)" to each layer so they aren't flashing in sync?
A***@adobeforums.com
2006-08-20 21:51:23 UTC
Permalink
wiggle() seeds itself using the layer index, so layers in the same comp shouldn't flash in sync. As for the x frames thing, have you tried increasing the frequency? It might give you the result you are looking for without a lot of complicated code.
N***@adobeforums.com
2006-08-21 02:32:32 UTC
Permalink
Like increasing the frequency beyond my comp's FPS? Interesting! I hadn't thought of that.
A***@adobeforums.com
2006-08-21 02:55:07 UTC
Permalink
Be sure to take a look at the graph being generated by the expression. It might help you fine-tune this stuff.
Loading...