Tuesday, July 06, 2010

Tutorial: After Effects: Deeper Modes of Expression, Part 7: Making Decisions

Deeper Modes of Expression, Part 7: Making Decisions by Chris Meyer

Learning how to craft if/then/else statements plus do/while loops will open the door to a wide range of advanced techniques.

provideo coalition

As your expressions become more complex, you will want to start making decisions in the middle of them – for example, if the current value is less than a certain number, do one thing; if it is greater than that number, do something different. Other decisions include "wait until the current time is past the next marker – then do this animation" or even "don't freak out and give me an error message if you can’t find the marker, keyframe, or other layer you’re looking for."

These sorts of decisions are often referred to as conditional statements, and expressions in After Effects supports them. The most common type of conditional is know it as an if/then or if/then/else statement. If you are not familiar with JavaScript, their format may be a bit different from what you expect, but they are easy to learn.

A variation on this theme is a do/while loop, which is an essential tool for overcoming expressions' inability to remember what happened beforehand: You can use these loops to walk through every frame of the animation – accumulating information – until you get to the current frame.

Read The Full Tutorial at ProVideo Coalition

Learn More/Purchase Creating Motion Graphics with After Effects 5 ed. by Chris and Trish Meyer

View all Tutorials in this Series

No comments: