Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects › Lip Sync Expression

  • Lip Sync Expression

    Posted by Josh Fry on September 27, 2006 at 4:03 am

    I trying to automate a Lip Sync in AE7 Pro. I am in need of some help with expression language. Here is what I have done so far.
    Attempt 1:
    Created PSD with 2 layers (Upper Lip, and Lower Lip) Design is such that only lower lip needs to be masked away.
    Animated a mask to subtract Lower Lip over the course of a second
    PreComped
    Applied Time Remapping to precomp
    Converted wave file into Audio Amplitude keyframes
    added expression to Time Remapping
    pic-whipped the expression to the “Both Channels” slider of the Audio Amplitue layer
    Result: Lip flap works, but to fast and not frequent. Need to be able to control rate.
    Resulting expression of Attempt 1:
    thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”)

    Attempt 2:
    Created PSD with 2 layers (Upper Lip, and Lower Lip) Design is such that only lower lip needs to be masked away.
    Created mask on Upper Lip layer to subtract Lower Lip layer when it passes under
    Converted wave file into Audio Amplitude keyframes
    Added expression to position transformation on Lower Lip layer
    pic-whipped the expression to the “Both Channels” slider of the Audio Amplitue Layer
    Result: Need to be able to restrain animation to Y Axis only and control range of movement
    Resulting Expression of Attempt 2:
    temp = thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);
    [temp, temp*5+2040]
    I can’t believe I actually miss motion math.
    Thank you

    Mike Clasby replied 20 years ago 3 Members · 2 Replies
  • 2 Replies
  • Mylenium

    September 27, 2006 at 5:28 am

    Well, what can I say? Pretty much every part of your problems has been discuseed one way or the other many times on this forum and how to isolate values from each other pops up at least once a week… Why can’t people just find it in their heart to use the search function?

    Anyway, it seems to me that most of your problems come from the fact that you are using your sound file without any adjustments. You should definitely consider treating your keyframes created by the assistant e.g. with The Smoother to get rid of quantization artifacts and thus have more distinctiveness inbetween phonems. To get control over your amplitude use the keyframe methods, not simple multiplication and addition (if you were to use it, your formula is simply incorrect as it will always clip values). There is also no need to use excessive values to position your object if you figure in the original position.


    in_amp = thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);
    new_amp=linear(in_amp,0,48,0,100); //in amplitude assume 0-48 db, mapped to 0-100 px

    [position[0],position[1]+new_amp]

    Finally: No, nobody misses Motion Math. To be blunt: You jumped off and didn’t do your homework so it’s entirely your own fault.

    Mylenium

    [Pour Myl

  • Mike Clasby

    September 27, 2006 at 5:56 am

    In attempt 2, if you pickwhip that first “temp” (the x) to the x of the “upper lip” layer, you get something like this:

    [thisComp.layer(“upper lip”).position[0], temp*5+2040]

    Then you lower lip is taking it’s x (not position, just the x value of the Upper Lip layer) from the upper lip’s x. Is that what you want?

    The last “+2040” kinda confuses me, 2040 is a lot of offset.

    My test run of your attempt just has 2 layers, the original face pic, and a dup of that layer with the lower lip masked so only it shows, then the 2040 would become the y for the upperlip layer and that 2040 pixels down, big comp, or if the 2040 is selected and pickwhipped to the upper lips y the last line becomes:

    [thisComp.layer(“upper lip”).position[0], temp*5+thisComp.layer(“upper lip”).position[1]]

    Now the lower lip is taking its y from the Upper lips y and it’s x from the upper lips x, with the “*5” as a modifier, an amplification of the audio keyframes. You could pickwhip that 5 to a slider to make things a little easier to find a figure you like. Maybe we’re doing it differently. But you can pickwhip to just the x or y of another layer.

    There are a few other ways to lips sync with AE:

    Have you seen Aharon’s tut on lip sync (it swaps in a set of mouths for each sound) click Aharon’s head and scroll down.

    Also another semi-cheesy lip sync is with CC Split 2 tied to Audio keyframes, but move the lower lip more (split 1). You just pickwhip the Amount of Split 1 and 2 to the Both Channels slide as you did above, then with that same “*5” method. If the corners are set on the corners of the mouth, it’s kinda neat (in a crazy way), but you do need a throat underneath as split opens to the layer below, a simple small red radial ramp below is good. This is fast method.

    I also like Crazy Talk, get the demo, lots of expressions available, learning curve not bad. Crazy talk does the lipss off your audio or text.

    Personally I like the way you’re doing it, kindao f Monty Python, if I get the picture.

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