0
$\begingroup$

I asked this question yesterday, but the person who answered told me to ask the question with more details. Could someone tell me what each thing does here so I know how to use bone drivers? enter image description here

$\endgroup$
2
$\begingroup$

Drivers are basically relationships between object settings.

Let's say I have a cube and a sphere in my scene. I want my cube to move 2 units in the x direction when my sphere is moved 1 unit in the y direction.

First, I add a driver to the x location of my cube and bring up that panel (the one on your image). The variables below allow you to retrieve information from other objects (here, I want to grab the y location of my sphere since that's what's going to influence the x location of my cube). "var" designates the name of the variable.

Now that I have the y location of my sphere as "var," I can use that variable under "Scripted Expression" to write a Pythonic script the value of which will be assigned to the x location of my cube. Since I want to move 2 units in x direction for each 1 unit in y direction of the sphere, my expression should be 2*var.

Now when you move the sphere by "var" in the y direction, the cube will automatically move "2*var" in the x direction.

You can add more variables to write complicated expressions. As long as it is syntactically Pythonic, it should work.

$\endgroup$
  • $\begingroup$ This helps alot, but how do I apply this with a rig? I have to do something like for every degree that my bone moves the driver's value increases. $\endgroup$ – n00b Dec 26 '16 at 14:31
  • $\begingroup$ Also, I want to use rotational difference, right? Well when I do, I get bone 1 and bone 2. what do I put in each one? $\endgroup$ – n00b Dec 26 '16 at 14:34
  • $\begingroup$ It's pretty much the same thing for a rig. You add a driver. Set a variable (you set the armature for "object" and then you'll get an option to specify a bone) and write an expression. I must also tell you that this expression is in Python. If you set a variable to get a rotation of a bone, you will get the rotation in radians. If you want to convert that to degrees, you can use the Python function degrees(var) in your expression. The Rotational Difference will give you the angle between two objects/bones. So, it depends on what exactly you're trying to achieve. $\endgroup$ – Zac Dec 26 '16 at 15:09
  • $\begingroup$ If I wanted to move my cube along the x axis based on the rotation, in degrees, of a bone, first, I will add a driver to the x location of the cube > add a variable, rot, to get the bone rotation, then write degrees(rot) in the Scripted Expression. Now the x location will be set to the rotation, in degrees, of the bone. (1 degree in bone rotation = 1 unit in x direction cube translation) It's Python and mathematics. $\endgroup$ – Zac Dec 26 '16 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.