Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions adding a wiggle to an expression

  • adding a wiggle to an expression

    Posted by Anthony Dupsta on December 2, 2010 at 9:49 pm

    Hey hey,
    I am trying to have my shadow layer “Layer B” turn on when my light source layer turns on “Layer A”, and while it is on, I want the shadow to subtly flicker. Layer B not only is driven by “A” but has a wiggle on it.

    So:
    I have an expression on my shadow layer “B” and it will turn on when the separate light source opacity turns on “A”. Both opacity’s are parented. The light source “A” is actually “lightning” so even though its property opacity is 100, which will turn my shadow on and off, the procedural light source also flickers. I want the lighting opacity “A” to drive my shadow opacity “B”and now in addition I want the shadow pass “B” to also have a random wiggle on it.
    Any thoughts?
    Thanks in advance.

    Dan Ebberts
    replied 15 years, 5 months ago
    3 Members · 2 Replies
  • 2 Replies
  • Kevin Camp

    December 2, 2010 at 10:04 pm

    you can probably just add .wiggle() to the current expression… so it may look something like this:

    thisComp.layer(“A”).transform.opacity.wiggle(5,25)

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Dan Ebberts

    December 2, 2010 at 10:31 pm

    If you want to limit the visibility of B to when A is visible, you might want to do it this way:

    opat = thisComp.layer(“A”).transform.opacity;
    opat > 50 ? opat.wiggle(5,25) : 0

    There are other possibilities as well. If you want a full wiggle that doesn’t get clipped at 100, you could try something like this:

    opat = thisComp.layer(“A”).transform.opacity;
    opat > 50 ? 75 + (rotation.wiggle(5,25)-rotation) : 0

    Dan

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