Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects expressions advice: multiple layers wiggling position separately random but adjustable by one “controller” layer

  • expressions advice: multiple layers wiggling position separately random but adjustable by one “controller” layer

    Posted by Jeremy Webb on October 27, 2011 at 8:18 pm

    my apologies, I didn’t realize there was a expressions-specific forum. I have reposted there.

    Hello, I have a comp that has a lot of layers that I want to wiggle in x and z position. I want them all move to a different position each frame but not as a group. I also want to be able to adjust approximately how much they move from one control laye

    what I have tried is using the seperate xyz preset and putting the wiggle expression on and for amplitude, pickwhipping a slider effect on a null layer. but this seemed to make them all move the same as if they were parented.

    how would i go about doing this

    I am not very good with expressions, but am trying to hack together something that works and would really appreciate any help

    Adam Goddard replied 12 years, 10 months ago 3 Members · 4 Replies
  • 4 Replies
  • Roland R. kahlenberg

    October 28, 2011 at 2:14 am

    Two sliders will allow for better control.

    Create a Null Layer and rename it Controller.
    Apply 4 Expression Sliders to the Controller Layer and rename them as follows:
    1) X Frequency
    2) X Amplitude
    3) Z Frequency
    4) Z Amplitude

    Then paste the following script into the first layer that you want to affect. Then select its position property and select, from the Menu, Edit > Copy Expression Only. Then select all the other layers you want to affect and paste (CTRL + V)

    //Start of Script
    [wiggle(thisComp.layer(“Controller”).effect(“X Frequency”)(“Slider”),thisComp.layer(“Controller”).effect(“X Amplitude”)(“Slider”))[0],value[1],wiggle(thisComp.layer(“Controller”).effect(“Z Frequency”)(“Slider”),thisComp.layer(“Controller”).effect(“Z Amplitude”)(“Slider”))[2]]
    // End of Script

    Take note that Frequency affects the number of times per second the wiggle kicks in while amplitude is the maximum deviation (in +ve and -ve aspects) of the affected value/property.

    The Slider values can of course be keyframed to suit your needs. Lots of other ways to skin this cat but hopefully this is a start from which you can tweak the result to better suit your needs.

    HTH
    RoRK

    Intensive AE & Mocha Training in Singapore and Malaysia
    Adobe ACE/ACI (version 7) & Imagineer Systems Inc Approved Mocha Trainer

  • Jeremy Webb

    October 28, 2011 at 7:46 pm

    thanks so much roland! the cat has been sufficiently skinned and I have retained control of the skinning details.

    much appreciated

  • Roland R. kahlenberg

    October 29, 2011 at 6:49 am

    Awesome news Jeremy!

    Cheers
    RoRK

    Intensive AE & Mocha Training in Singapore and Malaysia
    Adobe ACE/ACI (version 7) & Imagineer Systems Inc Approved Mocha Trainer

  • Adam Goddard

    July 9, 2013 at 5:19 am

    Hi I am trying to use this expression technique – how do I get it to wiggle the ‘y’ axis?

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