Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Slider to control time remapping

  • Slider to control time remapping

    Posted by Greg Digenti on October 30, 2009 at 12:34 am

    For the animation of a person’s face, I’ve created a series of mouths in different positions (6 to be exact) and precomped them, with a different mouth on each frame. I wanted to add a slider controller to make switching between them easier.

    So, I made a null, named it FaceControl, added a slider to that layer and named it Mouth. Then I added a Time Remap to the mouths layer and added this expression to it:

    sliderPos = thisComp.layer(“FaceControl”).effect(“Mouth”)(“Slider”);
    [(Math.round(sliderPos))]

    The problem is if I change the slider to any number bigger than zero, the mouth layer jumps to the last mouth (6).

    What am I doing wrong here?

    Greg Digenti replied 16 years, 10 months ago 2 Members · 3 Replies
  • 3 Replies
  • Greg Digenti

    October 30, 2009 at 12:50 am

    After posting this, a “Related Threads” link showed beneath it with this thread: https://forums.creativecow.net/thread/227/12251

    Based on this thread I was able to make it work. I needed to make my comp 25fps and add a *.04 operator to the last line.

    This now works:

    sliderPos = thisComp.layer(“FaceControl”).effect(“Mouth”)(“Slider”);
    [(Math.round(sliderPos)) * .04]

  • Dan Ebberts

    October 30, 2009 at 1:37 am

    It looks like your original expression was set up assuming that each mouth position had a duration of 1 second. I’m assuming you’re got it set up with a different mouth position on each frame. If so, you just need to change the original expression to this and it should work with any comp frame rate:

    sliderPos = thisComp.layer(“FaceControl”).effect(“Mouth”)(“Slider”);
    framesToTime((Math.round(sliderPos)))

    Dan

  • Greg Digenti

    October 30, 2009 at 1:46 am

    Even better! Now I don’t have to go through and change all my comps to 25fps. Thanks Dan!

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