Maya tutorial: Animation of rigid bodies by particles

 This small tutorial will show you how to use particle dynamics to drive our gears. You will also use a hinge constraint on each gear to achieve the rotation motion.

 

 

 

 

Maya tutorial: Animation of rigid bodies by particles

Step 1

Create a polygonal gear or use one which you have made in our tutorial “Modelling a polygonal gear “. Rotate the gear by 90 degrees around the X axis. Your gear needs to sit upright.

Step 2

Duplicate the gear and place it so as to align the teeth of both gears to be linked into each other like in our picture. You must make sure your gears are not touching.

 

Step 3

Select the first gear and create a hinge constraint. You will find it in the Dynamics menu set under the Soft/Rigid Bodies>Create Hinge Constraint. You should end up with a hinge sticking out of the gear. Do exactly the same procedure with the second gear.

Gears are now automatically turned into the rigid bodies which will help us drive them by particles later on.

Step 4

Create the emitter. Select Particles > Create Emitter, and place the emitter above the first gear to the top left corner.

Select the emitter and In the Channel Box edit the values. Emitter type is Directional, Direction X is -1, Spread 0.5.

Now, if you will play the simulation the emitter should force the particles towards the gears.

Step 5

Select the particles and create a gravity field. (Fields > Gravity) Make sure you have the particles selected. This should connect the particles to the gravity field. Once you play the simulation, you can see the particles falling down on the first gear. You can move the emitter closer or adjust the speed to get the particles falling on the gear. As you can notice, the gears are not moving. To move the gears you need to set up collisions with the particles.

Step 6

Select the first gear and in the channel box change Particle Collision to be ‘on’. You will do that by typing number 1 into the Particle Collision value box and hit enter.

Step 7

Select the particles and then hold Shift and select the first gear. Go into the menu Particles and select Make Collide.

If you now play your simulation, you should have a nice rotation motion of the gears driven by particles.

{flv}gear4_1{/flv}