Copy link to clipboard
Copied
Hi,
I love After Effects to death. If am chosen by heaven and it asks me what earthy things u want- I would say After effects and my cat.
But the main villain in my love for AE is the Expression 😐 .
No matter what I do it seems like a bottomless pit. I buy books, courses, print pdfs... I read expressions from websites... I do understand Expression, Though I have no foundation in coding. But when I want to do something on my own I can not write anythng! I can not write any code which can bring what I imagined into reality and it is taking its toll on my mental peace., beacuse am serious about it.
So, what is the best way to learn AE expression! I would be grateful if you could provide me some guidance. 😥I wanna be someone who can write AE expression like a pro.
Thank you 😥
Copy link to clipboard
Copied
We can give you small exercises to do:
1/ Create a square with a stroke
2/ Edit size and rotation expressions
3/ Duplicate the layer n times
size expression:
baseSize = 760; // Base size of the square
layerIndex = index - 1; // Adjusted layer index
reduction = 15; // Size reduction per layer
s = // Calculate the size using the values mentioned above
[s, s]
rotation expression:
layerIndex = index - 1;
// Calculate the rotation using the value mentioned above
Copy link to clipboard
Copied
😮 What am supposed to write as 's' ? I have no clue! But my result is different.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Each square is 15px smaller than the previous one, so:
s = baseSize - reduction * layerIndex
// s = 760 - 15 * 0 = 760
// s = 760 - 15 * 1 = 745
// s = 760 - 15 * 2 = 730
// s = 760 - 15 * 3 = 715
// and so on...
For the rotation, you need to increment by -1° for each square.
Copy link to clipboard
Copied
😮 wow!!
How did u start learning AE expression if I may ask? Do you practise a lot?
Copy link to clipboard
Copied
Yes, it's just practice and reflection.
We always use the same techniques, here we saw the incrementing.
As you can see, it's what @Dan Ebberts used yesterday in his solution.
Copy link to clipboard
Copied
Thank you so much for sharing this.
Copy link to clipboard
Copied
And if you want to create a loop, you'll very often use the remainder (%) operator.
Math.floor(time) % 3
So by using these techniques in every direction, you'll eventually assimilate them.
Copy link to clipboard
Copied
I never knew about this. Everyday I try my best to learn something about expression. today I learn this. Thank you so much.
Copy link to clipboard
Copied
The Youtube Channel, Animoplex, has a well-structured AE Expressions Course -
https://youtu.be/SFgWa5G0VAE?list=PLvr5U5ZSt6IzHyvSL9fo0M9NRPsTvra31
I recommend it to anyone who's keen to learn AE Expressions. And if you reach a stage where you want to go deeper, I've got a niche Advanced AE Course that uses Advanced Expressions.
https://www.broadcastgems.com/consulting-training
Copy link to clipboard
Copied
Thank you so much. I am eternally grateful.
Copy link to clipboard
Copied
Next exercise, draw a line 400px long oriented at 45° using createPath() in the path property of a shape layer with a stroke.
HELP: Use JavaScript to select point on a circle
path expression:
lineLength = 400;
angle = 45;
p1 = [0, 0]; // first point poistion
pts = [p1]; // array of point coordinates
x = // Calcultate X position;
y = // Calcultate Y position;
pts.push(p1 + [x, y]);
createPath(pts, [], [], false)
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I am so nervous.. Never had any acquaintance with createPath expression. I googled and tried to understand what it is and then tried to create the second homework.
Copy link to clipboard
Copied
Did I do it correctly?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
A large part of the solution is here:
I gave you an angle in degrees, but in the formula, you need to use an angle in radians (pointAngleInRadians)
so you have to convert 45° to radians.
Using degreesToRadians(angle) or Convert an angle from degrees to radians
Then, in the formula, you have the radius, which corresponds to lineLength.
Once you've done that, there will only be a small adjustment left for the result to be correct.
And don't touch the layer rotation, everything is done in the path property.
Copy link to clipboard
Copied
I need to spend some time with this. I have to understand. This is too alien to me.
Copy link to clipboard
Copied
Yes it takes time to grasp all of this.
Copy link to clipboard
Copied
I am really grateful, cant express how much. Thank you so much for taking the time to write those two assignments for me. Thank you.