ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Expression for linking position of keyframes

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Emma Leddie
Expression for linking position of keyframes
on Jun 4, 2010 at 2:58:19 am

Hi I'm wondering if there is a way of linking a particular key frame to a position of another layer.

I have a light animated as a emitter for particular and it goes through 3d space between two layers creating a ribbon type line between the two layers. I want an expression to link keyframe one position to layer ones position and keyframe two to layer twos postion, so if i want to move things about I dont have to adjust EVERYTHING!. Is what I am saying even possible?

Looking forward to replys!

Emma



Return to posts index

Kevin Camp
Re: Expression for linking position of keyframes
on Jun 4, 2010 at 1:05:26 pm

yes, but not quite the way you are thinking....

you can take the position data from the two layers and generate interpolated values between them, so you won't actually need/use key frames.

an expression like this may work:

p1 = thisComp.layer('layer1').position; // use the expression pickwhip to select your layer one
p2 = thisComp.layer('layer2').position; // pickwhip your layer two

linear(time, p1, p2)


if your move did not last the entire comp, you could adjust timing like this:

p1 = thisComp.layer('layer1').position; // use the expression pickwhip to select your layer one
p2 = thisComp.layer('layer2').position; // pickwhip your layer two
startTime = 1; // set value in seconds
endTime = 5; // value in seconds

linear(time, startTime, endTime, p1, p2)


if you needed ease interpolation, change linear to ease. for other interpolation methods, and a lot of technical explanation of these expressions, see this:

http://help.adobe.com/en_US/aftereffects/cs/using/WS3878526689cb91655866c11...

Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW


Return to posts index

Emma Leddie
Re: Expression for linking position of keyframes
on Jun 9, 2010 at 3:14:02 am

Thanks so much for your advice! I will try and put that to use!



Return to posts index

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