Monthly Archive: April 2012

After Effects Expression Tips

Here are some of the latest tricks I have been playing around with, especially useful with Particular.

Tip: Add a ‘layer for motion’ selector for your particular emitter and make your keyframing easier.

Add an Effects>Expression Controls>Layer Control to the layer and name it ‘layerForMotion’

Add these expressions to the particular emmitter properties:

In Position XY:

try {
 m= effect("layerForMotion")("Layer").transform.position;
 effect("Particular")("Position XY");

In Position Z:

try {
 m= effect("layerForMotion")("Layer").transform.position;
 effect("Particular")("Position Z");

Now just select the layer that you want to control the emmitter. Be sure to convert that layer to 3D before selecting.

Tip:Adjust the amount of particles emitted based on the velocity (speed) of the emitter.

[UPDATE – also, have it stop emitting when it stops.  No need to keyframe ‘0’ ]
This is helpful when you get thin or clumpy areas of particles when you are moving your emitter at various speeds.
Add the following expression to the Particular ‘particles/sec’ property:

//specify the where the motion for the emitter is coming from
 //get the magnitude of the position change (ie speed) and combine with attribute value you set or keyframed
 //omit this if you don't what it to stop emitting when it stops moving
 if (m==0){
 0; //stop emitting if no change in position

Now you will get a nice even stream no matter how you zip the emitter around, and it will stop emitting when standing still so no more clusters!