Home Technical Talk

Gear Meshing

I'm making a map with a lot of gears, and it will get kind of bland if I just have single gears. However, I cannot get the gears to mesh and rotate in sync! Also, if the gears rotate at different speeds, it'll be hard to make a single model loop. (i.e. One gear's at 360 at frame 41, while another is at 260.) One gear will visibly jump back to 0 (or 360) when it loops.

How can I make this work?

Replies

  • chrisradsby
    Options
    Offline / Send Message
    chrisradsby polycounter lvl 14
    I don't really get it?

    I'm no animator but If you place the gears like they should when combined together, rotating them all 360 degrees in X amount of frames should make everything look fine from the start. I think you're complicating it more than necessary.

    I guess it starts being difficult when you have different sizes and types though.
  • [Deleted User]
    Options
    Offline / Send Message
    [Deleted User] insane polycounter
    The user and all related content has been deleted.
  • Farfarer
    Options
    Offline / Send Message
    If the gears all spin at the same speed (i.e. the driver gear never speeds up or slows down) then you could export each gear as a separate object with their own animation.

    That way they're all guaranteed to mesh and they're all guaranteed to loop properly.
  • Xoliul
    Options
    Offline / Send Message
    Xoliul polycounter lvl 14
    Talon, that's only gonna work if the gear is being driven directly by the driver gear. If there's one in between, the ratio will change the speed. He'd have to take into account a lot of different combinations.

    If I were you, I'd build a few (2 or 3) combined set-pieces, which look nice by themselves. Animate that (which isn't hard, you can calculate the speed by the gear ratio's), and place those around in your level.
    OR
    No idea what engine you use, but you could try and get a fully dynamic, physics-driven solution working. I don't even know if that's a good idea performancewise, but it sounds fun to try. In UDk it might work.
  • Farfarer
    Options
    Offline / Send Message
    Yeah, but I meant you could work it all out - the speeds of the rotations - and export each gear as a separate object with it's own animation (so that each object has only the frames required for a complete rotation).

    Otherwise they end up being several hundred frames long as you wait for all of the rotations of different speeds to align to the same as the first frame, so you can get a seamless looping animation.

    Granted if you want to mix/match random gears then you're in trouble and you'd do better with some sort of script to rotate them properly...
  • Mark Dygert
    Options
    Offline / Send Message
    http://www.technologystudent.com/gears1/gears5.htm
    In the example below, the DRIVER has 60 teeth and because it is the largest we say that it revolves once. The DRIVEN gear has 30 teeth. Simply divide 60 teeth by 30 teeth to work out the number of revolutions of the driven gear.
    gr1a.gif1:2 ratio
    Since your gears aren't preforming any other task besides matching up, you can:
    Keep the number of teeth the same (or use the example above)
    Keep the number of rotations and time each gear takes to rotate, the same.
    Just scale the gears to whatever size you want. Any unique details can happen in the shape of the teeth and inside the gear.

    [ame]http://www.youtube.com/watch?v=f_FhRpamb0w[/ame]
    All gears moving 0-360 degrees for 100f.
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    Just go in and manually rotate the first few frames required to syn them (I don't think you even need to do a full 360, just enough to establish the linear function curve for the rotation). Once you have that, just have it repeat and cycle and it should mesh perfectly.
Sign In or Register to comment.