Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Gravity w/ Markers

  • Gravity w/ Markers

  • matthew tully

    November 5, 2007 at 9:27 pm

    Hi All,

    I’m looking for a way to simulate gravity turning on. After a few seconds of animation, where objects float in zero-g, all the sudden gravity is introduced and the objects fall off the screen. I tried keyframing this but I can’t figure out the velocity of the objects. I would imagine that this can be accomplished by linking gravity properties to markers or map them to time. Any ideas?

  • Dan Ebberts

    November 6, 2007 at 12:12 am

    Give this a try:

    g = 1000; // gravitational constant

    if (marker.numKeys > 0 && time > marker.key(1).time){
    t = time – marker.key(1).time;
    y = g*t*t/2;
    value + [0,y]
    }else{
    value
    }

    Dan

  • matthew tully

    November 6, 2007 at 3:19 pm

    Thanks Dan! Does the trick as usual.

  • Russell Cox

    August 5, 2010 at 2:07 am

    I’m trying to accomplish a similar effect but I put this expression in my position layer and it’s not working, does it need a dummy control layer or a slider control? How do I control when the gravity effect occurs?

  • Dan Ebberts

    August 5, 2010 at 2:55 am

    Just put a layer marker wherever you want it to start falling.

    Dan

  • Russell Cox

    August 5, 2010 at 12:31 pm

    Sorry, it’s still not working. Let me review; alt click on stopwatch in static text layer, paste expression, click on keyframe marker. Preview and nothing happens. What am I missing?

  • Russell Cox

    August 5, 2010 at 1:17 pm

    Got it! First time using expressions triggered by markers, thought it was triggered by a keyframe. Thanks for your help.

Viewing 1 - 7 of 7 posts

Log in to reply.

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