Page 1 of 1

mechanical rigging

Posted: 18 May 2011, 14:39
by druitre
Hi,

how to make a kinematic chain to control a mechanical setup like this (this is a very very simple example) with IK? (for example, the base can rotate 360 around Y, the arm +180 degrees around Z)
simple mechanical setup
simple mechanical setup
ScreenShot001.jpg (10.22 KiB) Viewed 2760 times
I thought this would be real easy... am I overlooking something obvious? I've tried all kinds of stuff with bones, rotation limits & constraints but I'm not getting anywhere. Mainly, I cannot get the bones to be restricted to just one axis - no matter what, if I pull the effector to the left or right, the base will be pulled off it's Y-up axis.

help really appreciated!

Re: mechanical rigging

Posted: 18 May 2011, 19:27
by Memag
-Make a bone and make it a parent of your base object.
-Make a null (orange arrow) and make it up-vector of the bone.
-Direction constrain mechanic hand to null .

Move the null (up vector-direction).

Image

Image

There is a turret constraint in ICE Kinematics menu. Try that as well.

Re: mechanical rigging

Posted: 18 May 2011, 23:26
by druitre
Memag, thanks!

My next question was going to be: now how to tackle it if the chain is longer- say, add a 'lower arm' and a 'hand'. But instead I tried it myself, and came up with this:
notes
notes
mech_rig.jpg (98.25 KiB) Viewed 2732 times
mechrig.gif
mechrig.gif (101.37 KiB) Viewed 2732 times
Basically, it's a chain of poseconstrained nulls, each one acting as direction constraint for each successive limb down the robot's chain. And then the last null (the root of the chain of nulls) has it's direction constrained back to the origin of rotation for the entire robot (with an upvector).

Although it looks like it's working, it's also quite prone to errors, the axes of rotation sometimes get lost for some reason - the nulls absolutely have to stay aligned perfectly in the Z for it to work.

If there is another way for doing this, I'm still open for it! This one's a simple rig, but doing this for a complex robot?

Re: mechanical rigging

Posted: 19 May 2011, 01:45
by Memag
Use 2d bone chains or parenting, I don't think piling constrains upon constraint will be any more efficient.
There are many ways to approach this.

Maybe this can give you some (bad) ideas. Teleport ball and hard working robot arm.

Image

Re: mechanical rigging

Posted: 19 May 2011, 14:46
by druitre
Hi Memag,

that's exactly what made me start a thread in the first place: if I could do this with 2D bonechains, I would. But HOW do you keep the first bone restricted on just Y-axis rotation and the next three restricted on just Z-axis? Can you give me that scene as an example perhaps? It may very well be a simple thing, but I'm just not seeing it - for five days now. It drives me crazy!

Re: mechanical rigging

Posted: 19 May 2011, 15:31
by Memag
druitre wrote:Hi Memag,

that's exactly what made me start a thread in the first place: if I could do this with 2D bonechains, I would. But HOW do you keep the first bone restricted on just Y-axis rotation and the next three restricted on just Z-axis? Can you give me that scene as an example perhaps? It may very well be a simple thing, but I'm just not seeing it - for five days now. It drives me crazy!
There are two chains in this example.

First chain is made of 1 bone (vertical) which rotates the base. This chain has an up-vector (orange null).

Second chain is made of 3 bones (horizontal).
The root of this chain is child of first chain end effector. So it always rotates with the base.
The end effector of this chain is position constrained to orange null.


There were many threads on xsi base about mechanic rigging, with scene files and examples.
I'm not sure if this is unbreakable rig, but at least it might help you.
robot turret rig.rar
(87.42 KiB) Downloaded 132 times

Re: mechanical rigging

Posted: 19 May 2011, 15:53
by druitre
Thanks, I'll have a look and get back (just trying out ICEconstraints at the moment - could be nice too, but since it's the first time I'm looking at those I'm not expecting immediate results).

Searching XSIbase has never been good to me, the search function there either gives me no results at all or hundreds of non-related results in such a way that it's very hard to sift through them. The few threads on this subject that I could find were very short and offered nothing of practical value, just some general remarks and dead links to tutorials that, when I could find them, were too general as well. So, thanks again for your help!

Re: mechanical rigging

Posted: 19 May 2011, 16:11
by Memag
Here's a thread with code for Manny's robot rig solution

Also, pose constraint objects to your rig bones, don't parent them as I did in the example scene. Much more control.

Re: mechanical rigging

Posted: 19 May 2011, 17:49
by druitre
Aha, I had a look and I see I never thought of parenting a second chain's root to the effector of the first one and then linking the effector of the second chain to the upvector of the first chain. This way it keeps all rotations for the second chain in one single plane, right?

Still enough to try out on this one, but anyway thanks a lot (again) :)

(I also checked Manny's example, it is just an expression on the effector to keep it's local Z pos at 0. Might be enough in some cases.)

Re: mechanical rigging

Posted: 19 May 2011, 17:52
by Memag
druitre wrote:Aha, I had a look and I see I never thought of parenting a second chain's root to the effector of the first one and then linking the effector of the second chain to the upvector of the first chain. This way it keeps all rotations for the second chain in one single plane, right?

Still enough to try out on this one, but anyway thanks a lot (again) :)

(I also checked Manny's example, it is just an expression on the effector to keep it's local Z pos at 0. Might be enough in some cases.)
Right. Glad I could help.
Cheers!