Views:86,945 |
||
Updated:Feb 28, 2011 |
Readership Level:Basic |
|
Tags: |
||
Maya Versions:4.x, 5.x, 6.x, 7.x |
Platforms:irix, linux, mac, windows |
|
Owner: |
Language:English |
|
Rotating Wheels on a Car
(Source files provided by Jim Gravina, Class of 2003)
The purpose of this handout is to show you how to rotate the wheels on a car so they follow the pace of the car as it move. By doing it this way, you will get a more accurate result without setting numerous keyframes. To do this, we will use the distance tool, set driven key, and infinity cycles in the graph editor.
Getting Accurate Distance Measurements

Fig. 1
NOTE: If you want to be precise with the rotation, here is a formula you can use:
(Px2) + Radius = Distance
Go to create > measure tools > distance tool.
Fig. 2 - Click on the bottom middle of the tire to get a start point.

Fig. 2

Fig. 3 – Click on the top middle for the end point and press enter. You can see I have a radius of 4.16
Now plug that into the equation above and we get the following:
(Px2) + Radius = Distance
6.28 + 4.16 = 10.44
Now we know that when the car travels a distance of 10.44 the tires should rotate 360 degrees.
|
|
|
Fig. 4 – After going to create > measure tools > distance tool, click near the bottom center of the tire to get a start point. |

Fig. 5 – Then click and drag until the distance says roughly 10.14.
Now we have a guide as to how far the car needs to travel for the tires to rotate 360 degrees and we can now start using the set driven key to animate it.
Animating the Rotation of the Tires

Fig. 6

Fig. 7
Now, for this we have the tires as four individual groups, the car’s body as a group, and everything together as a main group. So the Driver would be the main group (this is what will affect the tires rotation) and the Driven would be the individual tires (this is what is being affected).

Fig. 8

Fig. 9

Fig. 10

Fig. 11
Fig. 12
We have now just keyed the beginning of the tire rotation. Now we need to key the end effector.

Fig. 12
Fig. 13
Fig. 14
We have now just set the beginning rotation and the end rotation after the cars movement. Close the set driven key window, select the car and move it along the Z axis to test the results.
You will see the tires rotate, but only for that short distance we set it to. We need to cycle that rotation to an infinite amount.

Fig. 15

Fig. 16
Now we want to cycle the before and after rotation to an infinite amount.

Fig. 17

Fig. 18
That is it. Now close all the windows and select the car and drag it back and forth along the Z axis and the tires will rotate accordingly. Notice, if you move the car slow, the tires rotate slow. If you move the car fast, the tires rotate fast.
NOTE: The only other thing you would need to do is set the rotation of the tires for the X axis as well because chances are that the car will not only be moving along one axis. To do this, simply rotate the car 90 degrees along the Y axis so it is facing the X axis, and then repeat the steps above.
The only thing you will need to do different this time is change the Driver to translate X instead of Z like before. Everything else, including the rotation of the driven remains the same.
Comments
where is the tutorial?
someone steal it?????????????
What? Am i blind or something?
Sorry, it was there, I swear. I just added it again. It is a little old but still works well.
Thanks, one question:
For the formula (Px2) + Radius = Distance
How I can get the P value?. In others words, what it mean P value?
P is (Π constant) Value = 3.14
Thanks a lot,but I think the Distance result is wrong.The formula is:
2*Ï€*Radius=Distance (Ï€=3.1415926~3.1415927).
Write a Comment