Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions time remap existing keyframes

  • time remap existing keyframes

    Posted by Shahed Naderi on May 18, 2015 at 12:32 pm

    hello , I really appreciate if anyone can help with this

    I copied a mask path to position property of a layer , in default it makes a 2 second motion path , but I want to extend it for example for 6 seconds, with another slider , and maybe give it a smooth interpolation.

    Kristian Boruff replied 11 years, 3 months ago 3 Members · 6 Replies
  • 6 Replies
  • Dan Ebberts

    May 18, 2015 at 7:25 pm

    I’d start with something like this:

    newDuration = effect(“Slider Control”)(“Slider”);
    t = linear(time,0,newDuration,0,key(numKeys).time);
    valueAtTime(t);

    Dan

  • Kristian Boruff

    May 19, 2015 at 12:57 am

    Hi there,

    Mikey Borup made a video somewhat connected to this. https://www.youtube.com/watch?v=LufL6vbtUso

    Basically he used this expression and a slider control to control which keyframe is displayed.
    key(clamp(effect(“Slider Control”)(“Slider”),1,num­Keys))

    This causes an instant change however, so as soon as the keyframe for slider in position 2 hits, then it pops to keyframe 2. My idea was to us this to switch between different key framed shapes via linear or some other interpolation. Like different states of a mouth. So keyframe 1 would be neutral, keyframe 2 would be smiling, and keyframe 3 would be frowning. So in a perfect world I could use expressions based off marker names to morph from a smile to a frown or from a frown to neutral.

    I tried this expression in the Mask path linear(time,0,5, key(1),key(3)) thinking it would go from a neutral face to a frown in 5 seconds. Instead it gave me “Object of Type Object found where a Number, Array, or Property is needed”
    Is my idea possible?

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

  • Dan Ebberts

    May 19, 2015 at 1:22 am

    With mask paths, really all you have to work with is valueAtTime(). You can’t do any math or interpolation on the values. Using valueAtTime(), you can’t interpolate between two states that don’t have adjacent keyframes without going through the intermediate keyframes, so you can’t morph from shape 1 to shape 3 without going through shape 2.

    Hope that makes sense.

    Dan

  • Shahed Naderi

    May 19, 2015 at 1:39 am

    Thanks dan , it solved the problem ,now i can extend duration of motion, but how it would be if you want to control it with slider that shows percentage of the path , that way you can manipulate the speed of motion

  • Dan Ebberts

    May 19, 2015 at 6:23 am

    Like this maybe:

    pct = effect(“Slider Control”)(“Slider”);
    t = key(numKeys).time*pct/100;
    valueAtTime(t);

    Dan

  • Kristian Boruff

    May 19, 2015 at 6:39 am

    Thanks, that’s too bad. I was hoping I was on the verge of a slick way to simplify complicated face rigs in Reflex Warp. I guess I’ll put it on my wishlist for being able to referencing path points and font styles.

    Thanks for the help as always! Your work has been very helpful in my learning process.

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