Hi All,
I am new to rigging and drivers in blender, but basically I am trying to replicate the copy rotation constraint of ‘ADDING’ the rotation of one object to another. When I do this with the copy rotation constraint, my objects flips when it passes 180 degrees.
I heard that this limitation can be bypassed by using drivers but I cannot figure out how to ‘ADD’ a rotation of the target object to the current object rotation.
I will attach a blend file where I have tried to create my own expression and I would appreciate if ya’ll could give me a solution. The relevant objects are ‘Rotation Target’ and ‘Gear with drivers’. Just play the animation and see how it works.
Gear with Drivers.blend (1.2 MB)
PS: I am using Blender 4.3
@princeofsloth
Hi,
the rotation of each cog is simply the z axis rotation of either the RED cog ( which is the ‘animated’ one ) or the cog prior to each cog that drives it, but with a multiplier that represents the ratio of the teeth between these two cogs . . .
so the Orange cog is -Red_Z*(6/12)
The minus makes it rotate in the opposite direction and the 6/12 is the number of teeth on the red cog ( 6 ) divided by the number on the orange cog ( 12 ).
In this example the Red drives the orange drives the yellow drives the green
Both the blue cogs are driven directly by the red and their ratios are deliberately ‘wierd’ ( at 7 and 19 teeth ).
But the formula is the same.
Animated . .
and the file . . .
note: I’ve deleted your copy rotation constraints and added a cycle modifier to the Red cogs z rotation so it runs ‘forever’.
Gear with Drivers1.blend (1.5 MB)
hope it’s of help,
Cheers,
Dj
2 Likes
Thank you so much this is what I wanted. A formula based on gear teeth, works better than constraint influence.
But I have one question. I want the driver to reference a value of another object, but that value is driven by a constraint. Currently it doesn’t work. Is this the expected behaviour and a limitation?
1 Like
I’ll need more information on what kind of constraint, and what it’s doing to what, to know if a solution is possible.
Dj.
Basically there are 3 gears,
Gear no 1 is being rotated on the z axis though an animation,
Gear no. 2 is has a copy rotation constraint for the z axis, so it rotates as gear no 1 is being rotated.
Now Gear no 3 has a driver on the Rotation-z axis where the variable is derived from the Rotation-Z axis of Gear no. 2.
When I play the animation, Gear no 3 does not rotate.
Attached in the blender file.
3 Gears.blend (1.1 MB)
Yep, that won’t work. The copy rotation does not actually create an updated variable for any axis. It obviously is somewhere behind the scenes, but the transform panel never shows an actual value:
it’s all zero’s. This is the number that would drive cog3 [ if you dial up the z value with the mouse you’ll see the cog3 rotate as per your scripted expression]
Assuming there is some specific reason why you need the copy constraint on cog2, you could just bypass it and drive cog3 from cog1.
It’s possible [ I don’t actually know ] that using Blender python scripting you can access the underlying rotation, if you have to, but that depends on your plans for the project.
Dj.
1 Like
That’s all the info I need. I’m currently in a state on learning rigging and I wanted to know the limitations as well.
Thank you so much for your help so far.
1 Like