Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions more in-depth wiggling!

  • more in-depth wiggling!

    Posted by Tom Gomez on February 11, 2012 at 6:34 pm

    Greetings Expressions Geniuses,

    What if I want to wiggle something, but then also adjust based on other expressions?

    FOR EXAMPLE:

    In a “MASTER CONTROL” layer, I have some complex expressions going that result in a value “q”.

    In “LAYER PHOTON”, I want the x position to wiggle, but then the final value at any given time needs to be the final wiggled value, PLUS q.

    I need to do it without adding any effects to LAYER PHOTON, because it is a precomped 3d layer, and effects on it will mess up the 3d stacking order.

    Any thoughts on how to get the value out of my wiggler to use in the expression?

    thanks,

    Tom

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

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

    Immanuel Morales replied 14 years, 2 months ago 3 Members · 7 Replies
  • 7 Replies
  • Tom Gomez

    February 11, 2012 at 6:48 pm

    And as a micro follow-up, is there a way to wiggle just one dimension, without separating dimensions?

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

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

  • Tom Gomez

    February 11, 2012 at 7:13 pm

    This is what I came up with… it seems to be working. (The RIPPLER is a null whose movement affects the z of my target layer, regardless of the wiggling going on.)

    t=thisComp.layer("MASTER CONTROL").effect("wiggle T")("Slider");
    m=thisComp.layer("MASTER CONTROL").effect("wiggle MASTER")("Slider");
    w=wiggle(t,m);

    point1=thisComp.layer("RIPPLER").transform.position;
    point2=transform.position;
    d = length(thisComp.layer("RIPPLER").transform.position,transform.position);
    p=thisComp.layer("RIPPLER").effect("rippler POWER")("Slider");
    r=thisComp.layer("RIPPLER").effect("rippler RANGE")("Slider");
    q=p-(p*(d/r));

    if (q>0) {
    z=(w[2])-q
    }else{
    z=(w[2])
    }

    [w[0], w[1], z]

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

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

  • Todd Kopriva

    February 11, 2012 at 8:25 pm

    > And as a micro follow-up, is there a way to wiggle just one dimension, without separating dimensions?

    There are examples for doing this in After Effects Help, including this example in the section on the wiggle method:

    This example, on a two-dimensional property, wiggles only along the y axis:

    freq = 3;
    amp = 50;
    w = wiggle(freq,amp);
    [value[0],w[1]];

    ———————————————————————————————————
    Todd Kopriva, Adobe Systems Incorporated
    Technical Support for professional video software
    After Effects Help & Support
    Premiere Pro Help & Support
    ———————————————————————————————————

  • Tom Gomez

    February 11, 2012 at 8:29 pm

    Hey Todd,

    I’m rebuilding all these expressions in order to nest them… BECAUSE if you put effects on precomped 3d layers, the layer stacking order doesn’t function in AE…

    I LOVE AE and have been using it for many years. But I just discovered this little pitfall.

    When will this be addressed?

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

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

  • Immanuel Morales

    February 12, 2012 at 3:27 am

    what exactly are you wiggling that you’d need to add an effect? can you please explain? It would help me help you more. here’s what i’ve got:

    //master control's position i suppose
    whateverYourEquationIs();

    //layer photon
    var w = value+[wiggle(float, float)[0],0];
    w + thisComp.layer("master control").transform.position;

  • Tom Gomez

    February 12, 2012 at 7:19 am

    Thanks Immanuel! Your expression is much fancier than mine! 🙂

    (On the effects thing… something I link expressions to sliders to make things quick and easy. Only this time I can’t use sliders because the layers is a precomped 3d layer, and effects will force AE to mess up the stacking order.)

    I was able to get it working with the expression below…

    t=thisComp.layer("MASTER CONTROL").effect("wiggle T")("Slider");
    m=thisComp.layer("MASTER CONTROL").effect("wiggle MASTER")("Slider"); w=wiggle(t,m);

    point1=thisComp.layer("RIPPLER").transform.position;
    point2=transform.position;
    d = length(thisComp.layer("RIPPLER").transform.position,transform.position);
    p=thisComp.layer("RIPPLER").effect("rippler POWER")("Slider");
    r=thisComp.layer("RIPPLER").effect("rippler RANGE")("Slider");
    q=p-(p*(d/r));

    if (q>0) { z=(w[2])-q }else{ z=(w[2]) }

    [w[0], w[1], z]

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

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

  • Immanuel Morales

    February 12, 2012 at 4:22 pm

    Nice, just keep in mind that you can actually refer to other comps in expression like this.

    comp("comp name").effect("Slider Control")("Slider");

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