In this lecture guys I'm gonna show you how to free your animation from these key frames and we are
going to use the linear interpolation of expression that we have seen in the previous lecture.
What is gonna be very easy and very simple so let's look a bit at our animation.
It start at one second and ends at let's make it three seconds here okay.
In our original one it was less.
I'm going to make it three seconds for simplicity here and the value is gonna go from zero to 100 percent.
Let's replace all this with the linear expression.
I have to click on the stopwatch.
It's okay if you keep the key frames.
The expression will override the key frames.
Now I'm gonna write a linear open brackets the interpolation is gonna be on time of course.
And the minimum time is 1 as the key frames maximum time is 3 as in the key frames here.
Minimum value is 0 as in the pie chart to start at 0 a maximum value is at 75 percent or 75 only.
And let's play the animation here you are cool.
It's working 100 percent.
Now we could remove Of course the key frames.
So actually you have a key frame less animation driven for this slice now.
Also I can add more than that.
You're not to see it.
I hardcoded the minimum time maximum time the minimum value and the maximum value instead of having
them hardcoded.
How about if you create a new values control layer and set these values inside the value control layer
and then pick with them or link them into this expression.
Here let me show you how it works.
It's very easy by the way.
So I'm gonna right click and send you.
I prefer you use a solid layer which will do.
Again looking only at the color and make it invisible and rename it a values control.
By the way guys we could have used the controls layer but this is for clarity now.
Let's come over to the effect empty set and search for control.
Of course you have the slider control.
I click and drag and drop it on the values control.
So the first one is gonna be the start time or ti minimum if you like.
If you want to visualize it it's gonna be zero then I'm gonna take another one for t maximum.
So this is t Mark's.
I can name them whenever I like by the way and my maximum time according to this animation is three
seconds.
Now I have the zero and seventy five.
I'm not gonna take care of the zero here because it's too obvious.
I'm gonna take care to the maximum value here.
So I'm gonna drop in another slider and call this slider by value or by percent.
We are by percent we do better.
So this is the percentage for the pie now coming over here.
I could simply select one from here and pick whippet to the team minimum slider.
Here you are.
But not this is going to be a very long expression and it's not cool at all is very hard to read.
So instead of doing that I'm going to enter certain variables meaning store the value of t me moment
t maximum inside separate variables and then put these variables over here.
It's way easy come to the beginning and press Enter or Return on the main keyboard not on the numeric
pad.
And I'm gonna say start time that will be s.t. will be equal to and then I will pick up to the minimum
here.
Here you are simple at the end of the line I have to put the semicolon just to make sure that we are
ending the line here.
Press turn.
Now I'm gonna take care of the end time.
I'm gonna put equal and pick whippet to t maximum all the time.
Here you are.
In this case it's the three seconds.
Let's put the semicolon.
Now I have to take care of the percent which is seventy five which is by percent so I'm gonna write
a B P that will be by percent equal.
Of course you can give any kind of letters and numbers here just to create variables name.
Then I'm gonna pick a bit to the PI percent slider and put the semicolon at the end.
So now here the expression will be starting time that will be s t.
Make sure that you have the same spelling for uppercase and lowercase as big d small as Big D small.
Okay.
It's very case sensitive here.
Then ITI that's a nice one.
I'm gonna leave the zero and write b be as simple as this.
This click blood come to the beginning.
But first let's add a value here let's put it at 65 percent and play our animation.
What is going from 0 to 3 seconds.
Gonna make it speedier from 1 to 3 seconds.
Here you are not this is going to start at 1 notice here at 1 and finish as 3 seconds.
You can change that the spigot.
Two seconds only.
Here you are.
And you know this your animation is running without any key frames.
If you will up everything with this select roll out everything.
The only layer now that you need to fill is to change the PI Value is the values control and of course
now you can change the starting time.
I'll make a zero point five seconds ending time one second value 50 percent and play
I need now to work a bit.
The other layers if you want to push them over his for example and here you are cool guys.
So actually we are really now in control now.
It has also become very easy to create more pies here and I show that in the next lecture.