Learn Motion Graphics with After Effects Expressions | Harshit Srivastava | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Learn Motion Graphics with After Effects Expressions

teacher avatar Harshit Srivastava, Developer on IBM Cloud, Bluemix

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

13 Lessons (1h 7m)
    • 1. Class Introduction

    • 2. Wiggle expression

    • 3. Time expression

    • 4. valueAtTime

    • 5. math round display number in source text

    • 6. pie chart

    • 7. loopIn

    • 8. Expression Controls slider checkbox and more

    • 9. loopOut

    • 10. random

    • 11. length

    • 12. if else

    • 13. time delay

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

After Effects is widely used to create motion graphics and visual effects. Creative professionals also use this powerful software to create cool animations. It is the Industry standard widely used by both professionals and enthusiasts. But what factors distinguish After Effects Professionals from beginners?

Expressions. Professionals write After Effects expressions to automate their tasks, speed up their work, saving time from things that beginners do a lot- Creating repetitive keyframes. Expressions also let you add various advanced functionalities allowing you more control over properties and attributes such as over time, frequency, amplitude, conditionals and loops, etc.

This course will teach you After Effects expressions right from the fundamentals, where you will learn various methods and ways to write expressions with practical lessons.

In this course you will be learning following variety of After Effects expressions:

  • Simple Wiggle Expression- Add motion to any object in terms of position, rotation, opacity, scale by manipulating its Frequency and Amplitude.

  • Time Expression- Speed up and slow down anything, make any object follow another object with time delay, etc

  • Value at Time method- Fetch coordinates or value of any transformation property of any object and pass it to another object's transformation property based on time.

  • Math round- You can round off value of any property to its decimal value and can display it on the screen.

  • Loop In- Automate your workflow by repeating a set of keyframes (two, three, and more) right from the beginning of the timeline of a layer to the set keyframes. This method can save a lot of time used for setting repetitive keyframes.

  • Loop Out- Similar to Loop In, looping set of keyframes till the end of the timeline of a layer. It doesn't start at the beginning of the time, rather from the time you set the looping keyframes.

  • Random method- You can generate random values within a range provided as parameters in the Random method. The generated values can be used to trigger various effects and change values of various transformation properties.

  • Length- This method can be used to calculate length of any change in values such as distance between two points, etc.

  • If Else- You can implement conditional logic to create advanced motion graphics. You can specify various conditions and actions to perform based on situations. It is one of the core building block of any programming language.

  • Time delay- You can trigger any effect on a object relative to other object's time with and without any delay.

Meet Your Teacher

Teacher Profile Image

Harshit Srivastava

Developer on IBM Cloud, Bluemix


I am Self-Taught developer who had worked on various platforms using varied languages, and involved in various Projects both Open Source and Proprietary.

I have developed Web and Android Applications, chrome Extension, worked on various frameworks, fixed bugs for some projects, and explored numerous others. I think education and learning should be free and open, not be bound with restrictions like attending classes or going to college, People from all age groups, gender, faith, race, nations, etc must get equal privilege. When entire world would act this way like being a single FAMILY, we would truly realise VALUE of Knowledge and Human Life.

See full profile

