(Page 1 of 4 pages for this article  1 2 3 >  Last »)

Sunday, June 06, 2010

Filed under: Motion GraphicsPost ProductionVisual Effects

Deeper Modes of Expression, Part 6: Managing Time, Layer Numbers, Speed, and Velocity

Chris Meyer | 06/06

Ways of manipulating time with expressions, including having one layer echo the movements of another with delay.

By default, expressions assume you are interested in values at the current time. If you need to know the current time, just use the keyword time in an expression, and After Effects will return the current time in seconds (not frames, as we discussed in the previous section).

However, expressions allow you to access values at different points in time. They also let you find out what time keyframes and markers are located at so you can have animations change as they approach or cross one of these keys, as well as reference what other layers are doing. In this installment, we’ll explore a couple of ways to exploit time.

Time Echoes

A common animation trick is to have a series of layers performing the same animation, but offset from each other in time. This is easy to accomplish by adding the valueAtTime(t) expression method to the end of an expression that grabs another layer’s values. This method resides in the Property submenu of the expression language menu.

The example below contains a pair of wheels rotating. The wheel on the right (red) is slightly behind the wheel on the left (blue).

An alternate way to visualize this is to look at the resulting values curves in the Graph Editor. The identical but offset curves show how one value is following the other, slightly delayed in time:

To make this happen, the red wheel has the following expression applied to its Rotation:

thisComp.layer(“wheel 1”).rotation.valueAtTime(time - 0.1)

This says take wheel 1’s Rotation, but take its value at a time equal to the current time, minus 0.1 seconds. In other words, follow wheel 1’s animation, but delayed by 0.1 seconds.

It was very easy to create this expression: We just dragged the pick whip from wheel 2’s Rotation to wheel 1’s Rotation (which normally makes them exactly the same), then added .valueAtTime(time - 0.1) to the end.

If we wanted, we could replace the 0.1 with an Expression Control, allowing us to edit the time offset without having to edit the expression’s text. After you’ve set this up, remember that you can hold the Command (Control) key while you’re scrubbing the Slider Control’s value to go in smaller increments. We could also set a positive value for wheel 2’s animation to be ahead of, rather than behind, wheel 1.

The valueAtTime trick works for any property. For example, say you had a few words of text that needed to fade on and off, staggered from each other. Once you decide the timing for one word, you want the others to have the same timing, just delayed. You could copy and paste keyframes and slide either the keyframes or text layers later in the Timeline, or use an expression to automate the process (handy if you’re going to be changing the master’s timing later). We’ve done this in the example below:

To make this happen, the second word has the following expression attached to its Opacity property:

thisComp.layer(“word 1”).opacity.valueAtTime(time - 0.5)

This adds a half-second delay to the way word 2’s Opacity follows word 1’s Opacity. To make the remaining words stagger behind the previous word by the same amount, we had to edit the expression for word 3 to be delayed by 1.0 seconds, and for word 4 to be delayed by 1.5 seconds. The resulting keyframes and expressions look like this:

To have a series of layers follow the same animation as a master layer, but staggered in time (A–C), you can add .valueAtTime(t) to the end of their expression value, then decide how much to stagger time by – for example, (time – 0.5) says to trail 0.5 seconds behind the current time.

next page: creating expressions based on the layer number

 

(Page 1 of 4 pages for this article  1 2 3 >  Last »)

               



You must be registered to comment. This is an effort to reduce spam. Please REGISTER HERE.

Name:

Email:

Location:

URL:

Smileys

Remember my personal information

Notify me of follow-up comments?

Submit the word you see below:




After Effects Apprentice Free Video: Exploring Shape Effects
After Effects Apprentice Free Video: Drawing Parametric Shapes
After Effects Apprentice Free Video: The Puppet Starch Tool
After Effects Apprentice Free Video: Eraser Tool Modes
After Effects Apprentice Free Video: Tracking with mochaAE
After Effects Apprentice Free Video: Performing a Motion Track
After Effects Apprentice Free Video: Creating 3D Objects using Adobe Repoussé
After Effects Apprentice Free Video: Understanding Axis Modes
Using After Effects as an Advanced Titler for Premiere Pro
After Effects Apprentice Free Video: Creating an Orbit Camera Rig
CMG Hidden Gems: Chapter 45 – What’s Your Preference?
CMG Hidden Gems: Chapter 44 – Prerendering and Proxies
CMG Hidden Gems: Chapter 43 – Advanced Rendering
CMG Hidden Gems: Chapter 42 – Render Queue
CMG Hidden Gems: Chapter 41 – Video Issues
CMG Hidden Gems: Chapter 40B – 3D Channel Effects
CMG Hidden Gems: Chapter 40 – Integrating with 3D Applications
CMG Hidden Gems: Chapter 39 – Integration 101
After Effects Apprentice Free Video: Multiple Playback Speeds
CMG Hidden Gems: Chapter 38 – Import and Interpret
CMG Hidden Gems: Chapter 37B and 37C – Expressions and Scripting Bonus Chapters
CMG Hidden Gems: Chapter 37 – Expressions
CMG Hidden Gems: Chapter 36B – Audio Effects
CMG Hidden Gems: Chapter 36 – Working With Audio
Upgrading to After Effects CS5.5?
CMG Hidden Gems: Chapter 35 – The Puppet Tools
After Effects Apprentice Free Video: The Wiggle Expression
CMG Hidden Gems: Chapter 34 – Roto Brush
CMG Hidden Gems: Chapter 33 – Paint and Clone
After Effects Apprentice Free Video: What Could Go Wrong?







After Effects Apprentice Free Video: Exploring Shape Effects

Chris and Trish Meyer | 01/31

An overview of five of the simpler shape operators that can turn your basic outline into something quite twisted.

As we mentioned awhile back, we’ve been busy the past year and a half creating an extensive, multi-course video training…

Expression Shorts - Random Words Cycle

David Torno | 01/28

Create a text layer that randomly cycles through words.

image

Learn how to make a text layer randomly cycle through an array of words that…

Adobe teases Prelude at the San Francisco Supermeet, FCPUG changes its name

Scott Simmons | 01/28

The Adobe sneak looks intriguing. Makes me excited for CS6.

From the looks of Twitter last night there were a couple of surprises at the Friday evening’s San Francisco Supermeet. First bit of news I saw was that Final Cut Pro User Group (FCPUG) has decided to drop the Final Cut Pro designation from their name to become the Creative Pro User Group. Second was a sneak peek from Adobe about a new application called Prelude.

After Effects Apprentice Free Video: Drawing Parametric Shapes

Chris and Trish Meyer | 01/27

The same tools you’ve used to create masks can also be used to create Shape Layers - with far more options than you might have imagined.

As we mentioned awhile back, we’ve been busy the past year and a half creating an extensive, multi-course video training…

To be considered for listing, contact pr (at) provideocoalition (dot) com


Copyright © 2011, HD Expo, LLC a division of Diversified Business Communications. DBA Createasphere

All rights reserved. HD EXPO, High Def EXPO, Createasphere, E-Tech, Entertainment Technology Exposition, 3D Production Workshop, VariCamp, P2 Camp, ColorCamp 101, and Lighting, Filters & Gels for HD are all trademarks of HD Expo, LLC.

Terms of Use  |  Privacy Policy

Check PageRank