Rigging a steam train piston

Hi all… I’ve been trying to rig a simple steam train piston by following Small Trolls tutorial… Now everything goes fine up until he at 23:27 parents the wheel to the bones… The error I got here was “Bone Heat Weighting failed to find solution for one or more bones”. I’ve been trying to do his tutorial on my set of wheels for a while now and I got this error for the first time… Anyways I dont know but somehow I fixed it…
Next at 28:51 when he parents the connecting rod to the first wheel and I try the same on my wheels… The connecting rod just jumps backwards to some odd location… Then I drag it back into position and it works as it is supposed to…
Finally when at 30:02 after he applies the “Copy Rotation” constraint to the front wheel and then puts in it localspace and it looks perfect in the tutorial… As with me… my wheel turns in an awkward direction and spins like an idiot!
I made the wheels using a torus a bezier circle and a cylinder and applied the array and curve modifiers to it to make it like a wheel with spokes…
I tried everything I knew… Removed doubles applied scale but nothing happened.
And I followed his tutorial along the .blend he provided and it worked perfectly… (attaching my blend file)
Tutorial link- https://www.youtube.com/watch?t=1802&v=7w7quOeOAHk
Problem 1 at 23:27
Problem 2 at 28:51
Problem 3 at 30:02

Thanks for the help!
Engine wheels mk 3.blend (1.17 MB)

I’ll look at it next week - too busy until Monday/Tuesday.

First impression: Rotations NOT applied to wheels, or any other mesh for that matter - ALWAYS apply rotation and scale or preferably only alter these in EDIT mode, this is how Blender is written to work.
Second Impression: Nowhere near enough bones to rig a piston and con rod correctly, you set up is completely b***ered if you alter the angle of the piston to one of the global axes. I will post a simple and foolproof rig next week, you should be using a simple IK chain of bones for a system like this.

Cheers, Clock.

PS. I cannot find the bones in your “Driver” armature - what have you done with them?

PPS. Forget my PS - I have found them hidden! not a good idea to hide stuff when asking for help…

PPPS. Why two armatures?

Figured it out last night while experimenting… And sorry about the bones. As far as my model is concerned its working properly. The only problem is that I dont know how do I connect the wheels to my engine mesh and make them move in sync with my engine mesh… I was using drivers previously and when applied that to the empty from which I animated the wheels they rotate fine but not move with the engine… So I parent them to the engine and and BOOM!! Everything goes off in awkward directions… Can U help me in that??
BTW I’ll be waiting for ur rig…

OK here it is - almost everything you ever wanted to know about rigging a steam engine. :eek:

First a picture. I like pictures:

Some things to note:

The wheel connecting rods on any x-6-x steam loco MUST be in two bits to allow the wheels to move in the Z direction over uneven track, or it will bend.
The middle drive wheels do not have any flange - it would b****r the track and wheels totally!
The mid point of the piston stroke should point towards the centre of the driven wheel to which the con rod is connected, so you get even drive.
The two sides should be 90 degrees out of phase - remember steam cylinders are double action, effectively a “1 stroke” engine!

Here’s the blend file, I will answer any questions you may have. You should know from this how to rig any wheel combination and how to rig the body parts. I have included a curved bit of track. To drive the rig, simply move the “Empty-control” object (hint - it’s on one of the undisplayed layers) or just press Play to see it operating. The valve gear is pretty straight forward once you have got your head around this bit, so that’s your homework. :ba:

Enjoy! :smiley:

steamtrain.blend (1.28 MB)

Cheers, Clock.

PS. play close attention to bone parenting and driver values…

I have added a front double axle bogie to the rig so you can see how this is done. You can use the same principle to make your carriages, if you ever get around to this:

steamtrain.blend (1.49 MB)

You will notice that I have left the project is camera view with the camera parented to the control empty, this shows the movement better. There are “spring” bones included in the model, although I have not built these into the animation, this would entail more work and more controls, but it can be done if you want to go this far. The principle is to animate the scaling factors of the springs as they go over track irregularities.

Cheers Clock.

Brother frankly saying after this I came to know that my knowledge about rigging in completely zero. I am now headed to YouTube to see tutorials based on basics (If you can point me to some tutorials or teach me that will be great! :o )

But I couldnt get the wheels to move… when I pressed play all that moved was the empty… (along with the camera in the second one)…
[P.S I know this must sound amazingly annoyingly stupid but… I am a noob right away so I am stupid :D]

In the meantime… remember the link to the tutorial I posted… I’ve finally got that to work. And I would like you to take a look…

Engine wheels mk 3_fixed.blend (1.26 MB)

Now apart from being an idiot and looking at such good piece of work that u sent me. I’ve got a few questions…

