btagrab.blogg.se

Random position and wiggle expression after effects
Random position and wiggle expression after effects










Here's an example expression for Position that will move a layer to a random position and hold it at that location: By setting the second parameter of seedRandom() to "true", the numbers generated by random() will be the same on every frame.

random position and wiggle expression after effects

In its simplest form, seedRandom just seeds the random number generator to produce a particular sequence of random numbers that will change on every frame.Īs an example, these two expressions will generate completely different sequences of random numbers (which will change on each frame): We'll get back to that "timeless" business in a minute, but first let's look at the other parameter. The first one is the random seed, and the second is a true/false flag that tells After Effects whether or not the random numbers generated by random() will be "timeless". You can also use it just to change the sequence of random numbers generated by random(). SeedRandom() is a clever method that Adobe came up with to let us control the rate of randomness. Most of the time though, you want a more controlled randomness. This is great if you want to have a layer frenetically hop all over the place. You get a different result on each frame. While the expressions above do indeed position the layer randomly, if you try any them you'll discover what seems to be a serious limitation of the random() method. Any of these expressions for Position will do the trick: Let's say you wanted to randomly position a layer within the comp.

random position and wiggle expression after effects

We'll illustrate how you might use this with a few examples. So you can see that the random() method is pretty flexible. Some examples would probably be helpful in understanding the different ways you can call random(): The basic random() method has several different flavors.

random position and wiggle expression after effects

Randomness is one of the most asked about uses of expressions and After effects gives us a pretty good arsenal of tools with which to implement it.












Random position and wiggle expression after effects