Difficultly with Locomotive drive train rigging

I have attached the 2.77 blend file of a locomotive drive train that i am trying to rig. I have had this problem in the past and can’t remember what i did to fix the problem. The drive train looks like this



When i try to use a copy rotation constraint on the right rear wheel (coping the rotation of the rotation bone of the armature) the wheel rotates 90 deg.

I have have removed any rotation and/or scaling from the components, so i am at a loss for what is wrong.

Also between frames 6 and 7 the rear wheel jumps 90 deg, i don’t know what is causing that either. Thanks for the help in advance.

Attachments

Compressed Air Locomotive Compressed.blend (443 KB)

This type of rig - objects rotating more than 360 degrees with reciprocating parts, is often best solved with Drivers rather than Copy Rotation Constraints, I don’t have time to look at this just now, but will endeavour to look at it tomorrow or Saturday and post a solution. I have rigged many steam locos, so I am confident I can do this one…

Cheers, Clock.

Thanks, awaiting your reply. I know there is some basic thing i am missing

OK Chap, here is your blend file back with a new Armature in a different layer:

Compressed Air Locomotive Compressed.blend (447 KB)

To animate this you need to either add a driver to the “Control” bone or keyframe some rotations on it’s internal Z axis. To get an idea of the movement, you just select the Control bone and key R ZZ and then move your cursor in a round fashion. Don’t forget that if you want to keyframe more than 360 degrees, you need to use increments of say 150 degrees so it doesn’t snap back - see the Spinning Objects Tutorial on my website at clockmender.uk

Now to some point to note:

  1. Steam engine wheel cranks run 90 degrees out of phase from one side to the other, not 180 as you had it. :ba:

  2. You where rotating the crank Armature (“Rotation” you called it) in Object Mode, not the crank bone in Pose Mode, this is why you had such a F***-up. NEVER rotate an armature in Object mode - always rotate bones in Pose mode. :ba:

  3. You have no Root bone, always have a root bone to parent your engine body/chassis to so you can easily move the whole loco in one easy operation.

  4. You have two armatures, why? You should put all the actions in one armature so it allows Blender to run the animation more efficiently. :ba:

And of course there where other things as well… but that’s probably enough for now. I did not make the armature exactly as your model, you can fiddle about with that. Also for the block at the end of the piston, you do not need the bone “piston.L” to be dead in line with the piston as it is only moving along one axis. So you just need to tweak it to fit your mesh, that way you will better understand it, any questions, just ask:yes:

Cheers, Clock.

Attachments

Compressed Air Locomotive Compressed.blend (447 KB)

Thanks for your help

You’re welcome!

I have used this type of rig for running a train along a curved path using the Follow Path constraint, to get the rotation of the wheels correct, you need a Driver based upon the forward motion of the train translated as a rotation of the wheel. So for a wheel of 1 unit diameter it rotates a full circle in 3.142 (pi) units of travel. So the Driver expression, for my “control” bone in the rig I posted, in this case would be var / pi where var is the forward motion of the target object (the “root” bone) in Transform Space. So if the train travels pi (3.142) units along the track the wheel rotates once. For a wheel of 2 units diameter the expression would be var / (2 * pi), it would then rotate once for a travel of 6.284 units. All rotations used in Drivers are always in Radians - there being 2 * pi Radians in a full circle (360 degrees). Blender recognises pi in expressions so you don’t need to remember its value.

I hope this all makes sense!

Cheers, Clock.

Well i finally finished the armature thanks to you for all your help. One of the many things i learned is not to use constraints to control the components. Constraints worked well until you try to rotate the armature (like banking on a curve) then the whole drive train went cattywampus. Parenting the components to the armature worked great, eliminating this problem.


Sweet, once you have an animation, pop it on Youtube and post a link here, I should be most interested to see it all working!

Cheers, Clock.

I thought i was finished, but i noticed that when i rotate the root bone of the armature around the Y axis, the coupling rods also rotate. This is the only rotating that shows this effect. I parented the coupling rods to the rod bones of the armature. I have attached the file, can you please tell me why this is happening.

Attachments

Compressed Air Locomotive - Engine.blend (948 KB)

I cant open the file - there are all sorts of referenced other blend files in there, just strip out everything bar the main one and try again.

Cheers, Clock.

It was my fault, i forgot the eliminate the copy rotation constraint on the coupling rods. Let you know when i have some animation done. Thanks again.