Types of Expressions

The wiggle expression can apply to all dimensions of an array (x,y, z). wiggle(3,4) for example, applied to a Camera, which is a three dimensional array, gives the footage a slight handycam effect. With the wiggle you can add an expression to a layer even if there are keyframes already, and they remain intact. It just wiggles the keyframe values.

ex: [position[0],wiggle(2,4)[1]]

 

 

 

There are a lot of other useful expressions that we could use to make work a lot easier, such as the random, the index, and the time expressions.

The random expression generates random values, like for example  random(0,720) , which randomizes the property of the layer (position, scale, rotation etc) between 0 and 720 every single frame.

The index expression just gives you the number of the layer. If the number of the layer is 3, then the index expressions added on a property of that layer returns avalue of 3. If the layer is moved at  the bottom, then the value would be the number of this last layer.

You can also multiply it, like index*5.  For example, we can write an expression for position using the index: [position[0],position[1],index*5] which means that  x and y are normal, and then the z positionis controlled by the index times 5. If you duplicate the layer, it creates a duplicate in z space. It's good for creating 3d ensembles and patterns.

You can also multiply it, like index*5.  For example, we can write an expression for position using the index: [position[0],position[1],index*5] which means that  x and y are normal, and then the z position is controlled by the index times 5.

The time expression just expresses the time in seconds. Adding the time expression to the opacity for example, modifies this property as the footage plays, frame by frame.

You can also use expressions inside expressions:

wiggle(time,time) applied to the position, means that the frequency and amplitude will increase over time, frame by frame, creating an earthquake effect.