Keep up-to-date with Free tutorials!!


Sign up to our twice-monthly newsletter today for the latest tutorials, interviews and product information.

Sign me up to receive third-party emails from 3dtotal's partners, too!

- Latest news
- Exclusive Shop Offers
- Preview early content
- Plus much more


Not Ready to take that step? OK, Why not just Subscribe to the RSS Feed

submit tutorial
1 | 2
Calculating Wheel Rotation

| Your Rating:
rating star fullrating star fullrating star fullrating star fullrating star none
(Score 4.14 out of 5 after 7 Votes)
| Comments 2
Date Added: 26th March 2013
Software used:

Short Version

Don't just find the distance traveled; find the local difference between two frames:

float $finAmount = ( (-(($theDist / $userCircum) * 360)) + $difValue);


The most common approach to calculating wheel rotation, which is also similar to the one I use, is a postscript that bakes rotation per frame based on the distance traveled from the last frame. However, this process has certain drawbacks; for example, the wheel going straight up (such as being raised on an elevator) or fishtailing sideways. In these instances, the wheel is not moving forward, so would not need to rotate. The solution that I've found is a bit more involved than just judging distance per frame; it involves judging the difference per frame instead (Fig.01).

Fig.01 - Wheel rotation example movie

The Process

Calculating the Orientation Distance Traveled

Once your wheel is animated traveling through space, you create a duplicate of your wheel on the current frame and another one frame ahead. Once these two duplicates are created, parent the first duplicate wheel under the second. The resulting tz, or corresponding translate axis, value of the first duplicated wheel is the difference in distance that will be used to rotate the wheel. Using this approach, you can determine the distance traveled with appropriate direction as well as reverse (Fig.02).

Fig.02 - Distance vs Difference

Though this process may seem confusing, you can see it working in this example:

• Make a wheel (cylinder) at origin (name it "wheelOrg")
• Duplicate wheelOrg, and name it "wheelDiff"
• For forward motion:
- Set to 10
- Parent wheelOrg to wheelDiff
- The tz of wheelOrg is now -10

• For reverse motion:
- unparent wheelOrg from wheelDiff
- Set tz of wheelOrg to -10
- Parent wheelOrg to wheelDiff
- The tz of wheelOrg is 10

From this example, if you were only using the distance between the two points (or frames), you'd get the same value of 10. However, using the "difference" method, you get a value that will indicate direction changes. Repeating this example by plugging in a value of 10 in Translate Y of wheelDiff, you'll see that even though the wheel movds, the rotation would not be calculated because it didn't move on its 'forward' axis.

Finding the Circumference of the Wheel

Finding the circumference of a wheel is pretty straight forward (Fig.03):

• Create a default polyCylinder
• Align the cylinder to the wheel, but don't scale it, only use position and rotation
• Using the INPUTS of polyCylinder1, adjust the radius amount until they're the same size
• Use that radius amount in the following equation to find the circumference:

c = 2 * 3.14159 * radius Amount

Fig.03 - Finding the circumference with a proxy cylinder

continued on next page >

1 | 2
Related Tutorials

Making of 'Decepticon Truck Crawl'

by Kiel Figgins
published on 2014-03-31

Keywords: Animation, Rigging, Transformer, Decepticon, Modeling, Lighting

rating star fullrating star fullrating star fullrating star fullrating star half (9)
Comments 1 Views 45539

Crafting character animation

by Kiel Figgins
published on 2015-02-06

Keywords: animation, 3d, character, pose

rating star fullrating star fullrating star fullrating star fullrating star half (8)
Comments 0 Views 31652

Painting Weights and Skinning: A Straightforward Approach

by Kiel Figgins
published on 2013-04-10

Keywords: character, weights, skinning,

rating star fullrating star fullrating star fullrating star fullrating star half (11)
Comments 1 Views 162806

Making of 'Modified Megane'

by Rafael Rubio Muñoz
published on 2009-06-22

Keywords: car, vehicle, race, tire, sport,

rating star nonerating star nonerating star nonerating star nonerating star none (0)
Comments 0 Views 118104
Readers Comments (Newest on Top)
ChaosWolf on Tue, 26 March 2013 7:37pm
Wow, thanks for this awesome tutorial. Helps a lot. Oh yes this a Maya tutorial not Max, thanks Admin. :)
Sachin on Tue, 26 March 2013 3:23pm
Thanks Kiel for sharing. I have been a fan or your rigs..Thanks again for sharing
Add Your Comment..