Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Is it possible to make objects move half the distance of their parents?

  • Is it possible to make objects move half the distance of their parents?

    Posted by Dustin Parsons on March 25, 2016 at 11:14 pm

    I’m trying to give some movement to still images – in the past I’ve done this by splitting the image into a foreground and background layer, making them 3D objects, moving the background layer further away in Z space and then parenting it to the foreground layer and moving the foreground layer. This makes both layers move together but the background layer appears to move less than the foreground layer because it’s farther away.

    Basically, I’m trying to recreate this exact animation style but without making the layers 3D because it adds a lot of render time. So, is it possible to parent a 2D background layer to a 2D foreground layer and have the background move half the distance of the foreground layer? Not sure how this would be achieved so any advice is appreciated.

    Thanks!

    Dustin Parsons replied 10 years, 1 month ago 2 Members · 4 Replies
  • 4 Replies
  • Kalleheikki Kannisto

    March 26, 2016 at 8:39 am

    If you have “layer 1” as the master layer that you move, you could use this code for the rest of the layers’ positions. Use a different “mult” value for how much you want the layer to move in relation the the master layer.

    mult = .5;
    value+(thisComp.layer("layer 1").transform.position-thisComp.layer("layer 1").transform.position.valueAtTime(0))*mult

    Keyframe the master layer and the others will follow.

    Don’t parent the layers.

  • Dustin Parsons

    April 8, 2016 at 10:11 pm

    Thanks Kalle. I keep getting an error message “This project contains an expression error”

    I’m not sure what the problem is, can you double check the expression?

  • Kalleheikki Kannisto

    April 9, 2016 at 7:39 am

    1) Does your timeline start at 0?

    You could try replacing “valueAtTime(0)” with “valueAtTime(inPoint)”.

    2) Is the layer name written exactly the same as in the expression, including case?

    3) Don’t parent the layers.

    4) Also, layer1 needs keyframes for anything to happen.

  • Dustin Parsons

    April 11, 2016 at 4:41 pm

    Thanks Kalle! The mistake was on my end, didn’t change the layer name since I thought calling it “layer 1” was how it was supposed to be written for the expression (or “layer 5” or “layer 6”, depending on what layer is controlling the others). All I had to do was copy the layer name and use that and it worked great.

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