Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Quick expression wiggler question

  • Quick expression wiggler question

    Posted by Tom Gomez on April 9, 2013 at 5:36 pm

    Hey Folks,

    Can’t get this to work…

    I’m sure it’s a super simple answer.

    Offsetting position based on previous layer in stack and then wiggling the whole thing…

    THANKS SO MUCH IN ADVANCE!

    -Tom

    w=wiggle (thisComp.layer("Null 1").effect("wiggle a")("Slider"),thisComp.layer("Null 1").effect("wiggle b")("Slider"));

    x=transform.position[0];
    y=transform.position[1];
    z=((thisComp.layer(index-1).transform.position[2]) - 25);

    w[x,y,z]

    ================================================
    YOU can help save TimeSpace. Join the Chronos Protectorate!

    https://www.95ers.com
    https://www.SpaceAceMedia.com

    Tom Gomez replied 13 years ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    April 9, 2013 at 8:07 pm

    You could try it this way:

    w = wiggle (thisComp.layer(“Null 1”).effect(“wiggle a”)(“Slider”),thisComp.layer(“Null 1”).effect(“wiggle b”)(“Slider”));
    x=transform.position[0];
    y=transform.position[1];
    z=((thisComp.layer(index-1).transform.position[2]) – 25);
    [x,y,z] + (w – value)

    Note that doing it this way also picks up the preceeding layer’s z wiggle which pick’s up that of the layer before that, etc., which will give you an accordian type effect. I’m not sure if that’s what you’re after. If it isn’t, you should probably instead calculate a z offset based on the layer’s own index rather than using the previous layer’s z value.

    Dan

  • Tom Gomez

    April 9, 2013 at 9:26 pm

    Thanks Dan!

    Yes, I see what you mean by picking up the previous layer’s wiggle…

    I don’t suppose there’s any way to apply the -25 on the z based on un-wiggled z value of the previous layer? OR, since they’re all just in a stack, could I modify the z value simply based on the layer number?

    ================================================
    YOU can help save TimeSpace. Join the Chronos Protectorate!

    https://www.95ers.com
    https://www.SpaceAceMedia.com

  • Dan Ebberts

    April 9, 2013 at 9:38 pm

    The only way I know of to get a pre-expression value of another property is to have that property publish the value in negative time. For example, if a layer had this position wiggle expression:

    if (time < 0){ valueAtTime(-time) }else{ wiggle(1,100) } another layer could get the pre-expression position value like this: thisComp.layer(index-1).transform.position.valueAtTime(-time); A bit complicated, but it works. Using the layer's index and multiplying by an offset factor (like your 25 value) is a simpler way to go. Dan Edit: Oops-- I made a slight correction

  • Tom Gomez

    April 9, 2013 at 9:46 pm

    Awesome insights and help as usual, Dan! Thank you!

    ================================================
    YOU can help save TimeSpace. Join the Chronos Protectorate!

    https://www.95ers.com
    https://www.SpaceAceMedia.com

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