Help with driver setup for mouth rig

Hey all,

I have 2 actions meant for creating a driver for an “open jaw with closed mouth effect.” There will be a custom property on another bone (the “Jaw” on the image below) to switch from the open to the closed lips. Where I’m stumbling on is how should I setup the driver?

http://i.imgur.com/eiMTGet.gif

What I am currently trying out is creating a driver on the Action Range and working out scripted expression so that the switch at 0 is the open lips and 1 is the “sealed” action.

Your scripted expression might be something like var_1 * var_2 where var_1 is the movement of the bone and var_2 is the “switch” position. So how does this work, well when the switch is at 0, no movement is effected since anything multiplied by 0 is always 0 and when the switch is at 1, the full value of var_1 is achieved.

I use this a lot in mechanical animations, I often use an Empty as the switch placed at Z = 0 and then constrain it to move only in Z to Z = 1. When the switch is at Z = 0 the Driver returns 0 and when it’s at 1 it returns the value of var_1. In this case var_2 is the Empty as the target, Z Location as the Path, and it is executed in World Space.

Don’t forget to check “Autorun Python Scripts” in User Prefs => File tab or the scripted expression won’t work.

Cheers, Clock.

EDIT: you could also use a numeric value in the expression like 1 + (22 * var_2) so when var_2 is 0 it returns 1 and when var_2 is 1 it returns 23.

The second one works beautifully, Thanks! However, I discovered one small wrinkle…

http://i.imgur.com/6vZdPlo.gif

Since the driver equation scrubs through the timeline, I get unintended animations when I use the switch on the closed mouth position. I’m wondering if the there is a cleaner solution.

This is what my timeline looks like now

http://i.imgur.com/U25tf6b.gif

Instead of driving the Action Range of the Action Constraint I would add two Action Cons. One configured for the lips sealed animation and one for lips open. Then add drivers to the influence of both constraints and use the Lips_Closed property to turn the constraints on and off.

A value of 0.0 on the Lips_Close property should set the influence on the Lips_Open Action Constraint at 1.0 and the influence of Lips-Closed Action constraint to 0.0. A value of 1.0 on the property should should set The Lips_Open Action Con to 0.0 and the influence of Lips_Close to 1.0.

Good luck!

Ah, of course! facepalm simpler and more obvious :o

thanks a bunch!