Driving shape keys from bone axis

Is there a way to drive different shape keys along a bone axis, one shape key for say negative x and another shape key for positive x? I can get it to work along x axis for one shape key when the bone is moved either way, but it would be nice to have it move just in one direction. That way, I can have six shape keys driven from one bone along the respective axis which cuts down on the bones needed for a character to be linked.:evilgrin:

Tim

Yes, this is possible. I did a video tutorial on controlling 2 shapekeys from one bone and it’ll be kinda the same thing. In this video, I drive one shapekey based on the z-loc of a bone. The 2nd shapekey is driven by the x-loc of a bone in that if the bone is moved either to the left or the right, the shapekey is turned on, when the bone is in the center, the shapekey is off. To get it to work this way, I had to create a custom curve in the graph editor. That is the key. In my example, to get the shapekey to work for both the bone moving left, or right, I had to create a curve that looked like a V. To get a shapekey to work on only say only positive x rotation, the curve would look like this: _/ To get another shapekey to work on negative x rotation, it’s curve would look like this: _ The point where the curve goes from horizontal to diagonal would be at 0, center of the graph editor. The other point of your curve, you only need two points for this, gets a bit harder to figure out. As if this shit ain’t hard enough…

In the graph editor, the vertical scale (considered the y-axis) is the output of the driver, that’s what value your shapekey will be set at. So if you shapekey is fully on at 1, you want a 2nd point at 1 on the y-axis in the graph editor. To figure out where the 2nd point should be placed at along the horizontal scale (considered the x-axis), it gets even better. For rotations, the x-axis of the graph editor is in radians, so if you want the shapekey to be at 1 when the bone is rotated 90 degrees. Convert 90 degrees to radians, I use google for that shit, and now you know where the 2nd point’s position should be.

Yea, great fun there. Anyhow, if you wanted a shapekey to be at one at 90 degrees positive rotation, your curve would have 2 points in the graph editor. one at x=0, y=0. Second point would be at x=1.570, y=1, as 90 degrees is 1.5707 bla bla radians. Then for another shapekey driven by -90 degrees of rotation, it’s curve 1st point would be at x=0, y=0, it’s 2nd point would be at x= -1.570, y=1. Just a reversed curve like the first one.

Watch this video, around the 12:00 min mark I start talking about the custom curves.

Randy

Thanks Randy. Worked like a charm. Just trying to resist the temptation to use 18 shape keys on one bone now, LOL. Have really enjoyed your posts and tutorials in the past. They are just right. Not too much, not too little. Thanks for all the good work.

Tim