Rigging a strandbeest leg

Hello.

I am totally confused as to how to rig this model of a Strandbeest.

There is a central crankshaft to which legs are attached using two rods (upper, lower). As the crankshaft rotates, the rods move and drive the knee rotation/foot rotation. The crankshaft and leg pivot hole maintain relative positions.

I’m struggling to figure out how to rig this however. I was going to use an IK chain to control the overall leg movement, but I am not sure how to ensure relative distances remain the same for other bones. I’m not sure how to go about this - I did look at some tutorials but the usual ones focus on things like pistons which are parented separately. Here all the sections of the leg are connected, but rotate independently (or are fixed at one end, etc.). It’s melting by brain a little, so any advice would be appreciated.

Perhaps looking at the actual movement would help you.

October | 2015 | Stuff I do in English Class

I’m working from a model, so I have been looking at the movement. It’s not the motion I find hard to understand, but how to set up bones in Blender so they retain relative distances. I remember seeing a rig of something similar (i.e. two independent chains in the leg converging into a single foot), but now can’t find the video anywhere, which is annoying.

I keep thinking that the rig should look something like this …

… but this isn’t going to work (cyclical bones etc.).

So I found this old video which seems to be on to something:

However, when I try to do similar in Blender 3.5 it doesn’t seem to work. Did old Blender let you have tri/bifurcate bones? I can’t seem to get a configuration where rotation of the bones will move the entire armature, and when I try to connect bones it will disconnect others at these multi-joints. I suppose if I kept adding control joints and parenting the right way?

(Note in the image the bones are not parented to the mesh, but the mesh is shown to make it clearer which joints are not moving together)

Here’s what I made from @RSEhlers gif:

Hierarchy is displayed in outliner. All IK constraints are 2 bones long. IK targets for them should be fairly obvious. Bones with names like “…NoRot” have inherit rotation disabled. Rest pose matches the reference; it’s posed to indicate that it does follow the curve described. Some bones are superfluous (like, staticIKT could as easily be the root, and we could discard root and rootChild.)

Not sure if that’s a perfect analogue for your device. I went from the image because that made it easy to make. This technique, of using multiple IK chains targeting bones in other chains, is very common in mechanical rigging.

Edit: Here’s the same thing, but without superfluous bones:

That might be easier to understand, because it’s simpler; it might be harder to understand, because it’s a heavily streamlined conception of the device. Notice that anything that is a triangle is essentially static: you can’t change the angles without changing lengths. So all the triangles can disappear. They’re fully defined by even a single arm of the triangle.

3 Likes

Looks good - I will try this setup tomorrow.

I managed to get something working, but it has problems of bones “popping” if you right click out of rotating the crankshaft. I’ll post here in case it is of interest to anyone.

It’s a bit of a bodge. The basic setup is:

  1. Create empty on the crankshaft and parent to the crankshaft.
  2. Upper leg rod and Lower leg rod - add Copy Location constraint to each and target = crankshaft empty.
  3. Create empty at fixed pivot point (called C1).
  4. Create empty at inside knee joint (C2). Create an empty at the knee joint.
  5. Create leg bones
  6. C1 bones get IK solver, target = C1. C2 Bone is the same, but target is C2
  7. Align Empty bone - IK solver, target = knee empty
  8. Parent foot C2 empty to “C1 below” bone.
  9. Parent “align empty bone” to “Knee upper”
  10. Check if it works and parent any broken links as required.

Here was my attempt. Similar to @bandages, just a different orientation of one of the IK ‘arms’.

Strandbeest.blend (977.7 KB)

Be careful of dependency loops. You can easily end up with a rig that looks decent until you go to render it, at which point it stops working. You can check for dependency loops by looking for "dependency cycle warning"s in the console (on Win, Window->Toggle System Console).

1 Like

I’m trying to implement this, but I am running into a couple of issues (due to my lack of understanding of rigging - e.g. I’m not sure how you made that path for the foot).


I think I have replicated the set up correctly, but I am not sure how to now parent the ctrl bone to the crankshaft. I tried using a copy location / copy rotation bone constraint (to the crankshaft centreline), but this messes up the armature completely (doesn’t matter if you turn off y axis, etc.). Locking the X axis helps a little but the alignment is still off in pose mode (although it’s fine in edit mode?).

