Discussion:
Using wiggle expression to build a grungy twitch
(too old to reply)
i***@adobeforums.com
2008-08-21 20:19:56 UTC
Permalink
Hi all, I've been playing around with Video Copilot's Twitch plugin which, for what it does, is a great addition to using wiggle expressions to create random effects.

However, it lacks the ability to tap into the actual numerical values that its twitch function is generating, which means you can't use it to drive other parameters, like 3D camera position.

What I've been trying to figure out is how to replicate a twitch-like random value using the wiggle function.

If you scroll down to the graph at the bottom of this page, it will explain how the twitch feature differs from the wiggle feature.

<http://www.videocopilot.net/products/twitch/features/>

Rather than smoothly interpolating between values with the given frequency as wiggle does, twitch give random "bumps" separated by flat space the amount of which is influenced by the user defined frequency.

Ideally, what I'd like to do is make a "spastic wiggle" expression which basically works like a twitch with 6 user definable values:

Max Amplitude (the maximum hight of the twitch)
Min Amplitude (minimum height, could be negative)
Ease-In Time (the time it takes a given twitch to build up to its maximum value)
Ease-Out Time (the time it takes the twitch to return to the base value)
Frequency (influences the space between twitches)
Frequency Spread (the amount of randomness allowed within the frequency. Set to 0 the twitches will hit like clockwork, the rate dependent only on the frequency)

By the time I figured out what this needs to do, I don't think it's even based on the wiggle function any more. Can this be done? Thanks in advance for any help you can offer.
M***@adobeforums.com
2008-08-24 16:57:30 UTC
Permalink
I'm not sure why you wouldn't want to use wiggle() in such a setup. The key point in such a setup would merely be to nest these functions in a way that makes sense. So probably you would create a custom expression control slider to determine the actual "events" and then use code on the actual parameter to modulate a continuous wiggle based around the event. Likewise, you simply would add a third modulation with the ease in, ease out and "is active" ranges. E.g. a simple trigger can be created by using Math.round() on a wiggle limited to a range between 0 and 1. The eases can be determined by cutting the "is active" range in half and determining on which side the active time is, then simply using the ease() methods to remap values. Might take some experimentation and testing to get it working perfectly, but should be absolutely doable.

Mylenium
i***@adobeforums.com
2008-08-24 17:52:17 UTC
Permalink
Okay, I can see how that would work. Let me start working on that and get back to you guys with the results.
Loading...