r/AfterEffectsTutorials • u/AE-Wizard • Nov 29 '24
Tutorial A Library of After Effects expressions to make your life easier
226
Upvotes
r/AfterEffectsTutorials • u/AE-Wizard • Nov 29 '24
6
u/AE-Wizard Nov 29 '24
We created an After Effects Expressions Library with over 60 pre-tested, ready-to-use expressions to help save you time.
Each expression includes:
We’re always updating the library with new expressions. So, if you have a suggestion, let us know. If we add your idea, we’ll be sure to credit you.
2
u/ricaerredois Nov 29 '24
Noice, will def look into it. May have some of my own to contribute
2
u/Able_Asparagus1376 Dec 02 '24
it was nice checked some but add that option where to paste this expression
can you help me with a expression or add that to your website ?
lets say i have animated xposition of my shape layer 0 to 100 ( key1 starts at 0 and key2 ends at 100 )
and made smooth graf for that
for next time if have to change the amount of keys i will have to bring my cti to that keyframe and change the amount so i just want to acess them using slider controller for each key there would be a slider and the graf would work can we do it i asked to chat gpt but that code was working as it should be but graf was not working if you need that code given by chat gpt i am just linking that you can edit if you think that you can fix it
// Define sliders for each keyframe
slider1 = effect("Slider Control")("Slider");
slider2 = effect("Slider Control 2")("Slider");
slider3 = effect("Slider Control 3")("Slider");
slider4 = effect("Slider Control 4")("Slider");
// Store sliders in an array
sliders = [slider1, slider2, slider3, slider4];
// Total number of keyframes
numKeys = numKeys;
// Initialize adjusted value
adjustedValue = value;
// Interpolate values between keyframes
if (time <= key(1).time) {
// Before the first keyframe
adjustedValue = key(1).value + sliders[0];
} else if (time >= key(numKeys).time) {
// After the last keyframe
adjustedValue = key(numKeys).value + sliders[numKeys - 1];
} else {
// Between keyframes, find the two surrounding keyframes
for (i = 1; i < numKeys; i++) {
if (time >= key(i).time && time <= key(i + 1).time) {
// Interpolate between key(i) and key(i + 1)
t = linear(time, key(i).time, key(i + 1).time, 0, 1);
adjustedValue = linear(t, key(i).value + sliders[i - 1], key(i + 1).value + sliders[i]);
break;
}
}
}
adjustedValue;
2
u/stylewiz Nov 29 '24
woah this is super cool thanks for sharing!
2
u/Adventurous_Maximum5 Nov 30 '24
Thanks for sharing! Will def add this to the bookmarks!
2
u/statusTye Nov 30 '24
thanks!
2
u/slabsofwax Dec 01 '24
Thank you!
2
u/Agitated_Garden_497 Dec 02 '24
🙏🙏🙏🙏