PDA

View Full Version : Vehicle Rig - Spinning Wheels


jgslooknout247
04-09-2007, 05:35 PM
I've recently finished a vehicle rig, but I'm still not safisfied with the autoRotation of the wheels. This might get a little long.

Currently four methods are available to rotate the wheels. 1 - manual rotation via the control objects 2 - a MPH variable on the "Place Me" handle that makes adjustments based on time 3 - the translation and rotation of the "Truck CTRL" handle, so the truck can be moved and the wheels will act accordingly 4 - the translation of the "Distance CTRL" handle, in case someone wants to animate the background passing by instead of the truck going forward

Here's the problem. I set up the "Truck CTRL" handle to automate the wheel's rotation based on its translate attributes, and I used set driven keys run by the rotation of the same handle to adjust which translate values affect the wheel's rotation so they always turn the correct direction or so the wheels don't rotate if the vehicle is moved sideways for whatever reason. Here's where it gets tricky. Rotating the vehicle effectively changes which translate attribute affects the wheels and if say the z value is 10 and the x value is 0, when the vehicle is rotated 90 degrees the wheels turn backwards because the value that the wheels multiply to get their rotation is going down from 10 to 0. Now this can be counter acted with the manual contols, but that's just so much work. Anyone know of a better way?

http://www.3dgill.com/Truck_320x195.jpg (http://www.3dgill.com/Truck_v1.0.rar)

Here's a link to the rig itself. The model came from the lighting challenges on CGSociety. I did get permission to rig it from the modeller in case anyone wants to know. I made it in Maya 7.0. The file is 1 mb.

http://www.3dgill.com/Truck_v1.0.rar

portfolio website: http://www.3dgill.com

Later

Davvey
04-14-2007, 09:44 AM
Hi
I have set up a Maya set of vehicle riggings script that does what you are trying to achieve. If you want to look at it its on Highend3d.com at Davvey's Vehicle Rigging Scripts (http://www.highend3d.com/maya/downloads/mel_scripts/animation/Davveys-Vehicle-Rigging-Scripts-4109.html)

What I did was to use utility nodes in combination. I used Condition Nodes to detect vehicle rotation and set the nodes up to switch rotation based on angles of rotation of the vehicle rig. Basically using Condition Node settings of 1 and -1 and putting these through a multiplier node to switch rotation. It can be done with expressions but the whole rigging scripts I am building use utility nodes only so I did not use any expressions. The vehicle after rigging can be dragged in any direction and wheels rotate based on distance moved and angle of movment i.e. in X and Z axis

CGTalk Moderation
04-14-2007, 09:44 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.