Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Wiggle Exposure

  • Posted by Ryan Butterworth on March 30, 2009 at 8:30 pm

    Hey guys,

    Have a quick question. I have the basic wiggle expression on a layer with the exposure being wiggled back and forth. Is there anything I can type into the expression to not have it go negative. For instance, I only want it to go between 0 and 10.

    Right now, I’m just using wiggle(x,x)

    I’m pretty new to expressions so any help is very much appreciated!

    Thanks
    Ryan

    Kevin Camp replied 17 years, 1 month ago 4 Members · 5 Replies
  • 5 Replies
  • Kevin Camp

    March 30, 2009 at 9:05 pm

    there is a java math function for absolute value, it’s Math.abs().

    just place you wiggle expression inside the math function, so it would look something like this:

    Math.abs(wiggle(x,x))

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Filip Vandueren

    March 30, 2009 at 11:08 pm

    Math.abs() works, but when the change is going fast from positive to negative, you’ll get a sudden bounce where it would normally cross 0.

    a simpler way would be to wiggle with amp 5 -> resulting in +/- 5, but adding 5 to that wiggle, resulting in 0-10

    like:

    wiggle(1,5)+5;

  • Ryan Butterworth

    March 31, 2009 at 3:20 pm

    Thanks!

  • Dotan Stern

    April 1, 2009 at 9:44 am

    Why using random(0,10) wont work in this situation?

  • Kevin Camp

    April 1, 2009 at 4:01 pm

    random may have been too random for the desired effect… wiggle can be a more natural random movement depending on the settings.

    but you’re right, limiting random to positive values would have worked if that type of randomness was what they were looking for.

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy