Jump to content
Sign in to follow this  

custom parent expression in AE

Recommended Posts

Does anyone know of a way to animate the influence of a parent on a layer? For instance: I have a footage layer and a copy of it that is motion tracked and stabilized. I want to slowly animate in the stabilized keyframes so the layer will become stabilized over a 5 second interval. I've tried to use the "ease" exp​ression on the non-stabilized layer's position property without success; most likely because I don't know if its the one I should be using...





[ease(t, x, thisComp.layer("FootageStabilized").transform.position[0]), ease(t, y, thisComp.layer("FootageStabilized").transform.position[1])]


Any thoughts/suggestions would be much appreciated,


Share this post

Link to post
Share on other sites

I would make an expression slider control and use that as a 0-100 value for the influence percentage. You could use some very simple math to get a weighted average between the layer's current position and the tracker's position. You could then animate the slider to control the level of influence. I can make an example file later today if that would be helpful.

Share this post

Link to post
Share on other sites

You can use the ease if you want, but your current setup is using it incorrectly.


Try this:

target_layer = "foo";
start_value = position;
target_value = thisComp.layer(target_layer).transform.position;
start_frame = 0;
length_of_blend = 60; //in frames
progress = (start_frame + timeToFrames(t = time + thisComp.displayStartTime, fps = 1.0 / thisComp.frameDuration, isDuration = false))/ (start_frame + length_of_blend);
ease(progress, start_value, target_value);


Documentation on expression interpolation methods can be found here:


Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...