Activity › Forums › Adobe After Effects › How can I wiggle only one way?
-
How can I wiggle only one way?
Posted by Daniel Haskett on October 25, 2007 at 12:58 amHi there
basically you know wen you apply a wiggle of say 6 to a layer, does it wiggle 3 either way…or 6 either way? well anyway, basically i want it to just wiggle 6 positive. so say the value is 5, i want it to wiggle between 5 and 11….is this possible to do? im sure ive seen it done before, i just cant remember!
thanks in advance
dan
Todd Kopriva replied 18 years, 10 months ago 3 Members · 3 Replies -
3 Replies
-
Kevin Camp
October 25, 2007 at 1:45 amhere is a link to dan ebbert’s one dimensional wiggle example and explanation on motionscript.com.
Kevin Camp
Designer – KCPQ, KMYQ & KRCW -
Todd Kopriva
October 25, 2007 at 4:45 amI think that Daniel was asking about how to wiggle in only one direction, not along only one dimension.
Daniel, in your specific example, you ask about wiggling in the positive direction from 5, to range from 5 to 11. My first thought is this: Why not wiggle around a value of 8 with a magnitude of 3, which would give you a range from 5 to 11?
However, if you need to have your base value be 5, then this will work (on a property whose value is 5):
frequency=100; // …or whatever frequency you want
amplitude=6;
value+Math.abs(value-wiggle(frequency,amplitude))The only trick here is the Math.abs method, which is a standard JavaScript method for the absolute value. The absolute value of a number is its distance from zero, so it basically just strips the negative sign off of negative numbers.
There is a slight difference between using this approach and just wiggling around 8 with a magnitude of 3; basically, the approach using the absolute value will have some sharper transitions “bouncing” off the 5 value.
I hope that this helps.
————————————————————————————————–
Todd Kopriva, technical editor, Adobe Systems Incorporated
putting the ‘T’ back in ‘RTFM’ : After Effects Help on the Web
————————————————————————————————–
How about taking a survey about After Effects documentation? Please?
————————————————————————————————– -
Todd Kopriva
October 25, 2007 at 5:19 amBTW, this might belong more on the expressions forum. I don’t know if the expressions masters check this forum as much.
————————————————————————————————–
Todd Kopriva, technical editor, Adobe Systems Incorporated
putting the ‘T’ back in ‘RTFM’ : After Effects Help on the Web
————————————————————————————————–
How about taking a survey about After Effects documentation? Please?
————————————————————————————————–
Reply to this Discussion! Login or Sign Up