Simple driver setup



The idea is simply to create a driver setup for bones in Blender 2.53.

We're gonna create 3 main bones (boneA, boneB & boneC) with one control bone (bone.Control).
For this example, I want that if bone.Control is being rotated then boneB will follow the rotation.
And if bone.Control is scaled in Y axis, I want the boneC rotates on specific axis.

The setup:


blender driver setup, ferdi
01
blender driver setup, ferdi
02
blender driver setup, ferdi
03

blender driver setup, ferdi
04
Now, step 4...
Select boneC, click the bone icon in properties panel, change the rotation order from "quaternion" to "XYZ euler". Well, it's kinda personal pref, I like my rotation order is set to euler.
Add single driver into rotation X by right click on rotation X field.

Open graph editor and switch from "f-curve editor" to "drivers".
Press "n" to show properties in graph editor, scroll down and delete any modifiers (usually generator) in modifier tab.

Scroll up, change the type to "average value" in drivers tab. Tick on "show debug info". And add variable.
Give it a name, change to "Transform Channel".
Click on the cube icon there, select the armature. Click on the "bone" icon below that, and select the bone.Control.
Select Y Scale and tick local space.
If everything was setup correctly, boneC will rotate up. That's because that driver created earlier doesn't have the f-curve... yet.

blender driver setup, ferdi
05
Step 5... Lets add those nifty f-curve will ya.
In the graph editor press ctrl+left-click. Btw I changed the default left-mouse-click for selection & right-mouse-button for 3D cursor. Dunno if this have some effect on the graph editor for adding f-curve.
Anyway... after that first ctrl-left-click, the second click will not add another point for the f-curve. So we're stuck with only one point for the f-curve. Maybe it's a bug.. or maybe I messed up with my Blender setting, I don't know.

But if this is happening, simply just copy that first point, and drag right mouse button in the graph editor to move few frames, and paste that point. Move it roughly to frame 2. Copy and paste another one and move roughly to frame 0 in the graph editor (driver mode).

Find & expand tab called "Active Keyframe" and "View Properties".
I think these two things are important to move the f-curve's points.
We already have 3 points, now lets move them into the appropriate position.

Select the first point (or the most left), and check the key in "Active Keyframe".
Type in "0" (zero) in the X, and "1" in Y.

Second point (or the on that in the middle), type in "1" in X and "0" (zero) in Y.

Third (or the most right), type in "2" in X and "-1" in Y.


It was a bit confusing at first, but basically the x channel here is the value that connected to the driver value. And the y channel here is that value that affecting the driven value. Too many value words eh...

To get a clearer mind, we have setup driver for boneC x rotation value to be controlled by bone.Control scale Y. And we already have three points for the f-curve.

The first point (or you may say the first condition) X value is zero. The Y is 1. This means, if bone.Control scale Y value equals to zero, then boneC rotation x will have the value from that Y (which is 1) but if we zoom-in in the graph editor, and see that Y value of 1 is equals to 57 or so in the graph editor. So, if bone.Control scale Y is 0, boneC rotation X will have the value is 57 (or 1 if you see in the Active Keyframe tab).

Second point (or second condition), X is 1 and Y is 0, this means is bone.Control scale Y is 1, then boneC rotation X is 0. This is the default state. Because by default scale is always has value 1 in every scale channels.

Third point (well, third condition), X is 2 and Y is -1, meaning...?
Yeah right, is bone.Control scale Y is 2, then boneC rotation X will have the value of -1 (in the active keyframe tab) or aroung -57 (if you zoom-in the graph editor).

What if we want that boneC to have value of 90 in rotate x for the third key?
Easy... scroll up to View Properties in graph editor, select the third key and type in -90 in the cursor Y there. Then click to keys nest to it. The third point will move itself to a position where the value is -90 (well, it around -1.571 in my Active Keyframe x field).
Still confused? go grab yourself a coffee... relax a bit & try again. I did to then.

blender driver setup, ferdi
06

Now, if everything was setp properly, if we scale bone.Control in y axis, boneC should rotate accordingly. Well at least for me it is (^^,)

blender driver setup, ferdi
07
Btw.. I think there too many confusng words up there. Maybe next morning when not this sleepy, might be able to edit this post making it more brief... and... Zzzz.........zzzz.........

Komentar