[edit] It also seems that maintaining relative distance between ik4B.001 and staticIKT is also not working properly for some reason in my version.


I used to think I understood the basics of rigging/animation but I can’t figure out how I would adapt this so it works without keyframes.

What I am hoping for is being able to link the entire mesh to an empty so that it walks properly. There are also gears that need to work in conjunction with the legs which I am dreading trying to set up.

Some sort of arrangement using drivers would do the job.

Keep the various components working the way that they currently do. So this ‘leg’ would be controlled via the exisiting control bone rotation.
Your other components would also function in a self-contained manner (or maybe one of the gears would drive the rotation on the control bone for the leg).

Then you can use your empty as a master controller object. Use a driver to map some aspect of the empty’s motion to the rotation of the leg controller.

The motion path of the tip of the leg on the ground can give you the ‘speed’ of the empty’s movement.
(That path isn’t controlling the foot, it’s a motion path that’s tracking the end of the foot)

Here’s a version where the x-pos of an empty is driving the rotation of the control bone. The whole armature is also following the x position of the empty.

There’s a tiny bit of slipping on the foot. A bit of adjustment to the keyframe values for the driver would help with that. The motion path of the foot when it’s on the ground isn’t entirely linear, so it’s not totally smooth with this quick setup of the driver.

Strandbeest.blend (992.3 KB)

1 Like

Thanks for this. I feel like I am so close now to having this work…

I spent some trying to recreate this setup but when I copy the settings on a new armature I keep getting issues with the armature changing position in pose/edit/object mode. Is there a way to fix this? Everything seems fine when creating the armature, but as soon as you start adding drivers and constraints everything starts moving around (without actually playing or moving anything else). So as in the image, as soon as I add the driver the armature moves - is there a way to move it back?

I don’t really understand this setup I must admit. e.g. I copied the driver settings across to the new bone with a new empty. If I set the driver to the new empty it doesn’t work, but it works with the original empty in the file. Weirdly, I used the driver settings to animate the crankshaft; if I use the original empty it doesn’t move with the armature, but it does work if I use the new empty. :person_facepalming:

I guess it might just be easier to upload the file at this point, as maybe there is some setting I am totally missing?

Strandbeest_Leg.blend (2.2 MB)

Get the 2D working first.

Once you get the 2D working, there is something you should do to the “noRot” bones for full use. Parent these to the same parent as Ctrl, and give them a copy location constraint targeting the tail of Ctrl. Then re-enable “inherit rotation” on them.

Ctrl can be parented to whatever.

Is it parented to IK1B? It should be.

I managed to get it working (I think) - I missed a parented bone somewhere (I just rebuilt it and it worked).

However, I can’t seem to add bone constraints at all to the ctrl bone - as soon as I pick a target object, the armature deforms significantly. I’ve checked the objects - rotation, scale, etc. is all reset.

Any thoughts on why it would do this?

It’s going to have something to do with the details of your constraints. If you give me a file that isn’t working right, I’ll look at it.

1 Like

Ok, thanks - file below. The leg meshes are not parented to any bones, but I have kept it in so it is easier to refer for the movement etc.

Strandbeest_LegTroubleshoot.blend (3.2 MB)

Good demonstration of why I prefer octohedral view to stick view :slight_smile:

Turn it to octohedral and look again:

Ctrl bone is backwards. If you rotate about cursor, it’ll be fine, but if you damped track something, it’s rotating about the wrong origin.

You also forgot to set the chain length on your IK constraints, meaning that it’s fully of dependency loops which makes everything crazy (even without constraints on ctrl.) Set the chain length to 2 for all IK constraints.

Thanks! It’s working now :slight_smile: I fixed the rotation of that bone, and also the IK chain lengths.

To get the legs to rotate with the crankshaft I added an empty at the centerline of the shaft and also at the position where the rods connect. I parented these both to the crankshaft.

I then added a Copy Location (Y axis turned off, target = rod position empty) to the Ctrl, upper rod (IK1A_noRot), and lower rod bones (IK3A_noRot). Now the rods follow the correct positions as the crankshaft spins. The ctrl bone and rod bones do separate during the cycle but the meshes stay in the correct positions.