Saturday, May 12, 2007

MEL Phoneme System

This MEL script allows the user to enter pronounciations and automatically keyframe each mouth movement to a speech sound, or phoneme, to the mouth of a rigged character in Maya. The animation rig that is being used was developed by Jason Osipa, author of Stop Staring: Facial Modeling and Animation Done Right.

The "Stop Staring" Rig

2D Vector Sliders. Model by Anthony Brown.

The "Stop Staring" Rig is made up of 2D Vector Sliders in the HUD. The sliders correspond to different parts of the face. The values in the sliders are set up like a coordinate system of 2 to 4 quadrants that go from -1 to 1 or 0 to 1 in X and Y space. I'm no animator, so I'm not sure how its attached to the character. My only job was to create a script using this rig that would make it easy for the animator to make the character's mouth move accurately with speech.


The Phoneme Script

When my script is loaded, it brings up a window where the user can type in a series of speech sounds, or phonemes, in the text field. Each phoneme must be seperated by a space. If you want the character to hold a mouth movement for a little while longer, add a space then a hyphen ' - ' after the phoneme. If you want the character to close its mouth after the series is done, add a space, then a period ' . ' . When you are done, set the time increment that you want each mouth movement to set a keyframe. (Default is 5). Once you are done, click "Process Words". The script will automatically set key frames for the Sync, Lips, and Tounge sliders of the rig for each phomene by the given increment.


Example Phoneme Series'

Here are some example phoneme series' to show how to operate the script. After these are keyframed. the animator can tweak the animation to match thier style. If you type in letters that don't match any phoneme included in the script, they will be skipped and give undesired results.

"Hello World" = e l o w - l d .
"Thank You" = th a n k u .
"What the heck are you doing?" = w a th a e k a u - e n .
"This.. is.. Sparta!" = th i s . - i s . - s p a t a .
"Royale with cheese" = r o a l w i th ch e z .

The character saying, "This.. is.. Sparta!"


and "Royale with cheese."

References

I referred to the phoneme lip sync charts in Facial Expressions: A Visual Reference for Artists by Mark Simon, a great book for 2D and 3D character animators.

Phoneme Charts