Join Angie Taylor for an in-depth discussion in this video Adding variety to lip-sync animations, part of Learning After Effects Expressions.
A potential pitfall of using an automated system like Expressions to create lip sync animation, is it can make your animations look a little bit, robotic and unnatural. In this example I've used the time remap value and linked that to some keyframes created by my audio. If I just select a layer in my comp using the Keyframe Assistant > Convert Audio to Keyframes. So those keyframes are powering the time remap value, to make the mouth move in time with the audio.
So let's have a look at that without any additional expression. Now you can see because she maintains the same facial expression throughout the whole animation, it looks a bit unnatural. And what I've done here is I've created composition markers where I want her face to change expression. And that makes it easy for me to jump to those points on the time line by hitting the number keys one, two, three, etc.
So, what I want to do is have that change. Now, the other thing that I've done is I've created a controller layer. Which is just a null layer and if I double-click the expression, facial expression, this is an expression control effect that I've renamed. It's just a slider control effect that I applied by going to Expression Controls > Slider, and then I've renamed it Facial Expression. Now, if we have a look at my animation, the original animation.
Let's just go into my mouth composition. I'll double-click that to open it. And you'll see in here, I have a regular mouth, a normal mouth, then I have a happy mouth, and then I have a sad mouth. Okay, and normal is between zero and one. Happy is between one and two. And sad is between two and three. So basically what I want to do is use the key frames for each expression by referring to those values. How do I do that? Well, here we'll have a look at the expressions.
So we go back into the main composition. Select the mouth comp, double hit the E key on the keyboard. And let's have a look at what this expression does, first of all. So first of all, I've used a variable A, and I've said, make that equal this comp layer, audio amplitude, both channels, effect slider value. So basically this is the value coming from these key frames here, which come from the levels of the audio. Then I've said, create a second variable which equals the expression control slider, which is giving me a value.
And then here is the final expression. So I've used the linear expression to take the value from A, which is the audio amplitude, convert it between, from values between zero and 27 to values between zero and one. Okay, and that's just basically giving me the opening and closing mouth shapes, so I'm using values between zero and one second. And then, I offset it just by adding the value returned by the controller, expression controller.
So, how does that work? Well, at the beginning, I haven't added anything to it. So we've just got the regular mouth shape, playing between zero and one second. If we move to the second marker, by hitting two on the keyboard, then what I can do is I can say, okay. Make this the second facial value by adding the value of one. So now she's smiling, okay? Then we can add a third one. So let's go to three and let's make her sad. Let's go to the two second mark so it's starting at two seconds and animating between two and three.
And if we preview that. >> So you'll see now I can change the expression. And if you go to the Project panel, and open 03b_LipSync Expression End, and preview that, you'll see I've added a few more keyframes to that. Now, it's important that you use held keyframes because if you don't use held keyframes, it will animate between the points. If you're not sure how to do that, you right-click on the keyframes and say Toggle Hold Keyframe, and that will create a held value so it suddenly changes from one value to another, instead of gradually.
So let's take a look at that one. >> So there you see how you can use the slider to create facial expressions. Now have a think about the eyes, you could also use controllers to change the direction that the eyes are looking, or maybe make the eyes open and close, or blink. You could use like a random or a wiggle expression to make her eyes blink. Have a think about how you can use expressions just to add a bit of realism to your lip sync or character animations in this way.
- What are expressions?
- Creating and applying expressions
- Linking expressions to layers with the pick whip
- Simplifying expressions with variables
- Creating looping animations
- Randomizing values
- Converting expressions to keyframes
- Creating keyframes from audio with expressions
- Controlling 2D effects in 3D space
- Converting color from RGB to HLS
- Formatting strings and text