Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Wiggle expression on scale, but only make smaller

  • Wiggle expression on scale, but only make smaller

    Posted by Dustin Wilson on July 21, 2015 at 2:34 pm

    I’m working on a project and need to have multiple layers wiggle the scale uniformly, but only make them smaller, and not larger.

    I have all the layers using a slider control to animate the effect on and off, but I can’t figure out a way to restrict the wiggle to make them smaller only.

    Can anyone lend a hand?

    Here’s the current expression if it makes any difference (I have a couple different layers for expressions, hence the names 🙂 hopefully that doesn’t make it more confusing):

    w = wiggle(thisComp.layer(“frequency”).effect(“Slider Control 2”)(“Slider”),thisComp.layer(“amounts”).effect(“Slider Control 2”)(“Slider”));
    [w[0],w[0]]

    Thanks!

    Dustin Wilson replied 11 years ago 2 Members · 6 Replies
  • 6 Replies
  • Kevin Camp

    July 21, 2015 at 3:38 pm

    you could just subtract the wiggle from the scale value…

    try changing w to something like this:
    w = value[0] - Math.abs(wiggle(thisComp.layer("frequency").effect("Slider Control 2")("Slider"),thisComp.layer("amounts").effect("Slider Control 2")("Slider"))[0]);
    [w, w]

    Kevin Camp
    Art Director
    KCPQ, KZJO & KRCW

  • Dustin Wilson

    July 21, 2015 at 3:53 pm

    Thanks for taking the time to look into this.

    I tried your solution, but it didn’t seem to make a difference. They are still getting larger… Am I missing something?

  • Kevin Camp

    July 21, 2015 at 5:04 pm

    we needed to remove the base value from the wiggled value, then subtract it… this seems to work:

    freq = 5;
    amount = 35;
    w = wiggle(freq, amount);
    s = scale[0] - Math.abs(w[0] - scale[0]);
    [s, s]

    just link your sliders to the corresponding variables.

    Kevin Camp
    Art Director
    KCPQ, KZJO & KRCW

  • Dustin Wilson

    July 21, 2015 at 7:42 pm

    Kevin, again, I really appreciate you taking the time.

    I started a new comp and just dropped in your expression to see if it was the slider causing the problem, but I’m still not getting the result I’m looking for (object doesn’t enlarge, only shrinks).

    This seems like it would work, from what you’ve shown, but it still isn’t working for me. If it’s working for you, would you mind linking me a file that it’s working in?

    Sorry for the trouble!

  • Kevin Camp

    July 21, 2015 at 10:07 pm

    i may be missing what you’re after, but here’s a file with a solid that has that wiggle expression that makes the scale only change to a smaller value:

    9065_wigglenegonly.aep.zip

    i added a transparent red square of the same size (w/o the expression) to show that the wiggle scale never exceeds that size.

    Kevin Camp
    Art Director
    KCPQ, KZJO & KRCW

  • Dustin Wilson

    July 22, 2015 at 2:37 pm

    Ok. I’m an idiot. I apologize. This has been working all along, but I apparently had only copied the expression to one of my layers, not all of them.

    Sorry for making you put forth even more effort than you needed to! And thanks again for all your help! It is very much appreciated!

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