ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

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

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Dustin Parsons
Is it possible to make objects move half the distance of their parents?
on Mar 25, 2016 at 11:14:55 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!


Return to posts index

Kalle Kannisto
Re: Is it possible to make objects move half the distance of their parents?
on Mar 26, 2016 at 8:39:22 am
Last Edited By Kalle Kannisto on Mar 26, 2016 at 8:43:40 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.


Return to posts index

Dustin Parsons
Re: Is it possible to make objects move half the distance of their parents?
on Apr 8, 2016 at 10:11:35 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?


Return to posts index



Kalle Kannisto
Re: Is it possible to make objects move half the distance of their parents?
on Apr 9, 2016 at 7:39:44 am
Last Edited By Kalle Kannisto on Apr 9, 2016 at 7:41:53 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.


Return to posts index

Dustin Parsons
Re: Is it possible to make objects move half the distance of their parents?
on Apr 11, 2016 at 4:41:26 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.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]