Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Interpolating between Shape/Mask Paths

  • Interpolating between Shape/Mask Paths

    Posted by Aaron Babcock on February 23, 2012 at 3:01 am

    Hi,

    At 1:48 in this video, https://vimeo.com/36068222, this animator has the character’s face moving horizontally by animating a mask. Looks pretty easy to do.

    What I’m wondering, is whether it’s possible to have a character animated in this style move their head both horizontally and vertically at the same time. So, that would be two expressions sliders (vertical position and horizontal position) and 6-9 base shapes (up and center, center and center, down and center, up and turned, center and turned, down and turned, and maybe a few pictures in between). But to do that, After Effects would need to be able to interpolate between multiple mask/shape paths at once.

    I doubt that AE has this feature built into it (though if it did, that’d be awesome), so I’m wondering if that can be done with expressions. For example, I know it’s possible to write an expression that will interpolate a layer’s position with the following code:

    val1 = transform.position.key(1);
    val2 = transform.position.key(2);
    val3 = transform.position.key(3);

    mX = val1[0] + (val2[0] – val1[0])*effect(“Left-Right”)(“Slider”) + (val3[0] – val1[0])*effect(“Down-Up”)(“Slider”);
    mY = val1[1] + (val2[1] – val1[1])*effect(“Left-Right”)(“Slider”) + (val3[1] – val1[1])*effect(“Down-Up”)(“Slider”);

    [mX, mY];

    But can a similar approach be taken to mix together paths? Thanks,

    –Saib

    val1 = transform.position.key(1);
    val2 = transform.position.key(2);
    val3 = transform.position.key(3);

    mX = val1[0] + (val2[0] - val1[0])*effect("Left-Right")("Slider") + (val3[0] - val1[0])*effect("Down-Up")("Slider");
    mY = val1[1] + (val2[1] - val1[1])*effect("Left-Right")("Slider") + (val3[1] - val1[1])*effect("Down-Up")("Slider");

    [mX, mY];

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

    This happens because the functionality/content marked as “Vimeo framework” 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.

    Aaron Babcock replied 14 years, 2 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    February 23, 2012 at 4:10 am

    I don’t think that’s going to work. I think the closet you could come would be to keyframe a bunch of different mask transitions and then interpolate between two keyframes using valueAtTime().

    Dan

  • Aaron Babcock

    February 24, 2012 at 1:49 pm

    I was afraid of that. Thanks for your help.

    –Saib

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