Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression Question Dan Ebberts?

  • Expression Question Dan Ebberts?

    Posted by Brian Mills on September 1, 2006 at 7:52 pm

    Hey all,
    I attended an AE seminar with Dan presenting and he gave a GEM of a secrete with expressions and i cant remember it and Ive lost my notes…so dan or anyone who may know this…PLEAAASEEE HEEEELLLPP!!!
    What im trying to do is after you make the expression for the property you add this extra bit and it lets u retain control of the property as well as the expression controling it still…. hope this makes sicne
    I beleive the added peice is “value something” I believe the word value is in there somewhere…
    anyway…thanks for any help

    Brian Mills replied 19 years, 8 months ago 4 Members · 6 Replies
  • 6 Replies
  • Sam Moulton

    September 1, 2006 at 8:09 pm

    value +

    as in [value + [0], 300]

    this would let you animate the X position using keyframes while holding the Y position to 300 pixels….

  • Dan Ebberts

    September 1, 2006 at 8:24 pm

    Yes, value is the key. As an example, this expression will cause a layer to orbit its keyframed position:

    r = 50; //radius (in pixels)
    f = 1; //orbits per second

    angle = time*Math.PI*2*f;
    value + [Math.sin(angle)*r, -Math.cos(angle)*r]

    The important point is that whatever you add to value needs to be a 2-dimensional quantity. Normally it will be in the form

    value + [a,b]

    where ‘a’ will get added to the layer’s x position and ‘b’ will get added to the layer’s y position.

    Hope that helps.

    Dan

  • Mike Clasby

    September 2, 2006 at 12:03 am

    That’s a great expression for making a screw or spiral movement, but it get a little weird for my when I set keyframes from 1 to 0 (I added a slider for “orbits per sec”). The circular motion changes from Clockwise to Counterclockwise when the “orbits per sec” is decreasing, going from keyframes 1 to 0.

    A slider for the “radius” does what you’d expect. I can get my spiral by decreasing the Radius to 0, but I can’t get it to slow to zero (by keyframing the “orbits” from 1 to 0). No biggie, I was just wondering what was going on.

  • Dan Ebberts

    September 2, 2006 at 4:09 am

    You run into that sometimes when you mess with the time component of an expression. What happens is, that at each frame the expression calculates its result as if the frequency had been at the current value since time zero. It doesn’t remember that it was at some other value on previous frames. So there’s this discontinuity. It takes more work to get it to act like you’d expect. For example, you could go frame-by-frame and calculate the accumulated angle at the current frame.

    Dan

  • Mike Clasby

    September 2, 2006 at 5:36 am

    It’s still a great expression, it just needs a little adult supervision (like me). Thanks.

  • Brian Mills

    September 5, 2006 at 8:17 pm

    thanks all…knew it was value somthing!!!

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