Shapekey Driver x/y explanation?

is anyone able to explain, or point me to a clear explanation of how to use these x y fields?

I’m doing corrective shapekeying. These numbers make the (rotational difference) driver work fine, but the numbers on the joint I did before this were totally different, but worked for that driver.

It seemed on the other driver I did that the x field was sort of the arc limit in which the driver goes from 0 to 1 influence, in radians/or, the distance it takes to get to 1.0 influence. But it seemed to measure that arc from the global z axis, so I thought that the y field was used to sort of put in an offset to make the influence 0 in the default pose, so the influence in default pose was something like 0.05 at first so I set the y field to -0.05 and it fixed that

But that method only worked once, now on other shapekeys i am having to use total guess work.

Actually these values are not an x value and a y value, this is a function that you could write :

y = a + bx

In this function “a” is the first field and “b” is the second field.
“y” is the result of this function and “x” is the value that you enter in this function through the “drivers” panel (it can be a custom property, a transform chanel …etc)

Here’s a simple example to understand the applications of this function :

  • We have two objects : A and B

  • When we move A along the X axis we want B to move along the Y axis.

  • select B and add a driver for the translation along the Y axis.

  • go to the graph editor to be able to configure the new driver

  • select the new driver and change “scripted expression” to “averaged value” select “transform chanel” pick A in the “Ob/bone” field and chose “x location”

  • when we move A along the X axis, B moves along the Y axis.

  • Now if we write the function of the modifier chanel for our case with the default values this must look like :

y = 0.000 + 1.000x
this is the same thing than y = x so this means the function won’t modify anything
e.g. when we move A 5m along the X axis, B will move 5m along the Y axis.

Now if we change the value in the second field to 0.5 the function will look like :

y = 0.000 + 0.500x

(y = 0.5x)
this means that the value that we get from the transform chanel (x) will be divided by 2 in order to get the final result (y)
e.g. when we move A 5m along the X axis, B will move 2.5m along the Y axis.

Now from this value for the second field if we change the value in the first field to 3 the function will look like :

y = 3.000 + 0.500x

(y = 3 + 0.5x)
this means that the value that we get from the transform chanel (x) will be divided by 2 AND we will add 3 in order to get the final result (y)
e.g. when we move A 5m along the X axis, B will move 2.5m along the Y axis but B will start its movement 3m farther along the Y axis.

I don’t know if this example is clear but I hope this can help. Understanding that these two fields are used in a function is the most important thing.

Can’t thank you enough! After following your A B example I went right back into my character rig and nailed it straight away

Thanks =)

That’s about the most coherent post I have ever read about drivers… nicely done!

I’m glad to see this explaination has helped you, when I wrote it I realized translating some math things to another language was not so easy. (and it was 1:30 AM in my time zone when I posted it :))

Usually I use drivers to control things with custom properties (shapekeys, constraints influence …etc) ; in most cases the modifier function isn’t really necessary but there’s a concrete case for which it can be usefull :

I want to control a constraint influence through a custom property with a slider from 0.000 to 1.000 but I want the default value of the constraint influence to be 1.000.
What I need to do is to create a controled by custom property driver and to enter in the modifier function : 1 in the first field and -1 in the second field.
This means when I move the property from 0.000 to 1.000, the constraint influence will move from 1.000 (full efficient) to 0.000 (not efficient at all)

Extremely useful, thanks a lot for those explanations

I have the idea of it, but what about in this example where I’m trying to set a corrective driver for the leg/thigh rotating forwards:

DRIVERTES0T.blend (384 KB)

I rotated the upper leg forwards to where I want the influence to be 1.000 and adjusted the 2nd field until it was roughly hitting 1.000 when the bone reached that rotation. What I would then do (as it worked for the knee shapekey driver), would be to alt+r to reset the pose, see what the influence of the driver is at that default pose, then put that value into the first field as a negative.

So in this case I’d have the function
y = -0.403 + 0.350x

So in the rest pose, the influence is now 0.000, however when the leg is rotated forward to influence is lessened… I try to solve that by increasing the first field so that the influence changes faster, but once that’s done, the rest pose’s influence is no longer at 0.000

How do I find the balance so that the rest pose influence is 0.000 and the forward rotation is 1.000?

I’ve never used the relational difference option but on my computer it seems to work with these values :
-0.5 for the first field and 0.5 for the second field.
I haven’t spend much time on it so it could deserve some tweaking.