Support

  Tips & Techniques - XPresso

XPresso:
How to: Cogwheels
Download:
Project
Works with:
R8, XL, Studio
Requires:
Version 8.2+
 


 
XPresso (R8's node-based expression editor) can be a bit daunting at first glance. Bjorn, of MAXON Germany, has assembled a series of examples of common animation tasks that should help to ease the pain of understanding and utilizing this powerful feature.

XPresso's well worth putting the time and energy into learning...now, have at her!


 
This example shows how to make the rotation of a cog dependent on the rotation of another cog.
Click to play Quicktime movie

 
To create the correct dependency,will you be using the inner radius of the cogs. With this information, you can calculate the circumference with the following formula: C=2*PI*R (where R is the radius.)

 
The Rotation Angle is directly proportional to the Circumferences: C1/C2 = RA1/RA2 => RA2=RA1 * C2/C1

 
Since the wheels will be rotating in different directions, the Rotation Angle must to be multiplied by -1.

 
This way you only have to animate the Rotation Angle of the first cog (in this case, Banking) to get a correct rotation for the second cog. The rotation will be computed correctly depending on the inner radii of the two cogs. The number of teeth will have to be set by hand.

 
In principal, it is possible to calculate the number of teeth of the second wheel in the same way, but since you can't create fractions of teeth, there isn't always a correct solution.

 
For further explanation, you will find detailed remarks on how the expression works in the Xpresso editor in the project file above.


© 2007 All rights reserved. For the personal and/or professional use of Cinema 4D users only. Reprint without permission is strictly prohibited.

© 2010 All rights reserved
Copyright Information |
Privacy Policy | Terms of Use