1
$\begingroup$

I want to use shape keys only (no weight painting) for the eyelid rig.

How do I make a driver work for two shape keys one at a time?

I've struggled with what values or expressions to input when making the driver. I want to be able to move the eyelid bone done the local y axis and when its halfway down the A key is at 1 and the B key is at 0, when it's all the way moved down they're both at 1. I've only been able to make the values both move at the same time but that's not what I want.

I don't want B to start until A ends but I'm not sure what to fix with my driver here. Here's a blendfile with the eyelid and armature

https://drive.google.com/file/d/16PFTEsv0fAWCMAbsczWP3LJOkqFRr8qw/view

enter image description here enter image description here

$\endgroup$

1 Answer 1

1
$\begingroup$

I want to be able to move the eyelid bone done the local y axis and when its halfway down the A key is at 1 and the B key is at 0. And when it's all the way moved down they're both at 1

For the first shapekey, use an expression of var as you have; for the second expression, use an expression of var - 1.

Notice the range min and max fields on the shapekeys. These clamp the outputs. That's what makes it safe to just use var and var - 1: when var is 0, the second shapekey evaluates to -1, but it gets clamped to zero. When var is 2, the first shapekey evaluates to 2, but it gets clamped to 1.

If we weren't working with shapekeys that have this built-in clamping, we'd have to clamp the values ourselves in the driver expression, using a statement like (max(min(var, 1), 0) to first get the lowest value of var or 1, and then get the highest value of that or 0.

$\endgroup$
4
  • $\begingroup$ You can also right-click the driver > Open in driver editor, and edit the curve to get what you want. $\endgroup$
    – Lauloque
    Commented Oct 3, 2023 at 19:27
  • $\begingroup$ I tried your recommendation to put var - 1 as the expression for Shape Key B and it didn't work as intended, Shape Key B has a value when Shape Key A doesn't, I tried it the other way around and put var - 1 for Shape Key A's expression but it only closes halfway, neither way is working for me. Here's my example drive.google.com/file/d/1xF8yP3SrEmVFMZ_pLTbf2li8TOEn8GNE/… $\endgroup$ Commented Oct 4, 2023 at 12:26
  • $\begingroup$ In the second .blend the equations you need are 2*var and 2*var+0.065. @L0Lock 's solution of generally correct, but your case is somewhat special. You have to modify the proposal to take into account that the control bone movement range is 0 to -0.065 and that the driver's Fcureve is y=-0.065x. $\endgroup$
    – tetii
    Commented Oct 14, 2023 at 5:17
  • $\begingroup$ @tetii thank you that solved my problem exactly! $\endgroup$ Commented Dec 5, 2023 at 11:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .