Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Slider Expression to Control Influence of Parent.

  • Slider Expression to Control Influence of Parent.

    Posted by Dustin Bowser on September 1, 2015 at 5:57 pm

    I believe I’ve come across this before in the past, but can’t seem to find it anywhere at the moment.

    I have something that is tracked to a piece a footage, via parenting to a Null. What I would like to do is be able to animate a slider to lessen the influence of the parenting until the layer is not being tracked at all.

    Thanks for any help!

    Andy Engelkemier replied 6 years, 1 month ago 6 Members · 7 Replies
  • 7 Replies
  • Dan Ebberts

    September 1, 2015 at 10:41 pm

    What determines the layer’s position when the influence slider is at zero? Are you just talking about position?

    Dan

  • Dustin Bowser

    September 1, 2015 at 10:53 pm

    Basically I want something to go from being tracked, all the way to not being tracked.

    What I’m doing is placing a composite element within a shot that morphs to something from within the plate itself, so at first it needs to be tracked in, but then when the morph happens it needs just be exactly as the underlying plate is with no added animation, but I have to hand between these two moments seamlessly

    The tracking data is position, scale, and rotation.

  • Dave Docimo

    October 2, 2015 at 3:21 am

    I have the exact some problem as Dustin. Hopefully there is a solution out there.

  • James Paulley

    April 24, 2018 at 3:41 pm

    Did anyone ver get anywhere with this?

  • Dan Ebberts

    April 24, 2018 at 7:27 pm

    It’s tricky because, if I understand the question, you want the parented layer to keep any accumulated movement that was based on previous values of the slider. If that’s the case, the only way I can think of is a brute force, frame-by-frame integration, something like this:


    pos = thisComp.layer("leader").transform.position;
    pct = effect("Slider Control")("Slider");
    dAccum = 0;
    f = timeToFrames(time);
    for (i = 1; i <= f; i++){ t = framesToTime(i); cPct = pct.valueAtTime(t)/100; dAccum += (pos.valueAtTime(t) - pos.valueAtTime(t-thisComp.frameDuration))*cPct; }

    It could get bogged down if your comp goes on for quite a while.

    Dan

  • Kalleheikki Kannisto

    April 29, 2018 at 2:33 pm

    It seems to me that you should be able to fade between the position, scale and rotation properties of two nulls with ease using a slider to control the balance. That would give you the position, scale and rotation of a third null, to which you would have parented the layer of choice.

    In other words, you’d create the tracked null and a manually animated approximation of the same motion that ends up in the final location that you desire. And then fade the motion between the two with a simple percentage calculation attached to the third null values.

    That is, if I pictured your objective correctly.

    Kalleheikki Kannisto
    Senior Graphic Designer

  • Andy Engelkemier

    April 1, 2020 at 6:54 pm

    Wouldn’t it be simpler to create extra objects to accomplish this? Null1 is the LocRotScale of the track. Null2 is has another set. An expression would tell a 3rd object how much influence Null1 vs Null2 there would be.
    This is actually what I’m looking for right now. I know things like it exist as plugins being related to IK, but I’m looking for something more simple than that.
    Rather than splitting a bunch of layers and reparenting the second group, I’d like to just parent them all to a null that switches parent influence. it s so many less layers. lol

    This is common for IK animation. Putting a hand on an object while a character moves, or throwing and catching a ball from one hand to another are both classic examples of parent influence. The ball has to be parented to Both hands, but you animate the influence. In that case, you would have the influence on/off, rather than animating it though. But you get the idea.

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