2
$\begingroup$

I am new to rigging and playing with rigid bodies physics in Blender. I use 2.76

As I failed to set up gears with large differences in diameter and the gears were impossible to make stop wobbling around while spinning with no restraints shown by their own physic confinement (hole and axis) I wonder if indeed Blender can be used to simulate a mechanical real world transfer of rotating motion through a series of physical restraints such as holes, axles, bolts and nuts?

Is Blender good enough (and I simply failed to set it up in a proper way? I wouldn't ask this if I had found something useful on Youtube, but the person (blendersensei) presenting Rigid body constraints seemed to want to lock the rotating objects xyz positions as well as rotation in every other axis than the one set in motion. (I failed to do this as well, and only got a good laugh out of it.)

$\endgroup$
  • 1
    $\begingroup$ Unless you need something very specific Gears are often simulated with constraints or drivers instead. It is easier to achieve, more accurate and reliable and much more stable for the same visual result, at a fraction of the processing power. $\endgroup$ – Duarte Farrajota Ramos Feb 6 '18 at 15:38
4
$\begingroup$

Blender rigid body physics is great for flat surfaces or for single point of contact collisions (eg, a coin falling onto a surface or a cube bouncing) but struggles with curved sufaces in full contact with other curved surfaces - such as an axle through a close fitting hole in a wheel. This is mostly due to the way in which the meshes are modelled - instead of being defined at an atomic scale they are simplified into vertices and faces that result in no ‘exact fit’. Also, the simulation is broken down into a series of short ‘steps’, but nothing compared to the (potentially) infinitely small number of steps in the real world. This means that closely fitting meshes quickly become unstable with overlapping meshes that the rigid body engine being unable to find a solution - so they start to pass through each other and jostle about as it tries to find the best solution in a situation that could not exist in the real world (real objects never get to the point where they physically intersect).

Theoretically, if you could model the surfaces using a high enough precision (unfeasibly high) and set the ‘steps per second’ to a high enough value (unfeasibly high) then you could get a reasonable simulation - but it would take far more time and computing resources than would be available.

Using Rigid Body Constraints allows you to simplify this by enforcing any relationships (such as a wheel moving around its axis) without having to rely on the microscopic interactions of the surfaces. This can generally produce a ‘good enough’ simulation for your needs.

$\endgroup$
1
$\begingroup$

It's hard to find anything to add to Rich's answer. The rigid body sim isn't designed for complex, very precise interaction of surfaces. I tried to make tank treads that would react to uneven ground, so I know.

What I'll do instead is to show how to set up gears.

I have modeled the gears with the extra objects addon. One has 12 teeth, the other has 40.

The easiest way I found to rig them is to animate an object moving in a straight line. That's what the arrow is for.

But don't drive the gears with it, drive empties and parent the gears to the empties. Right click the Z rotaion of an Empty and add a single driver.

Go to the Graph Editor, driver mode and use the arrow as the target, Y location, world space. The formula I use is:

variable / teeth count * speed multiplier

for gear one and

- variable / teeth count * speed multiplier

for the other. Speed multiplier is the same for both drivers and makes the gears more responsive to the movement of the arrow.

Just copy and paste the driver to the other empty using the context menu and adjust the teeth count.

You'll probably find that the teeth don't match up. That's what the in between empties are for. Lining them up with the drivers is possible but a bit complex. Lining them up with in between empties just takes rotating one gear a bit.

gears

Since gears are supposed to move in unison, a simulation is rarely needed.

https://docs.blender.org/manual/en/dev/animation/drivers/index.html

$\endgroup$

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.