Guys and welcome to this new lecture in expressions if you want to learn a lot about expressions I have
a very special of course that you will teach you everything you want to know about expressions and infographics
of course that of course is direct towards creating infographics but it will manipulate expressions
and teach also a lot about certain precepts that are used to do infographics.
5 For now we want to create this by you know just a simple example and how to manipulate expressions
here.
So when the pie is opening it's a pie chart.
The percentage is incrementing.
Of course you could come here and duplicate this one three four times change a value and having a series
of pies that are coming in and it would be quite some infographics you might add some text and so on.
OK if I let's start let's delete everything.
No problem.
We create a circle.
The first circle is going to be the background circle Pest Control shift and create give it a dark color
for example blue darkish blue that will do I will come to elipse.
I will go to transform my lips and set it in the middle of the composition and also said my the anchor
point in the middle.
That's good fine.
Now I want to create the by itself.
What I will do is to duplicate that layer again and give it a stroke.
So we come to the strong full stroke and make it white and make it a bit bigger.
But not now the stroke in the layer is coming you know outside.
An insult is the 87 or the 90 here is divided into two fixed that.
So let's call this background OK for the PI.
And this is the by itself good to fix.
Here what we do is not to resize it because it will never come you know exactly the same.
We have duplicated these circles.
So what we'll do is to come to content.
We go to elipse and we come to elipse but all in 11:1 and we come and we add a offset path.
Now I have minus 90 the offset is set at 10.
I will make it a minus 45.
And now the two circles are 100 percent you know Center and the PI is looking good.
I can come out both of them and scale them up if I like and click and get them up.
We still have the same five.
Now I want to animate the pie.
For that I will use here the path and I will program the path.
It goes from zero to 100 percent using the end.
So I come to the end of keyframe it make it zero percent come to two seconds for example just to show
you and make it 75 percent.
So now is not working because I need to offset it.
I will offset that with minus 80.
Yup and here we are.
It's moving along the path that all you knew I would come to the text here click in the middle of the
text and right one two three four.
Now put the anchor point of the text in the middle and center right in the middle of the composition.
It was centered in the middle of the circle.
Here you are five.
Now I wanted the text to display the percentage of the opening of the pie.
I will come to Texas.
I will open thanks as usual open source text and pick it to the.
And of course I'm sure you knew that.
I will come and pick me up to the end and here you are.
It's over there but it is.
And we need to make it not that simple.
So I will come to the source text and you know that function.
I want to type it so I type math that around open brackets press and go to the end and close the brackets.
And here you are you have your text coming in beautiful.
Then I want to add the percentage so that is the public what percent of what and call you out.
You can increase the size of the text if you want make it bigger.
Now if you believe you call it's happening very nice you can change the percentage or you have to do
is to come to the end of the path and go to the keyframe for example and check the percentage the way
you want.
And everything will work this political.
Is that the zero appears in the beginning and we don't want that.
So we come to the decks.
We open our placidity.
Now I can put keyframes on the opacity but that will be silly.
Well I will do is to open the expression and go down to the end again and put the end here.
Now the opacity is a function of the end.
If you start it would be at zero because and the zero if you scroll up you will be not 100 percent because
this is going on it's 77 percent.
How do I solve the problem in a very easy way.
I just multiplied the value of opacity by two times two or 1.5 whatever you want provided that at the
end it's more equal or more to 100 percent.
And here you are.
That's a pretty cool one what you can do here.
Usually what they will do is take all this and make Control-C and Contrave now I have the buy two.
I will take buy two and put it here for example and buy one.
But on this side that I want to put it here.
Come here are very nice.
Now I will come to the keyframe select all of them see where the keyframes will go to the end not by
two.
For example we wanted to go to a little bit.
And now there is a problem you notice that a pie one or this pie is still having the value of this.
And so one of the things that I will come to text for this by open the expression I will eat and not
zero of the path one.
Well I must do here is to change for by one two by two and I will put by two.
And here also I want to put by two that work.
Yes it did work.
Here you are.
So now this is the simple changes that you have to do to get a reputation of a certain item.
Now you have a very good one you don't need to compose or to create many things but this will work.
Of course I would not go for one two three.
I will write a text one for example or this one is text too.
And this is the first one and name one I would have done this before and the back one.
So it's very clear what is happening here.
I could also use the index here and we'll see that later on to be able to give the values that I want
to find.
Thanks very much for listening.
I hope this was useful given this pies.
It's very nice and it will help you a lot if you're doing infographics or whatever you're doing a documentary
and stories like this it's quite interesting.
We have used the expression here just to control everything.
If you press you you have only two keyframes and it's enough to change the value of the Laski frame.
So to change the value that's appearing in all the graph and it's pretty convenient.
See you in the next lecture.
And thanks for listening to this one.