Error
  • XML Parsing Error at 1:66. Error 23: EntityRef: expecting ';'
Expression Presets
Expression Preset 3 : AutoSlideShow PDF Print E-mail

These two After Effects expressions are pretty simple, but they make slide show projects a breeze!! The first, "AutoZoom", makes a layer zoom (scale) based on the in and out points of the layer.The "zoom" value, is how much it zooms.  Positive or negative values will both work.

//AutoZoom - Apply to Scale

zoom = 10;
value + linear(time, inPoint, outPoint, 0, [zoom, zoom])

Next, AutoFade creates fades on head and tail of any clip.  The transition is specified in the "transition" variable, which is defined in frames.

//AutoFade - Apply to Opacity

transition = 20;       // transition time in frames
tSecs = transition / ( 1 / thisComp.frameDuration); // convert to seconds


linear(time, inPoint, inPoint + tSecs, 0, 100) - linear(time, outPoint - tSecs, outPoint, 0, 100)

Download both as FFX Presets

See a Demonstration Here (No Audio)

 
Expression Preset 4 : Include Expression samples PDF Print E-mail

These are the sample compositions and expressions from Tutorial #19.

I've included an additional example not covered in the tutorial that shows how to use a more flexible comp name, such as "sc100_JoeAverage". You'll see a simple variable that allows you to define the number of characters in the scene number. In this case, "sc100" has 5, so scLength is set to 5.

Mac Version:

#include '/Expressions/source.txt'
try{eval(thisComp.name)}catch(err){"not found"}

Windows:

#include 'file:///c:\Expressions/source.txt'
try{eval(thisComp.name)}catch(err){"not found"} 

Download both as Compositions

 
Expression Preset 2 : toComp 3D Beam PDF Print E-mail

This is largely becoming the most common expression I use. It is so simple and so powerful.  This was originally something I posted on AE Freemart, and is based on the amazingly awesome and inspirational ideas from Dan Ebberts.

Simply put, the location of any 3D layer (Null, Light, Solid, etc) can be adapted from 3D space to a 2D location.  Imagine, the location of a 3D light driving the location of Knoll Light Factory flare, or the example below, where a 3D beam is created using two 3D nulls.

Essentially, you just need to create an expression on your 2D location, and add an expression like the one below. Replace the layer name (ie.. "Null 1"), with your 3D layer.  This is so useful!!! I use it in just about every project.

>Download the AE CS3 3D Beam Project

thisComp.layer("Null 1").toComp([0,0,0])
 
Expression Preset 1 : Trigger Decay at Keyframe #2 PDF Print E-mail

Here is the expression from the "grunge tutorial":

veloc = 18;
amplitude = 60;
decay = 2;
t=time - key(2).time;

if (t<0){value}
else{
x=amplitude*Math.sin(veloc*time)/Math.exp(decay*t);
value + [x,0]
}