(Close)
Forgot password?
Join Now! Watch Tutorials
macProVideo.com
Close

Free Premium Access

Access our entire library of Premium Hub Articles, Project Files and the first 10% of each Tutorial-Video from the Online Tutorial Library.

Create your FREE Account now!

Already a member? Login

Categories

Related Articles

  • After Effects: 13 3D Workflow Tips
  • by Clay Asbury
  • 13 is unlucky for some, but certainly not for all of you After Effects users out there! Clay Asbury, Adobe After Effects expert trainer, reveals 13 of his tastiest tips for working in 3D.
  • MPV FREE Stuff: After Effects Music Video Kit
  • by Toby Pitman
  • Free lunch, free beer, or free After Effects goodies for creating your own music videos… it's not a tough choice when you see what Toby Pitman has created for you!
  • After Effects: Audio Stems To Radio Waves
  • by Toby Pitman
  • From importing audio stems into After Effects through to converting audio to keyframes and using linear expressions, this article has it all. Toby Pitman shares his tips on how to animate audio in AE.
  • After Effects: The Roto brush Tool
  • by Richard Lainhart
  • This excellent tutorial on using Adobe After Effect's Roto brush tool is from the unpublished collection of Hub articles by Richard Lainhart, RIP. This is an essential article on compositing. Enjoy.
  • Create A Lunar Landscape in After Effects CS5.5
  • by Toby Pitman
  • Space. The final frontier? Maybe. In this After Effects step-by-step, there's no need for 'giant leaps' as Toby Pitman (moon) walks you through how to create a realistic lunar landscape.

Related Tutorial-Videos

  • Motion 5 105
  • Animating Effects
  • Got a behavior problem? Motion 5‘s got a solution. Learn how to animate using Behaviors, Keyframing and Tracking with the always animated Motion expert, Michael Wohl...
  • Motion 5 104
  • Effects, Particles and Replicators
  • Motion comes jam-packed with a huge variety of very hot motion graphic effects. This tutorial shows you how to ignite these awesome Filters, Particle Systems and Replicators to fill your frames with kinetic energy and action...
  • Photoshop CS5 404
  • Lighting & Light Effects
  • Join Film Industry Pro Mark Stope as he shows you how to light scenes and create dramatic lighting effects using Photoshop CS5.
  • After Effects CS5 303
  • More Cartoon Animation Basics
  • Learn to use Adobe After Effects' Puppet Pin tool to animate characters in the "squash-and-stretch" style seen in the classic cartoons of the 30s & 50s in More Cartoon Animation Basics by After Effects expert Richard Lainhart...
  • Final Cut Pro X 106
  • Titles, Effects and Compositing
  • Final Cut Pro X incorporates very powerful tools for creating titles, visual effects and complex composite shots. Join star trainer and video editor Michael Wohl, as he explores each of these techniques and shows you how they are created, customized and edited to perfection. So if you're wondering how create stunning effects in FCP X, this tutorial will get you going down the right path!
  • After Effects CS5 302
  • Cartoon Animation Basics
  • Learn how to animate photos and create basic characters in the style of “South Park”, “Monty Python” and “Jib Jab” in this tutorial, Cartoon Animation Basics, by After Effects expert Richard Lainhart.
  • Live 8 202
  • Live's Effects: Plugged In!
  • Join Mo Volans as he takes you on an overview of Live’s amazing bundled plug-ins! This tutorial, filled with tons of audio examples, is a treasure-trove of information on how to use and master all of Live's included effects!
  • After Effects CS5 203
  • Secrets of Particle Playground
  • Learn the little-known secrets of After Effects' Particle Playground plugin with special effects expert & Star macProVideo.com Trainer Richard Lainhart.
  • After Effects CS5 201
  • Motion Tracking and Stabilization
  • Learn the ins-and-outs of After Effects’ Motion Tracking and Stabilization techniques with special effects expert, Richard Lainhart.
  • After Effects CS5 101
  • Core After Effects CS5
  • Adobe’s After Effects CS5 is the industry-leading motion graphics software that powers animations across all media including the web, on TV and in feature films. Join visual artist/musician and macProVideo.com trainer Richard Lainhart in this detailed exploration of everything you need to know about the powerful animation tools in After Effects CS5.
  • Jan 13, 2012
Create Swinging Banner In After Effects
  • Genre: Video
  • Level: Intermediate/Advanced
  • Time to Complete: 15-30 minutes
  • 0 comments — Start Discussion

Preview these Motion Tutorial-Videos

After Effects CS5 101: Core After Effects CS5 - Play IconAfter Effects CS5 101: Core After Effects CS5 - Preview Video
Final Cut Pro X 106: Titles, Effects and Compositing - Play IconFinal Cut Pro X 106: Titles, Effects and Compositing - Preview Video
Motion 5 105: Animating Effects - Play IconMotion 5 105: Animating Effects - Preview Video

I’ve seen an effect recently in a few different places that simulates a series of connected cards swinging down and coming to a rest in a very natural way. I went about seeing if I could figure out how this was done.

After a few searches on Google I found Dan Ebbert's (the guru of expressions) Pendulum expression. This expression is perfect for this effect as it simulates the exponential decay of a swinging object.  


Step 1

First up I’ve created three Comps made out of an orange solid and a text layer, one for each word.

three comps


I’ve aligned them in my main comp so they’re joining and made them 3D. Notice the anchor point of each comp is aligned to the top of the comps. This is our swing axis. I’ve added a couple of lights, too.

swing axis


Step 2

