Time and Value are simple but immensely helpful expressions to know in After Effects.
First, let’s look at the Time expression. It is simply written as:
This returns the composition’s current time in seconds. We can use this to augment movement. For example, by creating an expression for rotation, we can write time to have the layer rotate one degree every second by default.
If we want our layer to rotate faster, we can add the appropriate math to the expression. For example, we can multiple it by any number we want to speed or slow rotation. time*10 will rotate 10 degrees every second.
You can quickly alter the speed of motion without dealing with keyframes.
Now, if you want to alter the speed of motion just for a small portion of your timeline, you can still do that. Following our example, you can add two keyframes and make a very fast rotation. But when you playback your timeline, you’ll notice the speed is remaining constant per the expression. This is because your keyframes are being overridden by the expression.
To make your keyframes count, there is another expression: value. Simply append value to your expression to take into consideration the value of the keyframes at a given point in time. For example:
This will rotate 10 degrees per second normally, but also takes into account the value of any rotation keyframes on the timeline. Otherwise, the rotation remains at the constant time*10 speed. Adding +value in this instance can make your keyframes relevant and operational in this expression.