Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions limit wiggle x and y separately

  • limit wiggle x and y separately

    Posted by Blai Graell on August 5, 2010 at 9:50 am

    Hi everyone,

    I want to apply a wiggle expression to a layer so it looks like the camera is shaking. To avoid the layer getting out of frame i have to zoom a little bit on the layer and clamp the wiggle results to the maximum and minimum x and y values before the layer gets out of frame. So i applyed this expression:

    [clamp(863,1054,wiggle(8,70))[0],clamp(493,593,wiggle(8,70))[1]]

    The problem is that while the x values are behaving as i expected, the y values are stuck to 0 and don’t change. Can somebody help me please?

    Blai Graell replied 15 years, 9 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    August 5, 2010 at 5:36 pm

    Your clamp() syntax looks a little off. The first parameter should be the value being clamped (the wiggle value in your case), then the lower limit, then the upper limit.

    clamp() can handle arrays, so this should work:

    clamp(wiggle(8,70),[863,493],[1054,593])

    Dan

  • Blai Graell

    August 6, 2010 at 8:16 am

    Thanks a lot, Dan.

    That’s exactly what i need, it was really helpfull.

    Thanks again.

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