PDA

View Full Version : Animating wheels and piston on steam train


gonkybill
11-27-2006, 06:27 PM
Hi everyone,
I'm trying to animate a steam locomotive using expressions to control the whole system. Ideally I'd like to have a set-up where everything relates back to the translation of the main body of the train (ie-moving the body moves the piston, which rotates the wheels and rod). I found a 3dsmax equation with variables here: http://paulneale.com/tutorials/pistons/trigPistonExample.jpg (http://paulneale.com/tutorials/pistons/trigPistonExample.jpg)
but I don't know how to translate that into maya's syntax. Can anyone help?
Thanks

Illusion-shadow
11-28-2006, 02:11 PM
I don't know Maya, but I would actually use the wheel rotation to move the piston instead. Create an expression where the Y transform movement of the drive the rotation of the the wheel, which should be pretty simple and set up the dummy on the wheel and add position and look at constraint to the piston. The only expression you will have to write would be the transform between the train and the rotation of the wheel. I hope this will help.

PEN
11-28-2006, 07:10 PM
I forgot that I did that image up. Illusion-shadow is correct in saying that the rotation of the wheel should drive the piston.

You can use the expression editor in Maya to achieve this but it is always better to use the utility nodes instead. Also if your train isn't just moving along the Y axis (just so you know Illusion-shadow that would be stright up in Maya;) then you will have to add together the two axis that you are moving along. If you are driving the train along a path the percentage long the path would be the easier solution to use.

gonkybill
11-29-2006, 02:08 PM
Thanks very much Paul and Illusion-shadow. I managed to get the system working. If I have any more queries I might need you again if that's ok?
Cheers
Sam

CGTalk Moderation
11-29-2006, 02:08 PM
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.