Now I’m going to parent the layers using the pick whip. Layer 4 (Pro) is parented to Layer 3 (Mac) and Layer 5 (Video) to Layer 4.

Using the pick whip


I’ve done this so the layers stick together even when they are individually rotated on the X axis.

Layers now stick together


Step 3

So now I know that’s working I’m going to add the Pendulum expression to my top (Mac) comp. I do this by Option-clicking the stopwatch for X Rotation.

Option-clicking the stopwatch for X Rotation


Step 5

Here’s the Pendulum expression found on Dan’s site which is full of useful expression goodies.

  • veloc = 7; 
  • amplitude = 90; 
  • decay = .7; 
  • amplitude*Math.sin(veloc*time)/Math.exp(decay*time)


The expression itself is pretty simple. We have three variables:-

  • veloc (velocity) = The initial speed of the swing.
  • amplitude = The angle the initial swing will reach before it starts to decay.
  • decay = This is like resistance. The lower the value the longer the the swing will take to decay. 


And then some math that creates the effect!!

  • amplitude*Math.sin(veloc*time)/Math.exp(decay*time)


While I’m not going to break this down at any length I will show you how it can be manipulated to serve our purpose. I can tell you that the first half....

  • amplitude*Math.sin(veloc*time)

...deals with the movement or swing using a parabolic curve of a sine wave in relation to time which is then divided by....

  • Math.exp(decay*time)

...which uses an exponential curve to decrease the amplitude of the sine wave (or swing).


Step 6

The first thing we need to deal with is the Math.sin part. This determines where the curve of the swing starts. 

Determine the curve swing


Using sin (sine wave) means the swing action will start at the center (0) and move outwards to the amplitude value (90) as seen in this clip. Notice that because the expression is applied to the top Comp in the chain all the parented layers follow this Comp. When I add the final expression to the other layers they will still swing independently.


We don’t want this. We want it to start at the amplitude value and swing in. We can remedy this by changing sin to cos (cosine). 

  • amplitude*Math.cos(veloc*time)/Math.exp(decay*time)

You can see in the image below how cosine starts its curve from the amplitude value (90) and move towards the center (0).

sin-cos

sin-cos

We now have the cards at a starting angle of 90 degrees!

Cards start at 90 degrees


Step 7

Now if you apply the expression to all the Comps X Rotation you can see we are getting a swinging effect on all the Comps.


The only problem here is that the swing is uniform on all the Comps. I want to create something a bit more random and tumbling. So I now need to create a way of offsetting this expression in time. What I’d actually like to do is offset the start of the layers so they don’t all appear at once, but we have a problem.

The time aspect of the expression is running off the master Comp. This means even if I offset the layer the expression will run from Frame 0 (00:00:00:00) regardless. This means when the layer appears the expression will be midway through its cycle.

We can remedy this again by creating another variable. It’s going to look like this:

  • startT = thisLayer.startTime;

This gets the start time of my offset layer and stores it in the variable. I can the subtract this from the first time value in our expression that deals with the start of the curve, our cosine. This will look like this.

  • amplitude*Math.cos(veloc*(time-startT))/Math.exp(decay*time)

I can the subtract this from the first time value in our expression that deals with the start of the curve, our cosine.


Now if I offset the timing of my layer, that offset is subtracted and the expression on that layer thinks the layer starts at Frame 0 (00:00:00:00) or the start of its curve. 


Step 8

So here we can see the offset layer. The Pro layer is visible at this point in time but it’s at a 90-degree angle and hidden behind the Mac layer.

Pro layer is hidden


Here you can see I’ve added the finished expression....

  • veloc = 7; 
  • amplitude = 90; 
  • decay = .7;
  • startT = thisLayer.startTime;

  • amplitude*Math.cos(veloc*(time-startT))/Math.exp(decay*time)

...to all the layers and offset the bottom two layers in time. 

Final expression


The effect is now much more random in how the layers interact together when they swing. here’s the finished demo.


The beauty is that in making the expression more generic in how it deals with the start time of the offset layers it can easily be copied to however many layers you like to produce cascading effects.

You could also easily tie the variable amounts to expression sliders on a control layer to adjust the overall timing of the effect as a whole.

This goes to show that expressions can be used as a very effective tool for simple animations like this which would otherwise take quite a long time to keyframe.

Download the Project File Here.


Preview these Motion Tutorial-Videos

After Effects CS5 101: Core After Effects CS5 - Play IconAfter Effects CS5 101: Core After Effects CS5 - Preview Video
Final Cut Pro X 106: Titles, Effects and Compositing - Play IconFinal Cut Pro X 106: Titles, Effects and Compositing - Preview Video
Motion 5 105: Animating Effects - Play IconMotion 5 105: Animating Effects - Preview Video
Toby Pitman

Toby Pitman

Toby composes, records, performs and produces music in every possible style all over the world for TV shows, advertising and for recordings. Over his 18 year professional career Toby has worked with many major recording artists including George Michael, David Arnold, Yussif Islam (Cat Stevens), Giles Martin and Shirley Bassey. Toby is also a Logic Pro master, expert synthesist and sound designer. Toby's passion for music education has led him to teach for The International Guitar Foundation and the Brighton Institute of Modern Music.

Comments

You must be logged in to post a comment.
Create an Account  Login Now

What is macProVideo.com?

macProVideo.com is an online education community featuring Tutorial-Videos & Training for popular Audio & Video Applications including Adobe CS, Logic Studio, Final Cut Studio, and more.
© 2012 macProVideo.com
a division of NonLinear Educating Inc.

About

Our Plans

Tutorials

Community

Help

Legal

Link