Class Ratings

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. Class Introduction: Hi there, welcome to this class on advanced motion graphics with After Effects expressions. My name is Richard and I'm a course instructor for this class. In this class you will be learning how to create animations and motion graphics using expressions. Express inch allows you to create some advanced effects and animation where you can automate various operations such as setting representative key frames and much more. This is a practical based gas. Really will learn wiggle excretion, time expression, value at time method, math around method, looping, loopOut, random method, Gaussian random length, if else conditionals and time delay. So if you're looking to learn after effects, excretions, you start learning like now. See you in the class. 2. Wiggle expression: Hi there, Welcome to this lesson. Here you're going to learn about writing simple expression in After Effects that is called wiggle expression. Wiggle is one of the most simple expression that is widely used for a lot of motion graphic. Here, you'll learn about creating wiggle expression. So here we have created a circle with a yellow color shade. You can do anything. You can set a key frame for any transformation properties, say position. So here we have set a position keyframe. So when you set a key frame, your object will move within a defined duration from point-to-point. But if we want to add a shaky motion or movement to the object that is sprints around like a wiggle. You can just hold a stopwatch, click and hold. And this type of wiggle expression, just write w, i, g allele. We'll on in records, records. Or you can provide a frequency and amplitude. These are the two parameters that you need to provide. So you have to provide number. So here are, there are two ways you can directly write the numbers or you can define it as a variable. So here it is. So you can experiment with various values for frequency and amplitude. And in the meanwhile, you will understand what is the difference between frequency and amplitude. So frequency is the rate of motion of this wiggle expression. And if you provide a higher frequency, it will move very fast. And amplitude maze the area are there, it covers. So if you have a high amplitude, it will move. We will have more area of the screen. And if you have more frequency, it will do it very fast. So you can have a combination of them. So it's a amplitude 100. So it will cover a lot of area of the screen. And with a small frequency such as five, it will be a little bit Islam. So say if you provide a frequency, do we hire? It will move fast enough. So here instead of using variables, you can manually write any values. Number. Here it is. These are two similar ways. You can try to wiggle expression. That looks amazing. It will loop around till the animation is there. So you don't need to worry about. So in key-frame, you have to set everything. But you, when you provide expression, it will be there for a long time. Don't need to repeat a lot of thing. You can always turn on and off excretion by hitting this equals symbol. There are more options. You can use the pick whip, you can add. There were distinct, you will be learning in the coming exercises. So here this is real. The similar way you can add more objects to the screen. On, Apply wiggle expression to them also using different values. Say here we apply a rectangle and just turned it, change the color of the lighter to use the selection tool and move this layer behind the circuit so that it will be visible. Here are when you want to get an object following another object, you just need to use the pick whip tool. Say here I'll just add the expression or you can just copy it. Say copy the circle's a wiggle expression and paste it on the rectangle and it will do the same thing. Or you can use the pigment to say here we pasted and here you can see the wiggle is there, but they are not uniform. Because the timing, the startTime could be different and there'd be ration. Well, we'll could be random or random expression. So best thing is to use the pick whip tool, this spiral tool, and just left-click and pull based data or to the property that you want to follow. So the Shape Layer 1, a circle and a rectangle wash to follow the circle. So it is now following exit, leave the way it is wiggling. So you have learned a, two or three things here in this lesson, you'll learn how to write expressions in place of keyframes at the wiggle expression. And you learn how to pick with one layer two hands are. Here. You can rename these layers for your simple identification that you can use in a future edits. So adding an expression is a easy thing. You just need to hit the stopwatch icon, press the Alt click, and left mouse click, and it will open. So the way to identify whether you are writing an expression exploration mode is on or off is to that, uh, when you are using keyframes, your values for say, position would be in blue color, and when you are writing expression, it will turn to red. So when any property's value is turned to red color, it is displayed in red color. You can make sure that your expression is enabled. Otherwise it is not enabled. Similarly, we write texts. This is text layer above, and we can pick whip it again to the property that we want. So we want to pick whip. We don't need to enable excretions. We can directly pick whip. And if you want to add an expression, you can do so. It will directly automatically write this expression, this com dot layer circle transform position. Don't need to add testing. Guy to write more wiggle expressions. Keep learning and keep moving ahead. 3. Time expression: Hey there, welcome back. Here. In this lesson, you're going to learn about and interesting expression in After Effects smashed time. Time is most widely used exclusion in After Effects. It allows you to perform any operation based on time. You can speed up. You can move faster than time, say 10 times 100 times, 200 times 2000 times. You can move is lower than time. You can have time delay. You can create relative reference to another object time and much more. So let's learn the basics are time, excretion in After Effects. So here I've created an oval shape, which has a pivot or anchor point place right in the center. And here, I want to add an expression for time. For the rotation property. You can add an excretion by hitting the stopwatch. And left-click hold the Alt key on the keyboard and hit Delete key. And here we got an expiration. So here transform dot rotation equals 2 time. When you write this expression, your object will start rotating with the time. But the speed of time, the less multiplied with an 10. So right As TRC 10, and it will rotate ten times faster than real time. So when you say two seconds, our part, it will move ten times the speed of two and so on. One-minute have 60 seconds. One rotation has 360 degrees. So you can calculate the rotation that you need. So a complete rotation will be completed with 360 degree. Say, if rotation is completed in 1 second, that means you are moving 360 degree in 1 second. If your rotation is completed in two seconds, that means you are covering 180 degree in once again and so on. So based on this calculation, you can speed up or down your rotation or any kind of motion with respect to time. And the similar way you could add a time expression to position, opacity and anything, any transformation property. And so on. This way, you can create an analog clock or a wall clock that has multiple dad's one hand, could we for second, 14 minutes and 14 hours. You can copy the same object, will have the same expression with me. When you pasted the same object. And you go to the excretion is you got to see him excretion there. And you can change the speed of time simply by manipulating its value. Say, no, this time, multiply by two. You can lower the creed of time. You can also multiply with the negative values. You get, subtract, add, divide, anything, any kind of operation that you want. You can do. Try experimenting with this time expression, and try creating your own clock. And different cases. Keep learning and keep moving ahead. 4. valueAtTime: Hi, welcome back friend. Here in this lesson you are going to learn about one more useful expression in After Effects, that is value at time. This material is used to get a value or at a given time for any of the properties such as position, opacity is scale, rotation and anything. Say here, we just need to draw some shape. Here I've drawn a circle and we will draw one more circle, which will finish the value of the previous circuit. Or in other words, we want wonderful guild to follow another circle using the value at time property. So set a keyframe for one circle. See yellow circle. We have set a keyframe, so it is moving from left to the right direction. We have set two keyframes over a span of downtime that is moving leftwards from right direction. There it is. You can speed up by dragging the keyframes closer to each other. You can add easy ease to get a smooth speed. Many issue. So now we need to draw one more circle that will follow this yellow circle. So just change the color. Let's make it orange. They will be clearly identified. Here. What you need to do is this opened up position. Again, press P on the Shape Layer and click oiled a whole left-click. And here add an expression, just pick whip distinct to the Position property of the yellow circle. So it will write a code for you, this form layer transform position. So this way it will actually follow the path of your previous circle. But you have position a little bit farther away. So it really start at that point. You can always set the initial position of either of the circle. And now just put a dot at the end. And right, value add time. And in recess provide time minus 2. Hey, all you can write time minus one. So it will face value at that point of this yellow circle and turn it to pass it to the position property. When you write time minus2, it will start moving right after two seconds. So it will wait for two seconds. And then it will start when you write time minus one. It will have a delay of once again, if you don't write anything, it will call it the same time as the previous circle. So when you have multiple objects on your screen and you want to have some effect like a one wall is moving when object is moving 1 second earlier are another object is moving after a 2.5th later or anything like that. You can provide always. You can provide values like Decimal values are always expected excepted here. So you can have delayed. It will look like with proper timing, it will look like a one circle is hitting another circle, a circle. The second circle will start moving right? When you, when it hit another circle, it will look like a game of sneakers or anything like that. You can create awesome animations using this property. Value at time is used in a lot of motion graphics project. This is very useful. It helps you automate a lot of things. So just imagine if you don't have this property, this excavation unit to initialize a lot of keyframes. Keyframes are good and easy to get, but they are repetitive. Once you want to edit anything, update your motion graphic project. After some time, it will be a tedious work. You need to restart everything again sometimes. So it is better to use as much as expressions as you can. With those expressions allows you to automate a lot of things. And it will be more readable and easy to communicate. It will save you a lot of time. There is a little bit learning curve, but it's still, you can do it. Here it is. This is awesome animation. It is very simple. You can be more creative than me. I'm just demonstrating it in a simplest example so that you can understand very easily. You can create a complex vectors and create a advanced motion graphic project using this simple explanation. Or you can use it multiple times in multiple objects. You can just just try to create a billboard. Green board of the snooker at Please, multiple balls. When one ball hit any inner wall, it will move second, third, and different balls. So you can use this thing, will keep track of everything, right? Creating your own projects, keep learning, and keep moving ahead. 5. math round display number in source text: Hi, welcome back. In this lesson, you will learn one more expression that widely used math dot drown. So here we will be drawing a shape, say polygon, annual changes property using the keyframes, see opacity, scale pollution, anything. And we will add learn takes layer. And this text layer will display the value of any property at a given time using the matter ground and a combination of quick way up to here, you need to reposition your anchor point using the pan behind tool, the center of the shape. Now we can add a scale. Anchor point should be placed in the center so your object would look symmetrically, moving. When it is placed outside the shape or anywhere else, it won't look very smooth. So here we are setting a keyframe for the scale property. And here it is. It will scale up from 0 to 100 percent. The next we need to write a text layer. Decide any random string, say 000, Although it will be replaced. So you can write anything. Uses selection tool. Now, just expand and go to the shape layer. You can escape the text size, font and color. Really want to hear, just expand it and go to text, the source text, and add an expression for source text and just hold Alt and left-click. Now, use the pick whip tool and position it to re-scale a property of the shape. Here just played. So it will show the value of the scale property in decimals. So this is a large number and we want it to be round off only two before that decimal point. We don't want the decimal values. On the right-hand side. We want to round off the values. So you just need to add one function died before this string expression and just write math dot Round Capital and R is a smock and place everything is in the braces here and I will round off the value that is stretching. You don't need to write this property that is within the braces. You just need to pick whip it to the scalar property of your ship here. They similar way. You can add a property of anything, say opacity, rotation, anything else? Just go to the Shape Layer and choose any other transform property, say position. And now try to add a keyframe to the position property. Based on the time. You can also add excretion if you love expressions. But sometimes keyframes are easier to apply. The best way is to use a combination of key frames and exclusions. Expression will help you add some functionalities that you can't do using the simple key frame. They are different, but sometimes they solved the same problem. So here you have pick whip, the position property the same way you have done the scale property. You can always place now not round this value. And it will be saved to display on the screen. So here it is. Now it is showing the position value. Here it is taking their distance valid or any value. It will just use a mean square. You can also set x position and y position. You can also use opacity. Any other properties. When your layer are in three dimension, you need to use the array will face with three variables. The parameter, number of parameters would differ because for capacity, there is only one parameter for a scale, there is at least two parameter, x-axis and y-axis. Or position independence. If your object is in 2D, it will have to property are two parameters otherwise. And we'll have three parameters, x, y, and z coordinates when it is in trade ammunition. While rotation you got three parameters as well. When in 3D. That the Math.random property works. Yeah. Here it is an awesome value v, you can create a speedo meter, anything you can provide value for any property and displayed on the screen you signal combination of text and a simple expression, the pick whip tool and a sheep. Cry building resolution hill. Then keep learning and keep moving ahead. 6. pie chart: Hi, welcome back, friend. Here in this practical exercise, you will be learning about pie chart animation with After Effects. So let us draw our ring first. It will be a circle. Ring is a circle with don't have any fill and it has a thick stroke. So have the proper configuration here. Make the fill and a stroke with a proper width, and choose any color we have taken this white color. So now next step is to rename this ring. Because a shape layer 1 would be very weak. Let's make it white ring. So in that case we could refer it very easily. Now, we want to add one warring debt. We'll show our data. That is animated data. So let's choose any color. Say, change this to green. So we have this green progress on the white background. Just rename this ring to green ring or proper referencing because we will be using expressions that will require referencing. So now we'll just add a trim path. Just go to Add, Add Trim Paths. This is trim path. It will allow us to animate this thing. So just go to end, make it 0. Initially. We have gone to 2.5th keyframe it. And after a 1 second, also, just add one more key frame and make it 100 percent. So in this case, it will start from 0 and become 100 percent. So let's make it visible. We have invisible. So it is working. So a progress bar is moving very fast. So let's delete 2.5th. So it is nice. So this is our prime animation. So this will be the background ring. When it is done. At that point of time, we want our second ring to start. Just press bracket, open bracket, bracket, where you want your timer to start. Similarly add a trim path to this ring as well. Perform the same operation, make it 0 initially, the end timer, and after 1.5 second, just make it a 100 percent. So in this case, this ring will overlap the previous one. Okay? But here we want our progress bar to start at any in-between value. We don't want it to be exactly 100 percent. We want it to show some fraction, say 80 percent. So we can just go to the end key frame here for the second ring and make it 80 percent. You can make any person takes 30, 40, and 50, and a discrete value, anything you want, 39, 21, editing. So this progress bar will stop at this point. So now let us add a number which will reflect the current value of the progress bar, the green color. So let's make it a little lighter shade of green so it will match. You're going to choose any color, place it in the center, move the anchor point to the center of this digit. And then now let's animate it. We need to add an expression to the digit number text. So just expand it and move to the stopwatch icon in the text. Here we have the source text. Just click Alt and left-click the stopwatch. And this will open the expression tab. And here we want to write some expression in order to perform computation. So here we want our progress bar to reflect. Just write math dot around it. This will be a function and this.com dot layer and provide the name of the ring. So here we have the green ring. This provide the name green ring. And after, add the content. And in the braces, add a trim path one. So trim path will be the function that will be taken care of here. And dot n. So this will, the end parameter of green path will be taken into consideration. So the number, value of the number will reflect to the circle. You can check it back here. The trim paths one is written, you can rename it is not a problem. So just to check it out. So here the number is reflecting the ring value. You can press the Spacebar to preview your animation and when it is running properly, you can proceed with an existing server. Animation is running as expected. And now we can add one more texts. So just before the percentage counter, we can write the percentage text. So just write per cent and make it a small size to fit in the ring. And beautiful epic. Similarly, we can add the same progress bar and expression to other charts. Line charts, bar charts, and different infographic contained. In the similar manner. We are going to learn more in the coming exercises. Killed him, keep learning and keep moving ahead. 7. loopIn: Hi, welcome back friend. Here in this lesson you are going to learn and interesting expression and after effect and that is loop in. So there could be scenarios where you want to repeat some functionality over time. So we'll go to functionality could be anything, any keyframe you say to position opacity or any other transformation property. Those keyframes could be repeated over time using the loop in our loopOut method. So these are the loop method. When you apply looping, it will animate anything in the starting of the keyframes. Here I'm setting the keyframe for position of an interval to second. Ball will be moving from top-left corner to the bottom right corner. So this is one direction motion. So here it is less than drag these two keyframes to start from 46. So just add an expression or left-click key. And here it is. So here what we need to write to create a looping effect. When we created nothing written, letting it will just use the keyframes. I'll just write loop in I capital. And within braces, you can prepare a provider to parameter's type and I'm key frames. So first, select the type ping pong and set non-key prints 200. You can provide any value. It will work perfectly well. So there are two types here, cycle and ping-pong. So the first, the looping effect will copy the keyframes before the actual keyframes. So it will be repeated before the keyframes out there, won't be repeated afterwards. Okay? So Luke is placed before the keyframes. And when you place them afterwards, loopOut will place it afterwards. So when you apply easing, it will also a brand. So the ping-pong will create a to and fro motion. Although we said the keyframes to move in one direction here, rightward direction. But when we use Ping-pong, it will also move to the left were direction. So for two seconds it will move right, and for next two seconds it will move left. But when we change this type to cycle, there won't be any to and fro motion. It will simply repeated method of the keyframes that you said. So you can see here, just type cycle, replace ping-pong a cycle and then play. Don't leave any spelling mistake. There it is. It will automatically disappear and reappear from the point where it was her starting. So it doesn't look seamless. I think ping-pong will appeal to more audience, but it depends on your application. Sometimes you may require cycle. Sometime you are going to require a ping-pong effect. So when you want a One Direction looping, you can use cycle. And when you want to use multi-directional loop, then you can use pink on effect for to and fro motion. This way you can apply this loop in property to any set of keyframes. You can also set multiple keyframes, not just a pair of key frames. You can put 3, 4, 5, anything 5000. You can do almost anything, any number of key frames. So here, you can also change the value of monkey friends said won't effect here because it will repeat over time. Or you can also leave it for the instance. You can just apply type request to cycle or ping-pong expression as simple, you can apply any functionality using single line or single method application. You don't need to write a long code programs that developers to re-save it as simple functionality, practice this loop using multiple objects. In After Effects creates best motion graphic animations. Keep learning and keep moving ahead. 8. Expression Controls slider checkbox and more: Hey, Welcome back. Here in this lesson you are going to learn about excretion controls in After Effects. Let's start. You know how to write expressions. With After Effects. You can add excretions to Annie after transformation properties and after effects. So there could be a scenario where you need multiple controls, more advanced controls like a slider, checkbox, 3D point control angle, color, layer point, drop-down menu, anything like that. So how you can add them with your properties. So you can go to Effects, go to expiration controls, and you've got this options. You can create your own slider control. You can add various properties based on different conditions. So this idea is similar. You have to use a pick whip tool to pick whip this property newly created, and you can change the value, say I'll pick whip the opacity to this slider control. And when you slide its value, changed, the value, it will get affected or reflected with the opacity property of this object. The similar way you could add checkbox and other properties. You can also email also link multiple properties, the same pigment to. And when you, you can change their property value of the slider. Or you can expand it to get a slider option here as well. You can also type the value that you want. It makes it easy to navigate. In cases you want to get more control, say, if you have multiple layers and multiple objects on the screen. So it will very difficult to manage it only from the timeline of property pane. You can use the FFT control and extra options to add more control. Then you can add a checkbox control. It may have multiple checkboxes or a single checkbox. So it will be enabled on when it is either check or uncheck. The slider provides you a range of value, whereas checkbox allows you to select only two conditions, yes or no, true or false. Checked, uncheck, like that. Then you pick whip it and your object is checked, it will pass a 100 percent of value and it'll be deflected. When you pick whip any property, it will automatically generate an expression for it. You don't need to write everything as shown on the screen. You have, you need to learn the concept here and try implementing your own way. You have to do as much as practical as possible. Try adding various effects on IV, need to add expression controls. Link various properties using this pigment to and play with them. You will learn more by doing practicals. So here, you can also add more controls. Let's see, color control. Our object is in green color, and when you link it will change the color, but you have to link it to the proper channel. When you link opacity with color, it makes no sense. So it won't be visible at all. You have to link it either to a stroke or the fill color. So you can go to color properties by expending your layer and it will be available to you. Okay? So as you can see here, linking capacity to the color control doesn't make any sense. You don't have a label. You can hit your layer property x planned it, go to Contents, go to shape, an ellipse. You either go to the fill or the stroke. And here you can play with the color. Although you can directly apply keyframes, hand or expressions right here and the key frame. But you can also have an additional controller in the effects panel. So this is the similar way. You can also use more expression controls, such as drop-down menu, where you can say two or three or multiple properties that can be dragged and those conditions would we specify? Try experimenting with it. You can have a point controls. The layer control. As you can see here, the drop-down menu, it will have a drop-down item. There are multiple items here. You can initialize and define them and you can link them. Say if you have different objects, you can choose from either of them. Using this thing. You've got angle control. These expression controls are the key components of building excretions or building effects and presets that you can use in your projects. You can link this angle control to either of the rotation properties. The best way is to expand it in the three-dimensional coordinates. You can link either of them. And you can control it this way. If you don't like numbers, you can see, if you are a visual person, you prefer seeing the angle rotation here. With a point control, you can use it. There are more controls here. Now After Effects. And it will really help you in the complex projects. 3d point control will allow you to set the coordinate, say, for position on orientation. You may have three-dimensional coordinates and that can be provided using this expression control. So you can move any object to the x, y, and z axis using this controller. These two controllers to angle N predefined controller are quite common in various presets. You can add a layer control, say for expressions, or you can create one expression. And using the layer control, you could apply which layer it must implement or effect. You'd add different things like that. Keep learning and keep moving ahead. 9. loopOut: Hi, welcome back. In this lesson, you are going to learn about loopOut method. In the previous exercise, you learned about looping method. You apply the loop operation and after effects. So let's do it. So here we have created a simple rectangle. It is long, a rectangle with its anchor point place right in the center. There. Now, we want to animate the rotation property and add an expression, say right loop. And here and just write cycle. So we want to apply this cycle loop. But there was no keyframes. So we can set keyframe anytime later. Said the keyframes and rotate it a little bit. And it will apply the effect after the keyframes are set. So the looping will create a loop your set of keyframes before the actual keyframes, and loopOut will loop after the keyframes. This is a difference. So there could be scenarios when you want to sit triggers. So when you want to trigger any animation, loop out will be the best-case. And if you want to turn anything off for a certain time, looping will be useful. Here it is. When we said the ping-pong, it will move a little bit, even create a gong to and fro motion using the ping-pong. Ping-pong looks very smooth and when you apply easing and using the graph editor, it will look very cool. So apply easing and go to graph editor. And you can turn the graph is Speed Graph reverse little bit center. So it will gradually take up to a speed. It will accelerate, get into the peak, right in the middle, and it will accelerate. It really start is low, get very fast and very slow. So it is, it is very smooth. It looks like an elastic motion. So when you want to create an elastic motion, you can use this loop out ping-pong effect with the rotation. This way you can create anything. So if you want to create an animation like oil export, oil production, you can create a, a do you find the using this thing, any mechanical objects? Would we created this way using the ping-pong and the graph editor you can apply easing. So here let's add a gone to this object and it can be placed in the old analog clock, wall clock. Or a clock tower could be created using this way. You can create a wide array of objects and motion graphics using this loop in and loopOut method that you can attach any properties. Here we want to quick with this gong or the circle to the rectangle. Stick their head, it is. So when you pink, when you pick whip anything, any property, it will create a parent property and inherit anything from there. You're going to add more objects to your and emission. And you can apply the follow-up method. You can say the pick whip to the property you want. When you said the key frames, you can pick an entire layer for anything. But when you want to track only a single property, you can do that. Also. There is no restriction data. You have to apply the similar properties, a rotation. Nice not to be followed by rotation on the rotation. Could we pick whip to position opacity editing? You can pick whip, anything, any property of any layer to any other property of any other layer in After Effects. So just experiment with distinct, try changing the anchor point. Say here. Let's put the anchor point to the star on. It will put your anchor point. It will look like it is printed. Two, this is dark and the gang is moving. And it's very nice kill everything is small or big. Change any property. Experiment with it. And I had to create your own motion graphics projects. Theta it is experiment. Try combining various expressions to create a program or a solution. Keep learning and keep moving ahead. Practices or with a better way to learn anything. 10. random: Hi, welcome back friend. Here in this lesson, we're going to learn about generating random functions using an X direction. So let's start. So draw any shape, any object. Say here I've drawn a star and we will be rotating it using a random match. You just go to the layer, press R. And just said the key frames, said the excretion or left-click. And here it is. So we want to apply some random method and just add dot random. It will create random values. You need to provide the range of values, a 0 to 100. So it'll get any random value folder rotation and pass it to the rotation where property and it will rotate added value. So here are just reposition your anchor point using the pan behind tool and it will start rotating on its axis. Please note that if your anchor point is not placed properly in the center, your object may move in different axis. This logician them properly the way you want. Here it is, you can change the value that you pass in the random method, say from 0 to 360 degree, you can change the value. And anything. You can also set more lines of code or expressions like time, time delay, entertain, and it will have an effect. But this time we are not writing anything. And you can set the same random method, two different properties. Like is scale, opacity, anything. And it will generate random values and pass it to the property. They're just your dear. And now move to another property, say opacity and add the expression or left-click. And here it is. You can also copy the value, or you can provide it as a value dot random or value equals to random and provide the value range of the random value 0 to 100. So opacity is like this. So it will start blinking and it will look like Aristarchus blinking. And you can always turn on and off any exploration using the equal symbol for the expiration. When it is selected, your expression is turned on. The selected, your expression is turned off. This is a good thing with expressions like you cannot turn off the keyframes. Either. You set it all, you remove it. But an excretion can be turned off. You do not need to remove the all clear that our text. You are you don't need to disable it as well. You can just pause it for a moment. The header tests. Now even say the opacity. There are two ways you can use transform.py, property name, opacity, rotation entity. Or you can write everything the value, the Gaussian random will also generate random values. There are two methods, the Gaussian random and the random method both have, follows a range of values. By experimenting more with random methods for different motion graphic projects. Keep learning and keep moving ahead. 11. length: Hi, welcome back friend here in this lesson you'll learn about linear expression in After Effects. So let's do it. So let's create a text layer here. Just provide any value, let's say 0. And we will be moving or rotating this layer or this object on the screen and will face the value of the property. Hey, let's set a keyframe for position over an interval of time and slowly drag it to the right, left corner, right bottom corner of the screen. So it is lightly dragging to one direction, right, We're bottom corner. And we can fetch the value of position and displayed on the screen. Not just a value, we can also calculate the length between these two points. So let's do an expression. Here. You just need to write text dot source text equals to length. And within the braces provide the value of transform.py addition. Here we want to track the position. So let's see. So it is fetching the long value of the position parameter. And you can note it is a length because it is one-dimension and length it has two values, x and y coordinates. And when you have three coordinates, it will have three values. But this will show the distance between those two points. So in this starting it is a starting with her 524 on, you can round off the value using math.pi round method to remove the decimal values. You can also subtract this initial value, 524, to get the actual length between those points. Actually just calculating the value from the 0th coordinate origin. And then he moved to any value, it will change. The similar way you can use length to calculate the distance between two points and the change in property values or opacity, rotation, anything like that. And the transformation property, it will work well in three coordinates. And everything is, you can also face the value of individual coordinates, x and y position. But here, in this case, it is not perfect thing to do. Because when you win at each point, how to use a two coordinates on the screen and it is moving in with the x and y, both directions. So when it is horizontally or vertically movie, you can fetch the coordinates of any single value. You can always change the size of this text layer, make it big or small to fit on the screen. In a similar way, you can also apply crack multiple points. Say, if you wanted to have an animation to depict the change of year, you're going to do so. You can have animations where two values of text is rapidly changing. Now this kind of motion graphics is widely used across elevation and web series. So you can create distinct. So when we set a keyframe for rotation and we have changed the ACS question from tracking the position to rotation. It will track. So it is rotating as well as tracking. It is not limited to track only the transformation of the same text layer. You can also track the change in the properties of any other object on the screen using the pick whip tool. Traveling around solution, keep learning and keep moving. It. 12. if else: Hi, welcome back, Frank. Here in this lesson, we're going to learn about how to perform any action based on the defined conditions using if-else conditional in After Effects expressions. So let's start. If else is a powerful programming tool that allows you to provide various pre-defined conditions and perform a set of operations or actions based on the different conditions. Say if you have two conditions, one condition is true, then you can print something. And when it is false, you can print anything else. So check parameter for a condition to be true is called. If, if any condition is true, then do this and elses if, if statement gets fails. So let's do it here. We got a text layer and we have changed his position to me one day screen. And here we just need to write an excretion to the source text. And here we are writing value and dot transform. Value occurs to transform.py is k, sorry, transform.py position. And you can provide any transformation value, the scale position, anything is. And you need to write the second line if Math.random length, transform.py mission. And within parenthesis, you need to provide value. Value is a parameter that is used to fetch the current value of the source. Here it is source. And here we want to store the value of escape. In this parameter. We want to display the value of escape property on the screen. If any given value of transform position is greater than 1000. Else we want to print 0. Okay? So this is a condition, it is very readable form, form. You just need to practice. Danny, we're here. We have used two properties. We have used the position to check any condition. We have defined our condition. Length method is used to find the length of the position and check whether it is greater than or smaller than 1000. Say it must be greater than, tell it, you can change the value from 1000 to fall under 3000, anything even negative values. It can be used for any value. You can also reflect the rotation opacity. Anything else on the screen. You can also provide multiple conditions. Multiple if conditions can be created using a method. And don't forget to write semicolon after end of each line, although it is not required for one-line statement, 19 expressions or various other expressions. But still it is a best practice to add a semicolon at the end of expressions. Here it is showing the Coordinates for the escape, the property value. You can display the value for position, value for rotation opacity, anything else on the screen? If health, along with the loop are the two core building block of any programming language. So people who are from the programming background knows perfectly well that no programming languages theater without if-else condition. There are markup languages like HTML, CSS that don't support if is. But any language and with Java, JavaScript, expressions powered with no sorry, After Effects, expressions are powered by JavaScript. So JavaScript has this feature of fs conditionals and answer you use in expressions. You can use this if else conditional in a lot of scenarios. Sometimes some values may not be displayed on the screen as NaN, not a number. It is a kind of error. So if your property doesn't have any decimal value or any numerical value, it could be an alphabet, it could be anything else. It won't be displayed on the screen. You can also apply mac or crown to any variable as well. It must be a variable, at least. It is showing not a number. Maybe you're going to have two ordinates for display. You can pass a single value of two. This you fellows can be used in a wide range of scenarios. You can use it as our triggers. Say if you have some bulb, for example, your object would be above which and light up different colors. You can change the color based on the trigger. Say, if its position, if its orientation is 30 degree, you can change its color to red. If it's angle is 90 degree color, can we change to green or yellow? Thing like that? Try to imagine a lot of animation is tap. Try to storyboard your ideas and apply using After Effects. After Effects is a cool motion graphic editor are expressions empower you to do a lot with this thing. So try to add an if else. Exploration has to provide a condition to trigger anything based on your ideas. You need to practice a lot to learn as excretion. You can also track multiple points. So here, opacity and if scale is also changing along with the position, you can apply a combination of property there as well. With EFS conditionals. So keep learning, keep moving ahead, traveling row and solutions. Keep animating. 13. time delay: Hi, welcome back. In this lesson, you are going to learn about time delay and relative reference. When you have multiple objects in your motion graphics project, you can change the value of any property, transformation property of a given object based on another objects. Rubber change of property. You can add delay. Say for example, when you move a circle from top to bottom, it will change the shape, size of a square placed next to it with a time delay of two seconds. So when circular starts moving after two, so again, the square will change it size. You can add a similar kind of functionalities. So let us first set a keyframe for position or the first circle. So here, with a delay of say, four seconds, we are moving this circle from top to bottom, or this span of four seconds. So it will move from top to bottom. So these are two key frames. After 4 second, move it again to the top. Okay? The next, go to the, you can also change any other property, say is scale as well. A change the scale. And when it moves towards the bottom of the screen, it will reduce in size. When it gets back to the top, it again gains its original size. That it is a simple animation. You can play it too. Issued at. It is doing what you are expecting seventies getting reduced in size. And when it goes to the bottom and when it bounced back to the top, it gains as we now go to the second layer. And we need to add an expression using Alt. Left-click to the scale property. Here we've got distinct. You need to write any variable, say delete equals two frames to time. Frames to time helps you to convert frames into time and it has to remap it. After that, please semicolon and write any another variable, say above. And using the pick whip tool, get to the property of any other shape layer, say a scale property of the circle. And it will crack. It, stored the value of properties of the scale of circle to the variable above. And now right above dot value at time with time dilly. Dilly. So it will add a delete. You can preview it on the screen. You can as something more beautiful, you could add a line, so it will look like a slider, slider control. So when you change the value of the slider, it will have impact on their screen. The similar way you can create a lot of thing. You can create an abacus and a moving object. The mechanical. Currently it is having almost a 0 delay. So it is a starting at a time, then emission, it starts, it looks very cool. You can use this kind of thing to create mechanics of pumping machines, engine's greenhouse effect. Anything you want to depict, you can use the value of power of relatively friends and time delay. Here we are using two methods for time, frames to time and value at time. These are very important methods to add an explanation. So you can see here this expression's have a lot of power that can be implemented easily with keyframes. Expression does not just a automate your tasks. It leverages you to do a lot of thing that can't be done with keyframes. I'm delay, frame snapping. It makes it a lot easier and intuitively easy to read and understand. You can experiment with changing value for everything. So here you can pick any other property of any other shape or something like that. Say if you can add an anime, create an animation of mountains, lakes, and scenery that changes its size and color based on the direction of the sun. So when there's sunrise, the mountain will change to orange color and then get greener and vibrant in color. Similar way, just imagine what you can do. So be creative, be imaginative, and try to do everything you can think of. Keep learning and keep moving ahead.