ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Expression to ignore keyframes with a too different value

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Alessandro Garelli
Expression to ignore keyframes with a too different value
on Aug 2, 2018 at 10:47:58 am

Hi everyone,
I'm here because I'm doing a 3D camera tracking to insert some layers in my composition.
The result is pretty good but sometimes there are some movements too fast and I want to try to see if I can make them slower.

I was thinking to an expression which just use the keyframes with a value not too much different from the value of the previous keyframe.

Something like:
v=value keyframe
vold=value keyframe before
x=50;
if (v-vold<x){
v
}else{
vold;
}


How can i write in the correct way? I'm not very good in after effects code. And also I have no idea how to solve the problem that the keyframe is not a single number but a 3 values vector.

Hope someone can help me.

Thanks


Return to posts index

Kalleheikki Kannisto
Re: Expression to ignore keyframes with a too different value
on Aug 2, 2018 at 6:27:00 pm

Or what you might want to try instead is smoothing the keyframes with the smooth() expression.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Alessandro Garelli
Re: Expression to ignore keyframes with a too different value
on Aug 3, 2018 at 9:05:14 am

Wow, it works perfectly!
Thank you!


Return to posts index

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