Gear animation

Hey guys!

I’ve been all over the web today trying to find how I can put together several gears, spin one and make them all move. I’m using Blender 2.5 Beta and I’m very new to the interface. I’ve been trying to work with soft body but…zero luck.
Any ideas?

Well, it doesn’t make sense to use soft bodies because gears are hard.
Copy rotation constraints might be all you need.
If not, you’ll have to learn how to use drivers.
Drivers hook one action to another. ie. the spinning action of one gear to the spinning action of another gear

Yeah I thought the best I’d get is a hard rubber…I’ll check the net on some driver stuff.
Thanks for the answer :slight_smile:

Look to, I remember Jonathan did a tut on this, but it’s been a long time ago, so you’d have to search for it.


Hmmm. Will do. I’ll see what I can find and I’ll post it if I find something usefull.

I presume this is what you mean Randy. It’s a great tutorial.:slight_smile: But what if you have two gears with separate diameters?

if you download the old zip with the old blender 2.49b- or c , youll get a file in there doing exactly you need yours to do but in real time…may be of help to yah, plus a whole lot of other blend files.

For gears of different sizes, use the influence of the copy rot constraint. Say the 2nd gear is twice the size of the first gear, then it would only rotate 1/2 as much as the first gear, so set the copy rot constraint’s influence to .5, so it only rotates 50%. Say the 2nd gear is 1/2 the size of the first gear - set the influence of the copy rot constraint for the 1st gear to .5 and the 2nd gear to 1, etc, etc… The influence setting I think has 3 decimal places, so it should be fairlu accurate. Now, say the 1st gear has 20 teeth, the 2nd one has 34 teeth, then you’d have to do some math to figure out how much the 2nd would rotate asnd adjust the constraint’s influence as needed. Influence has a max of 1 so you’d base everything off of the largest gear…


Hmm. Yeah I actually just noticed that function about 5 minutes ago and started playing with it. Yeah I guess that would mean you’d have to set up you’re whole gear system and use the empty to simulate the greatest gear. Good call!
Thanks Randy!

A final issue, I’ve created a constraint which allows me to rotate the gear but once my empty does a 180, the gear starts turning in reverse direction.

edit: actually it does this when the Z axis of the empty is z<0

Hmmm…odd. It works fine if all x, y and z rotations of the empty are applied to the gear.
but then the object twist and turns around it!s axis…

To be honest, I’d have to look at the .blend file. Something like how to rig a gear train can be explained, other things, like this problem you’re having, requires one to get in there and poke around to really figure it out… If you can post one, I’ll look at it.


Allright so first off, thanks for helping me so much Randy!

Here’s the .blend file. Just hit alt+a and you’ll immediately see what I’m talking about. As soon as the Z axis of the empty turns to lower than zero, the rotation of the gears inverses. :spin:

Actually, in the long run, you’re better off with drivers for gears than with constraints. It turns out that it’s really difficult to get this working correctly so that decomposing the rotations gives the expected results, so when using the influence value, you’ll end up with some unavoidable flips and other similar artifacts.

Hmm…yeah been bumping into walls here. I’ll search around for some documentations regarding drivers. Or anyone have an idea/link for a good tut?

Not sure why that .blend is doing what it’s doing. To fix it, select each gear in object mode and ctrl-A -> apply rotation for the gears, this zeros them out (as is, they both have x & z rots of 90). Then enable all the rotations on the copy rotation constraints. Now the gears will behave correctly.

As to using drivers, I’ve never driven something like this, not exactly too sure how I would set it up… Anyone got any pointers or direction to start looking in???


Darn…ctrl+a / rotation doesn’t seem to solve it :confused:

Did you also enable all rot on the constraints? See attached .blend, I’ve cleared to rot of both gears, but only enabled all rots on the constraint of the red gear so you can see it work.


Would really like to know how to set this up with drivers…


Gears.blend (455 KB)

Thanks man! Looks great! I’d a;so be interested in the driver method :expressionless:

Here is your blend file with the rotation of the little gear being driven by the rotation of the large gear.


GearsDriver.blend (574 KB)

Wow. That looks good. I was about to post a blend file where I tried to apply a white material on one of the teeth to show it’s velocity and position but it would jump around. I did it with this blend file and it worked! :smiley:

Could you write a short description on how you did this? Would be much appreciated :smiley: