• To see it working in action. First create a text layer, and in the source code property type time ( ); and play your animation.
Time Expression-Text-Layer
The values of the time is returned in seconds
ExpressionExample Speed/sec.Rotation Property
time * 360Square Rotation 360/SecondFull Rotation
time * 360/2Half a Rotation
time * 360/4Square Rotation 1/4 per second expression of timeQuarter rotation
ExpressionExample SpeedPosition Property
transform.position + time *100;Box A
transform.position + time *200; 2x Speed Box A
transform.position + time *300;3x Speed Box A
ExpressionExample SpeedScale Property
transform.scale + time * 50;Box A
transform.scale + time * 100; 2x Speed Box A
transform.scale + time * 200;3x Speed Box A

The valueAtTime(t) Expression

Allows multiple animation of objects linked to one another, streamlining the offset values. It can be added to multiple properties such as (Position, Opacity, Rotation etc…)

  • Step 1: Create a Main Layer and add key frames for animation
  • Step 2: Duplicate the Main layer
  • Step 3: Add an expression on the animated property in the Duplicated layer. Then using the pick whip tool, link it to the Main Layer and add the expression .valueAtTime(time) . Offset the animation by adding a subtraction (-) or plus (+) sign after the text “time“and ad a numeric value offset for in seconds.
ExpressionWhat Does It Mean?
valueAtTime (time – 0.25)Delay by a quarter of a second
valueAtTime (time – 0.5)Delay by half a second
valueAtTime (time – 1)Delay by One second
valueAtTime (time + 0.25)Ahead by quarter of a second

valueAtTime Example

  1. Circle 1 has the Y-Axis key frame positions set.
  2. Then Circle 1 is duplicated. Creating Circle 2, and has the Y-Position property linked to the property of Circle 1.
  3. After Effects creates a code thisCopy.layer("Circle 1").transform.yPosition. Which reads, use the layer of Circle 1 and it’s transform property of the Y-Position value.
  4. Then the valueAtTime expression is added: thisCopy.layer("Circle 1").transform.yPosition.valueAtTime(time-0.15); which means take the value at the time of Circle 1 and subtract it by 0.15 seconds in a delay.
  5. The expression is then tested hitting the space bar.
  6. Circle 2 Layer is duplicated. Circle 3 had its X-Position moved to the right. Then the time delay is changed from 0.15 to 0.25.
  7. And this repeats to for Circle 4. The time delay changed to 0.35. When the animation is played back all four circles move up. One right after the other.