Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expression Help

  • Expression Help

    Posted by Mikke1556 on July 31, 2007 at 6:09 pm

    Hey, i’d like to add an expression to make a video shake. The effect i want is that i have a video floating around then an image or another video comes and stamps the video thats floating and when it does, the video shakes a little. Any ideas?

    Mikke1556 replied 18 years, 9 months ago 3 Members · 9 Replies
  • 9 Replies
  • David Bogie

    July 31, 2007 at 6:15 pm

    You don’t need an expression to accomplish that effect although a script might help you with the ballistics and recoil physics.

    bogiesan

    This is my standard sigfile so do not take it personally: “For crying out loud, read the freakin’ manual.”

  • Mike Clasby

    July 31, 2007 at 7:02 pm

    For the Floating, put a wiggle expression on Position (Copy the expression, Alt-Click the Position Stopwatch, then Paste):

    wiggle(1,30)

    Adjust the 1 (frequency)or 30 (amplitude) to taste.

    This might help with the shake part.

    Marker Triggers Squish and Stretch_Jell-O

    Place this expression on Scale (Copy the expression, Alt-Click the Scale Stopwatch, then Paste) will make the layer Jell-O wherever it finds a marker. You can add markers to a layer by hitting the * (asterisk) key on the numeric pad.

    n = 0;
    if (marker.numKeys > 0){
    n = marker.nearestKey(time).index;
    if (marker.key(n).time > time){
    n–;
    }
    }

    if (n == 0){
    value;
    }else{
    maxDev = 10; // max deviation in pixels
    spd = 20; //speed of oscillation
    decay = 2.0; //how fast it slows down

    t = time – marker.key(n).time ;
    x = scale[0] + maxDev*Math.sin(spd*t)/Math.exp(decay*t);
    y = scale[0]*scale[1]/x;
    [x,y]

    }

    Adjust the MaxDev, spd and decay to taste, for decay smaller numbers are slower decay.
    This is a hack from a couple of Dan Ebbert’s expressions and a little noodling of my own.

    Actually you should be able to tie this in with collision detection in AE CS3, but I’m back with AE6.5 so I can’t test it. Here’s a source for collision detection:

    https://www.motionscript.com/design-guide/collision.html

  • Mike Clasby

    July 31, 2007 at 7:04 pm

    Probably self-explanatory, but you place the marker where the layer gets “stamped”.

  • David Bogie

    July 31, 2007 at 8:05 pm

    Wow, yikes, that’s service with a smile. Nice work, hope I can try it myself.

    Now I know where to come with all of my “Can someone write a custom expression for me?” inquiries.

    bogiesan

  • David Bogie

    July 31, 2007 at 9:42 pm

    Also try:

    aenhancers.com

    Fabulous stuff. Some deliciously deep. Some truly easy.

    bogiesan

    This is my standard sigfile so do not take it personally: “For crying out loud, read the freakin’ manual.”

  • Mike Clasby

    August 1, 2007 at 6:24 am

    I don’t write them, I just cobble together ones I find, mostly Dan’s.

  • Mikke1556

    August 2, 2007 at 5:58 am

    wow…thanks for the help guys, ill try all that out and hopefully it’ll solve my problem 😀

  • Mikke1556

    August 2, 2007 at 6:19 am

    Marker Triggers Squish and Stretch_Jell-O

    that expression doesnt work….the error message says there should be a ;

    any ideas?

  • Mikke1556

    August 2, 2007 at 6:25 am

    lol what i mean is where should i put the ;

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy