After mucking around with different techniques, such as building a number of GUIs to represent different parts of the face, where you rotate, scale and translate different handles for different effects, I decided that I wanted to implement the Osipa GUI into my rig. All the blend shapes had been built, separate left and right poses that merge together correctly, and then it dawned on me... I have NO clue how to get this to work when you have 2 axes to deal with in a slider.
It seems as if you should be able to set a driven key that switches the expressions on and off along the Y axis, then another to turn the left and right poses on and off along the X axis. However in practice this does not work, as the blends then go into negative values if you try to drive them with both translations. And this results in some weird effects, unless you like the vertices going in the complete mirror opposite direction half the time. Which I doubt you will.
Now, the Osipa melscript is kicking about on the internet to automate these sliders. However it failed to work for me on a combo of Windows 7 and Maya 2009, so that goes out the window. Also, being the control freak I am, I would like to know exactly what is going into this script to making it work (I am the equivalent of the kid who takes apart their TV to see how the men inside get on the screen, or the folk at the supermarket who meticulously read all the ingredients in their yoghurt). And I feel that simply blindly copying a chunk of script is cheating in the world of rigging. I also picked apart Blake's rig to see how that worked. It turns out that there's a lot of expressions in there (you can usually tell from the start when a channel is purple); none of which I really understood enough to create my own expressions to control the facial GUI.
Now, there are a couple of things I do know in Maya. Two of those are point constraints and driven keys. Luckily, these can be combined in a nice intricate system to make the 2 dimensional Osipa rig. Let me illustrate my methods:
This is the simple facial GUI. But there are a number of hidden treats:
I have a load of sneaky extra sliders that independently control left and right blend shapes. These work in single directions, along the Y axis. And what are the locators for? I'll show you in a bit. All I'll say now is they are locked; they don't move at all, just sit on the 0 on the X axis.
So as the sliders move up, or down, the blend shapes turn on and off, pretty much how the Blend Shape Editor works. However, we want to control both sides with one slider. In this case, the slider is point constrained (just the Translate Y, as that's the only way it moves) to the main controller, as well as that locked locator that will keep the slider, and therefore the blend shape, at zero. However, let's set that point constraint at zero, so the two do not interfere with each other incorrectly. These point constraints will be switched over as the main slider moves along the X axis, away from the corresponding side, using our friend, the driven key.
The reason we have to have the locator at zero also point constraining the slider is because if we just set the constraint to 0, it does not slide evenly; it merely snaps on or off whether the figure is at or above 0. Not what we want to get a near-infinite range of merging blends. What happens now is the two constraints will work together to equate to 1. The blend between the two figures brings the slider down at a happy gradient, so once the main slider moves along the X axis, one side of the face will fall at a steady pace, so we can move just the left side for example, without the right being affected at all.
This leaves us with a much simpler facial GUI. In fact I have just over 30 blend shapes (not including the brows or tongue. 11 of these sliders are used to control all those blends, with a few extra sliders to rotate the jaw, tongue, and to toggle the eye shifts as the eye control moves up and down. That's cut down roughly two thirds of the sliders originally needed. Result: a cleaner, easier to use rig, while keeping as much variety in the motion as possible. In fact, you only need to translate the sliders about, meaning you do not have to switch between rotations, scales, or sliding anything in the controllers' channels.
Actually, that's a fib, there is one rotation node to twist the tongue on rare occasions, but I shall ignore that.
This brings my rig construction to an end, with the exception of some texture/render jobs, but generally the character is pretty much ready for an animated piece. Keep your eyes peeled. For a treat, here's a quick snippet of what the facial rig can achieve.
Watch this space
No comments:
Post a Comment