ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Pickwhipping animations between comps of different length

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Hiski Suomela
Pickwhipping animations between comps of different length
on Oct 22, 2019 at 7:50:26 am
Last Edited By Hiski Suomela on Oct 22, 2019 at 8:01:06 am

Hi!

Is there a simple solution for creating linear expression between two comps of different length?

I have a null in a comp which is 40 seconds long ("liikunta-character-D1-001") and another null in a comp which is 4 minutes long. The null in 4mins comp has a linear expression like this in its position so that it would follow the keyframes of the other comp:

handCTRL = comp("liikunta-character-D1-001").layer("hand_CTRL").transform.position[1];

linear(handCTRL,510,90,274,600)


So how would the keyframes start in the right time in the main composition? Now the linear reads the keyframes in the actual time, not the in-point of the shorter comp.

I'm always bad at describing so please, ask if I was unclear :)

EDIT: I'm aware I can keep the pre composition same length as the main composition and just cut the in and out points to have the animations in the right time. I'm looking for a solution for comps of different length.


Return to posts index

Dan Ebberts
Re: Pickwhipping animations between comps of different length
on Oct 22, 2019 at 1:38:37 pm

Is the issue that one of the comps is a layer nested inside the other comp and it's start time is offset from 0? Or is it just that they're different lengths and you need to compress the time of longer one to match the time of the shorter one?


Dan



Return to posts index

Hiski Suomela
Re: Pickwhipping animations between comps of different length
on Oct 22, 2019 at 1:57:39 pm

I made a simple representation file where you can see the problem. I'd like the null in 4 minute comp to start moving exactly when its control null moves in the 1 minute composition. Now it starts moving too soon. ☺

https://f1.creativecow.net/file/13834/13834_comptocomplinearexample.aep.zip


Return to posts index


Dan Ebberts
Re: Pickwhipping animations between comps of different length
on Oct 22, 2019 at 4:06:33 pm

Try it this way:

ctrlComp = comp("1 minute comp");
L = thisComp.layer(ctrlComp.name);
CTRLnull = ctrlComp.layer("Null 2").transform.position;
linear(CTRLnull.valueAtTime(time - L.startTime)[0],90,430,60,430)


Dan



Return to posts index

Hiski Suomela
Re: Pickwhipping animations between comps of different length
on Oct 23, 2019 at 6:52:00 am

Thanks, Dan! Works perfectly.


Return to posts index

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