motion graphics eXchange
top

Expressions triggered by a marker

No thumbnail available
Here is an expression for having a marker trigger a squish and squash. Put the expression on Scale.
After Effects 7
Useful things
Expressions

Views: 1542
Permalink
visit |  share this  error? 
(Copy the expression, Alt-Click the Scale stopwatch, Paste):
n = 0;
if (marker.numKeys > 0){
  n = marker.nearestKey(time).index;
  if (marker.key(n).time > time){
    n--;
  }
}

if (n == 0){
  value;
} else {
  max_dev=20; // max deviation in pixels
  spd=35; //speed of oscillation
  decay=10; //how fast it slows down
  t = time - marker.key(n).time;
  s = max_dev*Math.sin(spd*(t))/Math.exp(decay*t);
  value + [s,s];
}
So wherever you place a marker you'll get the old squish and squash. Hit the asterisk (*) key on the numeric pad to drop a marker wherever you are on the timeline.
Note: No marker, no squish and squash. Five markers give five squish and squashes.
Also if you're talking a diferent expression, just drop that in below the }else{.
by Mike Clasby (yikesmikes)


(Min. Version: After Effects 7, Category: Useful things, Type: Expressions)
posted by MicGyver on Feb 15, 2009

 

Related topics:

Lightwrap in After Effects

Thumbnail for: Lightwrap in After Effects
This brief tutorial covers the compositing technique of light wrapping.
After Effects CS4
Keying
Video-/Tutorials

Views: 453
Permalink
posted by jamie on Jan 13, 2012

Lightwrap Preset

Thumbnail for: Lightwrap Preset
This is a preset that you can use on green screen footage or just general compositing.
After Effects CS5
Keying
Presets (ffx)

Views: 340
Permalink
posted by jamie on Jan 13, 2012

3D Cube Creator

Thumbnail for: 3D Cube Creator
This script is used to create a 3d cube. You can later replace the different sides and spin the null around for easy animation.
After Effects CS3
3D
Scripts (jsx)

Views: 2412
Permalink
posted by MicGyver on Nov 11, 2011


 

 

follow us on http://twitter.com/mgxchangeget in touch on facebook

 

 

motion graphics eXchange - Get The Search Engine