Adobe After Effects CS3 Manual de usuario Pagina 587

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 677
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 586
AFTER EFFECTS CS3
User Guide
582
For example, if you have a parameter named “background color”, then you can use the following expression to access
its value at the nearest marker:
thisComp.marker.nearestKey(time).parameters["background color"]
Expression examples
Many of the examples in this section are based on expressions provided by Dan Ebberts. Dan Ebberts also has an
excellent collection of example expressions and tutorials for learning how to work with expressions on his website:
www.adobe.com/go/learn_ae_motionscripthome.
ColinBraileyprovidesatutorialandexampleprojectthatshowhowtouseexpressionstomakeonelayerrepelothers
in a natural-seeming manner: www.adobe.com/go/learn_ae_colinrepelexpression.
TheAEEnhancersforumprovideslotsofexamplesandusefulinformationaboutexpressions,aswellasscriptsand
animation presets. In this post, Paul Tuersley provides a tutorial and example project that show how to use expres-
sions to animate several layers in a swarm: www.adobe.com/go/learn_ae_paulswarmexpression.
Rick Gerard provides an example that demonstrates rolling a square object along a floor so that the sides stayed in
contact with the floor plane: www.adobe.com/go/learn_ae_ricksquarewheels.
Example: Make a layer revolve in a circle
You can create an expression without using properties from other layers. For example, you can make a layer revolve
in a perfect circle.
1 Select a layer, press P to reveal its Position property in the Timeline panel, and Alt-click (Windows) or Option-
click (Mac OS) the stopwatch to the left of the property name.
2 Enter the following in the expression field:
[(thisComp.width/2), (thisComp.height/2)] + [Math.sin(time)*50, -Math.cos(time)*50]
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” on page 136.)
2 Set the anchor points at the ends of the layers. (See “Work with layer anchor points” on page 154.)
3 Move the layers so that the anchor points are at the center of the composition. (See “Move layers in space” on
page 139.)
4 Set Rotation keyframes for the hour hand. (See “Set keyframes” on page 187.)
5 Select the Rotation property for the minute hand and choose Animation > Add Expression.
6 Drag the pick whip to the hour hands Rotation property. The following expression appears:
thisComp.layer("hour hand").rotation
7 Tomaketheminutehandrotate12timesasfastasthehourhand,add*12 at the end of the expression as follows:
Vista de pagina 586
1 2 ... 582 583 584 585 586 587 588 589 590 591 592 ... 676 677

Comentarios a estos manuales

Avenue 17 24 Apr 2024 | 16:19:09

What talented message