If you are new to After Effects, the expression may make you a little scared. It took me a while to start using expressions in AE instead of copying and pasting from google. Learning really takes time, so practice often! There are many excellent AE expressions that can automate your creative process and make your animation smoother.
Wiggle is my most commonly used expression in AE. Giving an object a random value and letting it swing randomly can really give you the desired effect. This expression can make your dynamic effect look more vivid and natural.
The first number in the expression represents the number of dithers per second, and the second number represents the dithered pixels. Therefore, adding the expression wiggle (2 2,30) to the position parameter means dithering twice a second, 30 pixels at a time.
Time expression is a sharp weapon for circular animation. For example, if you want an object to keep rotating, you can enter the time in the rotation parameter, and the object will rotate once every second. Time expressions can also be used with basic mathematical formulas. If you want your object to rotate 30 times faster than before, you can enter the time *30.
LoopOut expression can also help me buy and make loop animation. However, unlike swing and time expressions, cyclic output expressions need to set key frames in advance. So, if you want an object to rotate once a second, you can add a loopOut expression to it, and then it will repeat endlessly.
Although seedRandom can only enrich the previous key frames, if you think about it, you will find that it has other uses.
Random numbers are not completely random in AE. Of course, it can also be called "random", but the actual random value can not be obtained in javascript, so it can not be obtained in AE. Because of this, we need to give these randomness a starting value. After Effects automatically uses the layer number on the left side of the timeline as the initial value. Every iteration of random motion has a value, which is called "seed", so the motion with random seed of 1 is completely different from the motion with random seed of 2. You can add a seedRandom(5) before the wiggle expression, and their random motion states will be exactly the same.
If you change the order of layers, the random seed will also change, so your random jitter effect will also change. This is not a big problem, but sometimes when you have a random jitter that looks almost perfect, you don't want it to change. To solve this problem, you need to use the seedRandom () expression. This expression will help you lock random values, even if you change the order of layers, your random motion will not change.
Math.round () is an expression that can round decimals. This is a great countdown or timed animation tool. Just put your expression in Math.round () brackets, and your number will become an integer.
(The original author Caleb Ward, especially thanks to the translation of Translated Fruit Network (https://eguo.world))