Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression to Keyframe Mask Path Shape From Mask on Another Layer

  • Expression to Keyframe Mask Path Shape From Mask on Another Layer

    Posted by Jeff Paul on November 11, 2015 at 11:15 pm

    I’m trying to rig a character for lip sync using animated masks on a solid layer. Normally I have all my mouth shapes keyed, and when I want a specific mouth shape, I copy the mask keyframe and paste it where needed. But I’m trying to see if there’s a more elegant solution.

    Here’s what I’ve set up so far: I’ve got a source layer; This is a solid layer that has an animated mask with all my mouth shapes (let’s say there are 10); this layer gets hidden or set as a guide layer. Then I’ve got my animated mouth layer. This is another solid with a mask on it.

    I’ve been able to match the mask on the animation layer with the mask on the source layer by putting an expression on the Mask Path of the animation layer and pickwhipping it to the Mask Path on the source layer, so I know I can have the mask on one layer drive the mask on another layer.

    Here’s what I’m wondering: is there a way for the mask on the animation layer to find the shape of the mask on the source layer at a different frame (or keyframe)? And then set that shape as a keyframe on the Mask Path of the animation layer.

    I don’t want to do a simple time remapping because I want to be able to select any of the 10 shapes in any order and animate smoothly between those mask shapes.

    I’m thinking it might use something like “value at time”, but I’m not knowledgeable enough on expressions to go any further.

    I’ve got a few other ideas on how I can key the mouth shapes without copying and pasting, but I wanted to see if anyone had any ideas on if this method could work.

    Thanks in advance for any help.

    Jeff

    Dan Ebberts replied 10 years, 8 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    November 11, 2015 at 11:24 pm

    You can use valueAtTime() and you can get the time from a particular key (using property.key(n).time). What you won’t be able to do is animate (except a straight cut) between shapes that aren’t adjacent on the timeline. So it really leaves you with the same limitations as time remapping.

    Dan

  • Jeff Paul

    November 11, 2015 at 11:38 pm

    Darn! Oh well, guess I’ll have to try a different solution.

    I guess I should have figured it wasn’t possible to do this or someone would have already created a lip sync tool using animated mask paths.

    Thanks for the quick response!

    Jeff

  • Dan Ebberts

    November 11, 2015 at 11:59 pm

    One thing you could do (it’s kind of drastic though) would be to keyframe all the possible transitions. So if you had 10 shapes, you have shape 1 transitioning to shape 2, shape 1 to shape 3, etc., for a total library of 90 transitions. Then either method (time remapping, or valueAtTime()) should work.

    Dan

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