In this tutorial we are going to look at how to animate a gear train in Blender with constraints, such that all the gears follow the lead of a single empty. This technique offers a much cleaner system with less margin for error

You must be logged in to upload images. Register

Discussion

23 Responses to “Animating a Gear Train”
  1. stvndysb
    Posts: 11

    hey dude

    love the tutorial

    but i have a problem i hope you can help me with

    i have my rod on the vertical, i have the location values set correctly but the rod resets at 180 degrees rotation, what am i doing wrong

    #
    1
    Nov 10, 2009 at 3:47 pm
    • Posts: 1415

      Check that you have the correct axis set for the constraint. The simplest way to do this is simply trial and error, try each one until it works (that’s the inaccurate, but simplest way).

      #
      1.1
      Nov 10, 2009 at 7:10 pm
  2. chris
    Posts: 1

    The way you made the gears there is a gap between the cogs of the firs and the second gears. How do you make it move realisticly – the second gear shoud not move until it comes in contact with the next cog of the first?

    #
    2
    Dec 9, 2009 at 10:26 am
  3. John
    Posts: 1

    I’m sure my question would be more along the lines of the game engine but maybe you can answer it. In your tutorial, all the gears act independantly from one another. I would like to see a more “Cause and Effect” set up where the rotation of the first gear causes the rotation of the second gear, and so on. The action between cause and effect would be the teeth on the first gear pushing the teeth on the second. Also, setting up some sort of limiting blocks to prevent overrotation. Is this possible.

    #
    3
    Dec 9, 2009 at 11:26 am
    • Posts: 1415

      This might be possible using Bullet physics through the Game Engine. It would probably be done using rigid body constraints for rotation. Hmmm… I will have to play with it.

      #
      3.1
      Dec 9, 2009 at 12:21 pm
  4. Posts: 136

    I used this gear tutorial and then added a tank track array deformed by a curvecircle and transformed the location by the rotation of the empty (like you showed using the cube) and a simple tank tread was created with everything rotating together. Thanks for the very useful tutorial.

    #
    4
    Dec 27, 2009 at 8:37 pm
  5. Delmar Cianciulli
    Posts: 1

    Really intriguing article, something comparable to this occurred to me not too long ago and it pretty much played out in the same way to how you describe it.

    #
    5
    Jan 24, 2010 at 6:14 am
  6. Carlos Henrique
    Posts: 9

    Hello Jonathan,
    First of all, I would like to thank for the awesome tutorials that you have here on the website.
    My question is quite similar to John’s question..
    For instance, if i would making a robot, modeling, rigging, etc. Is it possible to make it’s junctions (like knees, elbows) to work properly? using riggid body or so..
    My problem is that when I run the animation, all parts “explode”… flying to all sides.. I saw what John said about ‘limiting blocks’, and I’v tryed, but it doesent seems to solve the issue.
    Could you give me some help ou advise.. something that i may have forgotten.
    Do you think that just faking it would be a better way to carry on this idea?
    Thanx a lot!

    #
    6
    Feb 3, 2010 at 5:35 pm
  7. ronaldo
    Posts: 1

    make links how made this=buttons to made make links please help thanks

    #
    7
    Feb 26, 2010 at 10:48 am
  8. Marijn
    Posts: 1

    Hey,
    Great tutorial I made mine with a bigger gear. Only need to adjust the influence zone for the bigger one:
    http://www.youtube.com/watch?v=nEoc3X1n0Ks

    I think I can add a chain to this with ease.

    #
    8
    Mar 22, 2010 at 12:07 pm
  9. Tom
    Posts: 1

    Hey guys, i just tried that tutorial on blender 2.5 and it appears that the rotation constraint had a weird behavior.
    I would say something about absolute value in the back-end code which make the object change rotation direction once half way.
    Could someone else tell me if they have the same issues ?

    tom.

    #
    9
    Mar 22, 2010 at 2:26 pm
    • mikh3x4
      Posts: 12

      same thin. when i rotate my empty to 90 deg the gears switch direction on 270 deg they switch again and so on

      #
      9.1
      Apr 1, 2010 at 9:20 am
      • mikh3x4
        Posts: 12

        i found a work around. don’t check the rotation for other axies check box and it fixed mine

        #
        9.1.1
        Apr 1, 2010 at 9:52 am
  10. John A.M.
    Posts: 8

    i’m using blender 2.5 alpha 2 and the transformation constraint won’t work :,-( the object just sits there >:-(

    #
    10
    May 13, 2010 at 7:00 pm
  11. Tom
    Posts: 3

    just read the 2 posts on top of yours :)

    #
    11
    May 20, 2010 at 4:35 am
  12. PleShow
    Posts: 1

    This video was very useful.Maybe I’ll try modelling an automaton from Syberia later. :D
    Thx Jonathan!

    #
    12
    Jun 16, 2010 at 4:04 pm
  13. oyster
    Posts: 1

    thanks for the tut
    I have a question: how to locate/rotate the gears so that they will never run into others when the Empty is roated.

    I think this is not a question like chris has asked.

    thanks again

    #
    13
    Aug 10, 2010 at 6:26 am
  14. Marcosv
    Posts: 7

    Tks Jonatan
    Great tutorial. I have a scenario where I want to copy the rotation of a smaller cylinder to a bigger one. Do you know how could I rotate a cylinder copying the rotation of another smaller cylinder with an influence smaller than 1 and still make the bigger cylinder to make a complete turn? The bigger cylinder resets its turn when the smaller cylinder completer 360 degrees.
    Thanks. I appreciate a lot your tutorial.

    #
    14
    Dec 8, 2010 at 11:10 am
  15. Marcosv
    Posts: 7

    Ok. I did the other way around. The location in x direction rotates my cylinder. This way I can do an eternal rotation. Thanks anyway.

    #
    15
    Dec 9, 2010 at 1:49 pm
  16. Elwin
    Posts: 4

    Very interesting tutorial. I shall have to give it a try (got me a thing for gears). Question for me would be, what if the gears have different numbers of teeth? I suspect one would have to animate them individually (at least that’s how I have done it, calculating the gear ratio).

    How did you make the gears? I have seen the gear script, but haven’t done much with it myself. My normal method is to create the gears in Inkscape, then import the .svg file into Blender and extrude it.

    Another consideration, depending on what your intended purpose for animated gears is, is that you can get away with animating the gear “by just one tooth” (unless you have specialty gears that aren’t symmetrical), saves on render time (I mostly do GIF files, and being able to animate an entire gear in just five frames is a must, it just keeps playing the gear rotating by one tooth over and over again, but the gear looks like it is doing a full rotation).

    The video below was done with my Inkscape extrusion technique, but not by “one tooth”, obviously.

    http://www.youtube.com/watch?v=acXiebKExQM

    #
    16
    Dec 28, 2010 at 7:18 pm
  17. Posts: 2

    Hi john, i like how you did this tutorial and i really appreciate you doing it. but i do have a question.

    i’m trying to use a driver for wheel rotation (basically a train) and i’m wondering how to make not a shape driver but a graph driver. so can you make a tutorial for that please? thanks

    -AJ

    #
    17
    Oct 22, 2011 at 7:39 pm
  18. Stefan
    Posts: 8

    It is called a Rack and pinion where the rack is the long linear gear and the pinion is the round one (FWIW).

    Great tutorial. I didn’t realize something so complex could be so simple. I also like how it is explained comprehensively and gives common pitfalls. Very useful website. :)

    #
    18
    Jan 27, 2012 at 11:09 pm
    • Posts: 1415

      Glad you like it and thanks for the clarification :)

      -Jonathan

      #
      18.1
      Jan 28, 2012 at 11:43 am

Leave a Comment