Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Limiting wiggle

  • Posted by Josh Holdens on July 6, 2013 at 8:02 am

    I’ve searched and have not been able to find anything on this idea. I’m simply trying to limit the wiggle expression to the title safe area. If I had a text layer, I’d want to wiggle around the comp but stay within the title safe area. I’ve taken a look at the random motion documentation but feel that wiggle expression gives better movement.

    Josh Holdens replied 12 years, 10 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    July 6, 2013 at 5:01 pm

    For a layer positioned at the center of the comp, this might do what you want:

    freq = 1;
    w = wiggle(freq,1)-value;
    value + [w[0]*thisComp.width,w[1]*thisComp.height]*.4

    Dan

  • Josh Holdens

    July 7, 2013 at 8:31 am

    this worked great!!! Thanks a ton. I get how it works after adjusting the values, but why is another question entirely. for instance why wiggle(freq,1). How I usually think about the second value is in pixels. so to me this translates to wiggle(1 time per second, 1 pixel) -(subtract) the original value. Finally we take value + [w[0]*thisComp.width,w[1]*thisComp.height] and multiply it by .4. so I’m a little lost as to how/why you chose the #1 in the wiggle expression and multiplied the (value +) section by .4; I really do appreciate your help and expertise.

  • Dan Ebberts

    July 7, 2013 at 4:29 pm

    The .4 multiplied by the comp width and height (assuming the layer is positioned at the center of the comp) represents the boundary of the title safe zone. Limiting the wiggle amplitude to one pixel means that when you multiply the wiggle amount by distances to the title safe boundary, the wiggle will be contained within that zone (sort of–wiggle will somethimes actually generate values greater than the amplitude parameter).

    There are other ways to achieve the same result, but I like the unit-wiggle approach.

    Dan

  • Josh Holdens

    July 8, 2013 at 5:15 am

    Thanks a ton! I’m very excited about learning and mastering expressions. This is a great help. Awesome!

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