So we are making a 2D animation. We have character assets in PSD.

We have a "Character" Comp which contains the following: "Eyes" Comp, "Mouth" Comp and "Body" Comp. "Body" has the 2-second walk-cycle of the character. Which is time-remapped to a loop in "Character". But as character walks, its body goes in a wawy upwards and downwards motion. The problem starts there: We have to sync "Eyes" and "Mouth" to body's up and down motion. Parenting the said layers' position to the body asset's position is not an option, because the body asset has only 2 seconds of animation. After that, "Mouth" and "Eyes" just stops wherever they were.

I think there must be a way to do this with expressions. But since we are not a code-savvy studio, we can't sit down and write one.

How can we achieve such a goal?

Thanks for the help.

Edit: You can download our comp from here: http://www.mediafire.com/download/v255kgid7ej56m0/walk.zip

  • So, to understand you correctly. You have 2 comps in a main comp and comp 1 has animated assets inside itself and you then went ahead and time remapped comp 1 inside the main comp and now need to sync the motion of comp 1 to comp 2? (not an asset inside comp 2?) It might be helpful if you could upload a simple AE file that shows the issue.
    – timonsku
    Commented Dec 10, 2014 at 14:34
  • Comp 1 has animated assets inside and it is time remapped inside main comp, yes. Comp 1 in Main Comp does not have any motion there. I want to sync Comp 2's motion (position) to a asset's inside Comp 1. Will provide the AEP file asap.
    – Gokce Ozan
    Commented Dec 10, 2014 at 14:43

1 Answer 1


If you want to link certain properties through several composition you can only do this with expressions. They are really not difficult though and its a matter of 1-2 lines.

F.e. to get the position of a layer in a different composition you can do this:

comp("Comp Name").layer("Layer Name").transform.position

Just alt click the position stop watch of the layer you want to apply that position to and enter that command. To break it down. This select first the comp you want by name and then selects the layer you want within that comp:

comp("Comp Name").layer("Layer Name")

This part says that you want a value from the transform menu and the name of the value is position. Position could also just be rotation or any other property:


Note that you often get multiple values at once. For example position can have 2 or 3 values depending on if the layer is 2D or 3D. This multiple values are given to you in something called an array or vector. What comes now is only needed if you want independent axis control and not the position value of all 2 or 3 axis's applied to your layer. So in order to f.e. only get the position of the y axis you can do this:

y  = comp("Comp 1").layer("layer1").transform.position[1];

The made-up variable name y in this case is getting the y-axis value of layer1 assigned. by adding [1] at the end of position. Using [0] would give you x and [2] would give you z.

This part is what you call the return value. You write it in the form of an array/vector. Meaning [x-axis-value,y-axis-value] or [x-axis,y-axis,z-axis]. transform.position[0] just means I want the x value of THIS layer where I'm entering the expression in. So you can still control that axis manually.


In order to account for the time remap you would need to apply the same remapping to comp2 that you applied to comp1. If that's not what you are after I might have to see an example project.

Edit: So if you use time remap to loop layers and not to fine tune your animation you shouldn't use it in these situation. In order to retain a better control you should use a simple expression on the animated assets of your looping composition in order to loop you animation.

loopOut(type = "cycle", numKeyFrame = 0);

Add this to every layer property that is animated and make the comp length as long as you need, your 2 second animation will now repeat as long as your composition is, you just have to stretch your layers length to the new comp length. This solves your issue.

If you have more sub-comps in you sub-comp you will have to increase their length as well of course so you can stretch them to the end of their parent comp.

For more information on this expression have a look at this: http://provideocoalition.com/pvcexclusive/story/expression_shorts_-_loop

  • We tried exactly that. But the problem with that is that does not work properly in time remapped comp. Time remapped comp has only 2 seconds of animation. So after 2 seconds, there is no value in ".transform.position".
    – Gokce Ozan
    Commented Dec 10, 2014 at 15:21
  • Then just time remap the comp2 in the same manner?
    – timonsku
    Commented Dec 10, 2014 at 17:55
  • I looked into you comp. Am I correct assuming that you only time remap in order to loop your animation?
    – timonsku
    Commented Dec 10, 2014 at 20:09
  • I edited my answer, I tried that method on your project and the face wobbles along just fine after the 2 second mark.
    – timonsku
    Commented Dec 10, 2014 at 20:28
  • 1
    While the loopout expression is better, to use the value of the property at an arbitrary time you can use valueAtTime. This does what it says on the tin: myProperty.valueAtTime(t) returns the value of the property myProperty at the time t. Now the property you want is the position of the other layer, and the time you want is the value of the time remapping of the current layer (timeRemap), so in the expression above you'd use comp("Comp Name").layer("Layer Name").transform.position.valueAtTime(timeRemap)
    – stib
    Commented Dec 10, 2014 at 23:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.