Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Question about inserting new solid or adjustment layer – resets “random” expressions i.e. wiggle

  • Question about inserting new solid or adjustment layer – resets “random” expressions i.e. wiggle

    Posted by Pawl Fisher on January 3, 2013 at 10:45 pm

    Hello,

    I have had a question for a while now and this is really starting to get in the way of my work. I’m not exactly sure I can explain this properly but here goes.

    So let’s say you have your composition and everything is looking good. And let’s say in this composition you have a layer with an expression that randomizes.. such as the wiggle expression.

    The wiggle expression randomly moves a value and let’s say you love the way it is randomizing that value (example , a null object controlling a camera with a wiggle).

    When you insert a new solid or adjustment layer it goes on top of your composition, After Effects will “re-randomize” the values.

    To plainly see this happen, make a new comp with a text layer and add the wiggle expression to the position. Now insert a new solid or adjustment layer on top and watch the position at your current playhead change.

    How do I prevent AE from doing this? Some comps I will love the way the motion is and I will avoid adding new layers because I don’t want it to re-randomize and screw up the motion and timing that I liked.

    Help!

    Walter Soyka replied 13 years, 4 months ago 3 Members · 7 Replies
  • 7 Replies
  • Ridley Walker

    January 3, 2013 at 11:00 pm

    The random seed in the wiggle expression is based on the layer index (layer number) so this behavior is normal.

  • Pawl Fisher

    January 3, 2013 at 11:03 pm

    -The random seed in the wiggle expression is based on the layer index (layer number) so this behavior is normal.-

    Interesting! So if I need to put an adjustment layer over a layer with a wiggle this is unavoidable? it sounds like there should be a better way than using wiggle in that case. I have AfterShake but I find wiggle to be quick 😛

  • Ridley Walker

    January 3, 2013 at 11:14 pm

    This script might help:

    https://aescripts.com/pt_autoexpress/

    Of course you could PreCompose and nest the comp then apply the adjustment layer.

  • Walter Soyka

    January 3, 2013 at 11:34 pm

    [Ridley Walker] “The random seed in the wiggle expression is based on the layer index (layer number) so this behavior is normal.”

    Dan Ebberts has written a clever expression to seed wiggle expressions based on the layer name instead of its index:

    seed = 0;
    for (i = 0; i < name.length; i++) seed += name.charCodeAt(i);
    seedRandom(seed,true);
    wiggle(......

    Alternately, you could manually seed:
    seedRandom(1,true);
    wiggle(......

    Change the first parameter (here it’s the number 1) in the seedRandom line for different randomness.

    Walter Soyka
    Principal & Designer at Keen Live
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    RenderBreak Blog – What I’m thinking when my workstation’s thinking
    Creative Cow Forum Host: Live & Stage Events

  • Ridley Walker

    January 4, 2013 at 12:36 am

    Clever indeed, thanks for sharing Walter.

  • Pawl Fisher

    January 4, 2013 at 11:58 pm

    Walter, wow that is amazing. So where would I go to insert that code? the script editor? or does that actually go on the expression when you alt click the keyframe button?

  • Walter Soyka

    January 5, 2013 at 4:06 am

    [pawl fisher] “So where would I go to insert that code? the script editor? or does that actually go on the expression when you alt click the keyframe button?”

    Yes, that should be part of the expression when you alt-click the stopwatch.

    Walter Soyka
    Principal & Designer at Keen Live
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    RenderBreak Blog – What I’m thinking when my workstation’s thinking
    Creative Cow Forum Host: Live & Stage Events

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