Expression example: Rotate the hands of a clock

You can use the pick whip to link rotation values between layers to animate the hands on a clock—as the hour hand moves from hour to hour, the minute hand rotates the full circumference of the clock face. This type of animation would take a long time to create if you had to set each keyframe for both hand layers, but with the pick whip, you can do it in a matter of minutes.

  1. Import or create two long, narrow solid-color layers: an hour hand and a minute hand. (See Create or modify a solid-color layer or footage item.)
  2. Set the anchor points at the ends of the layers. (See Layer anchor points.)
  3. Move the layers so that the anchor points are at the center of the composition. (See Move layers in space.)
  4. Set Rotation keyframes for the hour hand. (See Set or add keyframes.)
  5. Select the Rotation property for the minute hand and choose Animation > Add Expression.
  6. Drag the pick whip to the Rotation property for the hour hand. The following expression appears:
      thisComp.layer("hour hand").rotation
  7. To make the minute hand rotate 12 times as fast as the hour hand, add *12 at the end of the expression as follows:
      thisComp.layer("hour hand").rotation*12

Guy Chen provides a simple project on the After Effects Exchange on the Adobe website that takes this idea further, connecting the rotation of the minute hand and hour hand of a clock to the rotation of the second hand.

Harry Frank provides a clock project on his graymachine website, in which the movements of the hands are connected to an Expression Controls (Angle Control) effect on a null layer that controls the time. (See Expression Controls effects.)