Friday, November 17, 2023

Maya Wheel Rig with Constraints

Sometimes I need to rig vehicles, and one of the things that are done very straightforward is the wheels. For the most part I have used the classic algorithm.

Generally "d" is always or almost always used as a local translation axis, to avoid further complications. However, this does not work very well in all cases. I've seen a video where explain a different method using the same formula. The tutorial was made by Andrew Christophersen. It's quite old, but he uses some good technics like the dot product to obtain "d". Nevertheless this could be simplified using just a couple of constraints.


The general idea is to obtain a global z-translation. For this we create a locator outside the control that will move the tire and another one inside. Then we create a group above the outside locator. We make a pointConstraint from the inside locator to the outside locator. Then we make an orientConstraint from the control that will move the tire to the outside locator group. 

$autoRot = "global_ctrl.autoRotate";
$rad = 41.8101;

wheel_ctrl_expression.rotateX = 360*wheel_out_loc.translateZ/(2*3.1416*$rad);

The result basically will be the same as the video tutorial, but personally I find it easy to understand. A video demonstration.

I hope you find this useful. Thanks

No comments:

Post a Comment