Chapter: Compositing Tools and Techniques
Topic: Scripting or Expressions
The After Effects expression language has a seldom-used random number generator that is really quite a gem. Dan Ebberts says ?seldom-used? because he doesn’t believe he’s ever seen it used in a single expression he’s seen posted on the internet. It?s not the easiest command to understand and the documentation is pretty sparse but once you get past that it?s very cool. Before we get into how to use it, let?s set up a scenario where we might want to use it (if we only knew that it existed). Suppose you had a grid of dots and you wanted to generate an undualting 3D motion like the dots were attached to a flag waving in the wind or were floating on water. One way to do this would be to set up a grid of dots and then have a comp-sized layer of Fractal Noise below and have each dot?s z position related to the luminace of the Fractal Noise patten directly below the dot. Let?s say we want brighter areas of the noise to move the dots closer to the camera and the darker areas to move the corresponding dots away from the camera. As we animate the ?Evolution? parameter of the Fractal Noise we would expect the dots to undulate as the underlying luminance vlaues change. Note that what we?re looking for is not independent random motion for each dot. We want it to appear as if the dots are connected to an undulating surface. That means that the position of each dot is related to that of its neighbor.