In the previous lecture we created these fantastic awesome by so lots of colors and we bit upgraded
by creating a controls layer and we have key frames a slider and the pie animation is following the
animation of these slider.
That's pretty cool.
But if I want to change the value of the by itself or the slice that will be changing 75 percent to
something else I have to position the play head on the key frame maybe select the key frame and then
change the value which makes it a bit hard to change.
That's one.
Also if I were to create similar slices here the calculation is going to be like awesome man.
How is it gonna work.
And how many key frames I'm gonna have.
And if I want to change one value what will happen.
So we actually need to simplify the key frame system and be able to create more slices in a very easy
way.
And for that we are going to use more expressions but there are two of them and they are very easy to
use.
So let's go back to project and create a dummy composition.
We don't care about the name.
We are going to pay attention to the frame rate and then I have twenty five frames per second so every
second I have twenty five frames and click OK I'm gonna create an empty text there just to show you
the values here.
Come inside the text layer inside the source text art click on the stopwatch or option click to open
the expression and the first expression I want to use if you come over here usually you will type it
in it is time okay.
As simple as this.
So we have the time expression now in After Effects.
You can read the time of the time indicator.
So if the time indicator it's in the beginning time will be of course 0.
If you go to one second.
This is displaying one second and so on for two seconds and three seconds between.
For example if I got 10 frames you will notice the value here is decimal and it is zero point four which
is ten frames divided by the frames per second for the composition the frame rate.
That will be twenty five.
So it's ten divided by twenty five so at zero point four which you can't care less about the value all
you know that at a certain time it gives you a certain value.
As simple as this now we want to use an expression that will interpolate the time or interpret the time
and return certain values for us to work with this expression is very easy.
If you come to the arrow here you will go to interpolation and you have several of them.
In fact they are almost all identical except there is is is in and is out we are going to use the linear
one which will interpolate or interpret the time in a linear fashion straight line and it has similar
parameters here that I will explain so linear will interpret T okay in our case D will be the time.
So we are going to interpret the time and then we can have a minimum time.
So let's say one second that is the minimum time and I can have the maximum time for example four seconds.
So actually linear will interpret the time now between one second and four seconds and for the time
being equal to one then it's going to return the value one which I would say 100 so at one second it
will return one hundred and at four seconds.
Let's say it will return four hundred.
Okay so now then it will interpret the time between one second and four seconds.
I would say Stern values in between 100 and 400.
As simple as this.
Now if you play with the time indicated at one second it will return one hundred at one second and before
it will return one hundred because we specified that it starts from one then if you move on to four
seconds it is gonna return four hundred.
Okay so one for one hundred four hundred minimum maximum minimum maximum.
As simple as this I think up to two seconds is gonna return a value in between 100 and 400.
Interpreting the value of time.
So it's gonna be two hundred if you go to three seconds.
Of course is gonna be 300.
So notice how the interpolation is happening or the interpretation of the time for every frame you move
in.
I'm gonna use page down.
You will get into a certain value as simple as this.
Now in our case it would be nice to use zero to 75 percent.
As simple as this you get a guy's okay.
Now if you don't want to see decimals here the best way is to add two fixed which you already know we
have seen that and I put two digits that will be cool.
So you notice it's very easy to use.
So in the next lecture we are going to use the near interpolation for time to animate our PI.
And now I'm going to delete this one.
I'll get the component we don't need it and I will see you in the next lecture.