mechanical rigging like this one.

I was looking for a way on how to rig (IK) mechanical things in blender and I couldn’t find one. but I found this tutorial on maya (i guess it’s maya) that is like what I was looking for.

so, is someone there that would love to volunteer in making this one??

I actually want to imitate the “orientation constraint” or something to blender. if drivers can do it, I’m pretty sure it’s going to be somehow difficult.

I’ll be kind enough to upload a file with mechanical stuffs, IK bones minus the missing constraint(s).

robot_rig_experiment_c.blend (465 KB)

Hey eiji_11,

I ddin’t look at the whole tutorial, and maybe It does something more than what I saw… but here is a setup that will can off match this spider leg. The orientation constraint that I use is one the bone.005 and it’s a locktrack… in the help this constraint is well explain with an ilustration of a compas. it’s only rotating along one axis.

hope you like it!

Mathias.

Attachments

SPIDER_LEG.blend (421 KB)

Sorry, I notice that he had the control of the rotation of the bottom leg, so I added that on this one!

Mathias.

Attachments

SPIDER_LEG02.blend (426 KB)

thanks mathias, just like what I need.

ldh1109, I’ve seen that tutorial. it was useful but it wasn’t set as IK. thanks, though.

shouldn’t make a difference. The pistons at the start still work the same. Might need to give it some limitation of rotation though (in the Inverse Kinematics panel in the bone properties)

I’d like to jump in here and say “Thanks!” as well, Mathias. This is a problem I’ve been working on for quite some time on my own and, seeing no sample rigs that came close, had pretty much given up.

I’m grateful to find there’s a solution. May you live a thousand years.

there’s a difference. I’m actually interested in the “shoulder” or “hip” part (the one holding the whole arm/leg). the way that thing interacts with the movement of the IK chain.

Since with an IK chain you can set/limit rotation for any bone, or give it any other behavior, I don’t see why Jonathan Williamson’s piston rig cannot be used.
The piston rig is only driven by the rotation of the main bone (to which the piston is attached). Qith or without IK.

But if you’re saying you’re not really interested in a piston rig, then that’s another issue

yes, I’m not that interested with the pistons. just the arm and its mechanical joints.

here, try fixing this mechanical arm rig using IK.

I’m still trying to figure out how to set it up like what mathias did.

Attachments

robot_rig_experiment_d.blend (513 KB)

Hi Mathias,

I noticed in your sample file that all meshes are attached to bones using the ChildOf constraint instead of parent/child relationships. I’m fairly new to rigging, so I don’t understand why you did things this way. I hope you don’t mind if I ask a couple of questions:

Is there a difference between the two methods?

If so, what’s the advantage of doing it this way?

Also, I don’t understand the function of Bone.007; what does it do?

the childOf has influence attribute (0.0 to 1.0) where if it is 1, full control and 0 for no control.

Blenderwiki states about ChildOfConstraints “But don’t try to use it to define chains of bones”. Unfortunately it doesn’t say why exactly.

I guess if the parent child relationship isn’t going to change, it might be more save to just use normal parent child relationship

EDIT:
is definitely a pain to set up a chain with ChildOf Constraints…

hey rontarrant.

I did it this way because it’s the fastest. there is several way to have the object link to a bone.
the parent in the object relationship
the parent constrain
armature weight everything at 1

I use the second one because it allows to have set inverse, which means that your object is going to stay the way it is when you parent it, after clicking on set inverse.

The best way is the first one, but in order not to have any prob you need your object to be exactly aligned (position and rotation) with the bone. And for this example I didn’t want to spend too much time. But I would if it’s something I’m working one.

Mathias.

Thanks mathiasA, Sago and eiji_11! I think I get it now. If I were recreating this rig to use in an animation, I should do it with Ctrl-P and select Bone, right?

Also, I’m still mystified by Bone.007; it doesn’t seem to have any affect on anything.

@eiji_11

if you move it, you will see that the leg target it… however he is not made to be move by itself, it is bone.oo4 that controls it. bone.007 is the real ik target. but to manipulate it, I use another controler which is bone.oo4.

If I were recreating this rig to use in an animation, I should do it with Ctrl-P and select Bone, right?

yes, but I don’t know if it’s me, when I do it, my mesh always flip and it’s not that easy to put it back.

Of course. I forgot about the IK target. Thanks.

Does it still do that if you Object -> Apply (Ctrl-A) -> Rotation & Scale?

I realize the above statement may be like teaching memorization skills to Olivier, or teaching Picasso how to sharpen a pencil, but…

Well, that’s the beauty of 3D is that there is so much to learn that everyone can learn from anyone else! it sounds like “Anyone can cook!” lol… one of the best 3d animation ever made!

Well in fact I was doing something stupid… I keep on parenting to the armature and then chose the bone in the object window and that’s where my object always moved. When you do Ctrl+P and you choose bone, it stays where it is… :slight_smile: thanks rontarrant!

Mathias.

You’re welcome, sir. Glad I could at least shake up your thinking. :slight_smile:

Didn’t look at mathias’ rig, but I did look at yours. I’ll briefly describe how I’d do it.

First 2 basic things. In armature panel, under display, turn on x-ray so you can see what you are doing. In object mode, 3d window, select the armature and move it to the object layer right below the layer it is on. Now you can see your rig & can control the which is visible via object layers, makes life easy.

Next, fix the mesh objects. Turn on only the mesh layer, select the shoulders mesh, look in the object panel, under relations - basically, I’m not sure what it’s parented to. In the 3d view, alt-p -> clear and keep transform to clear it’s parent.

@ mathias, rontarrant & sago - not sure about this area - the relations panel, parent field… anyone understand this? I think it’s new since the last time I rigged… I’ve always just selected the mesh, shift selected the armature, enter pose mode, select the bone, ctrl-p -> to bone for mechanical rigging. Anyhow, if someone understands it and could explain it to me, it’d save me time…

Back on track, with the shoulder mesh selected, enable the rig layer, shift-select the rig, enter pose mode, select the shoulder bone, ctrl-p -> to bone.

Note to others: if I did the above step thru the relations panel, the mesh would jump around. Could be because of the improper previous parent/child relation, dunno, but I think this is what mathias was expirencing. Could be a bug in 2.62 official that I am using…

Now there is an issue with the hand, cover that later, let’s move on to setting up the bones. Enable both the rig & mesh object layers so we can see everything. Select the upper arm bone in edit mode and go to the bones panel. Set it’s parent to be shoulder and check connected. Now we have a connected chain of 3 bones, let’s fix the constraint & limit things.

In pose mode, select the lower arm bone. In the bone constraints panel, set the ik constraint’s chain len to 3. A yellow line will go from the lower arm bone to the root of the shoulder bone showing use what it influences. Select the shoulder bone and look at it, looks like we only want to allow it to rotate on it’s y-axis. In the bones panel, find the inverse kinematics panel and open it if it’s closed. You’ll see some boxes with lock icons for each axis. Click to lock the x & z axis. Look at the upper arm bone, looks like it can only rotate on z-axis, so lock x & y axis. On to the lower arm bone, looks like it can only rotate on it’s x-axis, so lock the others.

Try it out, it might flip around a bit. Two reasons for this, you need a pole target for the ik, or you need to limit rotations of bones that we didn’t lock axis for. You can limit rotations just like you locked rotations, in that same panel.

To fix up the hand, I would extrude a new bone from the lower arm bone, parent the hand mesh to the bone, and add a copy rot constraint to it, targeting the ik controller. You could parent the hand mesh to the ik controller, but since you can pull the controller away from the arm, that won’t look right…

Excuse me, it’s late…
Randy