Q1. How do I join my main engine mesh to these rigs? (mine and urs both) And how can I get them to rotate with my wheels? (I was using this tutorial about drivers… https://www.youtube.com/watch?v=2IKJzyFF-Ro which doesnt seem to work entirely with the current rigs… I can get the wheels to rotate but I cant move them along the engine)

Q2. This train is going in a game… Just to be sure, is what I am doing right??

Q3. (This isn’t related to rigging but I thought I might ask right away)
The windows I am making for my engine and compartments ( the glass) looks way more realistic and good in Blender render than in Cycles render. But in order to texture the engine I have to use cycles… Which messes up my windows… Any idea how can I use them both?? Or I’ll have to stick to one??

Thanks a lot for ur help bro…

First thing and this is just a quick reply as I am knackered after a long day flying my glider, you need to check “Auto-run Python Scripts” in User Prefs > File tab to get scripted expressions in drivers to work - do that and the rig will work, in the meantime I will address your other questions tomorrow.

There are many threads here with sample Glass materials in them - just do a search - Cycles glass is not too hard, if you are still struggling with it, let me know and I will post a blend file with some glass in it. The important thing to glass is that you must give the window some depth or solidity - flat planes are no good. Stick to Cycles - there are many more possibilities, but you have to do a bit more with the lighting, etc. but that is for another day.

Cheers, Clock.

PS. We all have to learn and I am still learning, so don’t beat yourself up over this, you are not stupid or you would not have asked for help.

PPS Beware of Youtube tutorials some are good some are… well I could not possibly comment. Try www.CGCookie.com

Hi first up sorry for replying so late(this project has got me a lot of school assignments pending) I tried that and the rig works like a charm… I started looking into the rig and I think I am starting to get the knack of it… I’ll try to copy this rig on my own set of wheels…

So I got the problem with the windows fixed and now my engine mesh is ready… I just now need to know how do I connect the engine to this rig and get everything moving in sync…

Thanks again

I think I have a bone in the rig called “body” - it’s the one that the cylinders are parented to, just parent your body mesh to the same bone “With Empty Groups” then assign all the vertices to this group in the vertex group panel.

Cheers, Clock.

I couldn’t find that bone… BTW can u explain me how u made the wire type stuff where u have the two bones( the thing has stuff like piston lu etc) and check out the rig I made… how can I make the same wire type thing for my rig??

My machine is tied up rendering just now so I will take a look tomorrow.

Cheers, Clock.

Aha. I have to take a look at how this works. :smiley:

Edit: hey clicking Play just moves the camera backwards and forwards along the track. Train no move. What am I missing?

The middle drive wheels do not have any flange - it would b****r the track and wheels totally!
Are all the UK ones done like that? Over here most steam locos had flanges on all driving wheels, although there were a few odd exceptions.

The valve gear is pretty straight forward once you have got your head around this bit, so that’s your homework. :ba:
I may have to have a go at doing three cylinder Walschaert’s sometime, just for something pretty straightforward.

@Gumboots - just check “Auto-run Python Scripts” in User Preferences > File Tab otherwise all the scripted expression drivers don’t work…

x-6-x locos with flanges on all wheels have a very restricted turning circle, so would be impractical on our railways, as they essentially only go on straight or near-straight lines.

Cheers, Clock.

Hmm. Never used 0-x-0 over here, except for shunting. No good on our tracks without a leading truck. They tried some in the early days and quickly changed their minds.

Anyway I’ll check that option and have another look tomorrow. I’m tempted to do a basic rigging of the Schools class model just to check some things out. Also have an AD60 Garratt stewing in the pot, which could look rather cool if it ever got rigged.

Hmm I said x-6-x, that could be a 4-6-4 or 4-6-2 or 2-6-4 or 2-6-2 or 0-6-0, which where only for low speed work.

AD60 that’s the 4-8-4+4-8-4 double loco isn’t it - he said not wishing to be labelled a “Train Spotter”

Cheers, Clock.


The bone to parent your mesh to is called “root”

For the “wire type” thing I presume you mean the armature display, which is set to “Stick” not “Octahedral” on the Armature panel.

For the wheels to rotate as the train moves forward, you need a location-conditional driver like in my blend file, or they won’t work properly, you CANNOT keyframe the rotation and move the engine at the same time - it does not sync properly.

Cheers, Clock.

My bad. I assumed 0-x-0. Anyway point still stands: just about every loco over this way had flanges on all drivers.

AD60 that’s the 4-8-4+4-8-4 double loco isn’t it - he said not wishing to be labelled a “Train Spotter”

Cheers, Clock.
Yup. That’s the one. They used to double head them to bring the ore trains from Broken Hill up over the range. Totally beastie, in a very good way.

Check this out:

There’s a rigging project for you!

Cheers, Clock.

Yes I’d already seen that one.

Having rigged “more-than quite-a-few” reciprocating-steam models in my day, let me also point out that every model ought to be “purposed for the shot.”

Not(!): "equipped with every possible real-world-equivalent doodad, “just in case” an actual shot in the show “might” use it.

When you are blocking-out your show and figuring out where the locomotive ought to be viewed for maximum dramatic effect, you may as well use a box. Or, a very roughed-out, vaguely train-like shape that is “to scale.” If a detail is never actually going to wind up in front of the popcorn-eater’s nose, you don’t need to model it, except as a purely academic exercise.

It is much faster and more time-efficient to work out … and then, to commit to(!) … exactly what the shot-sequence will be, and then to implement precisely what is the minimum necessary to pull-off those shots. (Right down to: “if no one will see the right side of this engine, it doesn’t even need to exist.”)