Activity › Forums › Adobe After Effects › Moving mouth animation using “convert audio to keyframes”
-
Moving mouth animation using “convert audio to keyframes”
Posted by Dan Mcguire on November 16, 2005 at 2:48 pmI have a character’s face in profile with his jaw on a separate layer. The jaw layer pivots on the anchor point, moving downward when he speaks. I converted the audio to key frames, copied the audio amplitude perameters, and pasted that into the jaw layer’s “Value :Rotation.”
It works, with one small problem: the jaw goes UP instead of down. Is there a way to invert the audio amplitude before I paste it?
Also, the range of the amplitude is pretty wide, with spikes that make the jaw move a greater range than necessary. Is there a way to compress the values within certain perameters?
THANKS
DMCGTim Kurkoski replied 20 years, 8 months ago 2 Members · 8 Replies -
8 Replies
-
Tim Kurkoski
November 16, 2005 at 6:10 pmBoth of these issues can be solved with expressions.
Out of curiosity, I reproduced your setup by making a little Pac-Man character. Instead of copying and pasting the keyframes, I linked the jaw’s rotation property to the audio keyframes with an expression. You can then alter the expression with “*-1”, which will invert the value and fix the up vs. down problem. (Another example: In my first attempt at reproducing this, I had the layer rotated 180 degrees, which caused the jaw to become unhinged when the expression was applied. Using “+180” on the expression fixed it.)
As for the amplitude problem, one solution would be to normalize the audio first (using Audition or another application). That will cut down on the big spikes.
To do it with expressions, though, use the “clamp” argument. It works like this:
clamp (value, limit 1, limit 2)In my comp, the finished expression looks like this:
clamp(thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”), 0, 10)The value is the value of the slider in the Audio Amplitude layer, the minimum value is 0 (closed mouth) and the maximum value is 10 degrees. Note that I don’t have any modifiers on here like the “*-1” I suggested for you above.
If you’re really interested in getting into expressions, check out Dan Ebberts’ site, motionscript.com. Dan also posts on the AE forum on CreativeCow.
-
Dan Mcguire
November 16, 2005 at 7:11 pmAny chance you could send me that .aep file and the supporting files?
thanks
DAN -
Dan Mcguire
November 16, 2005 at 7:43 pmI got the expression working, but the mouth goes up instead of down, and for some reason the range of motion of the jaw is actually LESS than it should be – it should rotate about 35 degrees. Can’t figure out how to invert the jaw action – is it as simple as minus in the expression?
Still learning this. the site you suggested is helping.
DAN
-
Dan Mcguire
November 16, 2005 at 8:04 pmYep, still trying to figure this out. you wrote:
“You can then alter the expression with “*-1″, which will invert the value and fix the up vs. down problem”
The expression you used “clamp(thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”), 0, 10)” worked, but the mouth went up instead of down.
Where in this expression do I use the “*-1” ?
My mouth should rotate, at the most, 35 degrees downward.
Sorry. I am trying to RTFM.
DMCG -
Tim Kurkoski
November 16, 2005 at 9:05 pmTry using this:
(clamp(thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”), 0, 10))*-1
I suppose just putting the minus sign at the front might also work:
-(clamp(thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”), 0, 10))
Just tested that. Yes, that will have the same effect, and is probably simpler. Sometimes my brain does things the hard way first.
Will e-mail my project file to you.
Reply to this Discussion! Login or Sign Up