Jump to content

How Extract Transform Of A Ik Bone


Recommended Posts

hi again,

first I better describe what I want to do: I have a arm and want a finer distribution of the twist (z-axis)

of the upper arm to get a smoother deformation of the shoulder. the setup should look something like this: a normal ikfk arm and a 5 bone chain with the first bone getting it's rotation values from x and y channels of the fkik chain, the twist (z) is equaly distributed over the complete chain so the first bone has 1/5 and the last bone has the same global rotation as the ikfk chain.

so far so good, but it's surprisingly. first I could not extract the channels directly cause the rotation values are not updated by the ikfk chop so I tried the obj-fetch operater but mhh i could not get hold of the extracted transform I could 'only' parent under this, giving me the full rotation but not a way to divide the z rotation over the chain. next thing I tried to directly modify and export the rotation values in the chop context of the ikfk chop to my new objects and after adjusting the rotation order it worked but not so stable ( most of the time if something does not work stable I missed something) sometimes I have to rechange the rotation order to let the object snap back into alignment.

next thing I tried was to use bones instead of null so I could be sure my target has the same behavior like the bone ( strange that the bones do not have a changeable rotation order) so I exported the rx and ry channels to the other bones leaving out the rz to see if this works predictable I'm still checking it out.

What what You do to get the desired behavior described at the top?

martin

Link to comment
Share on other sites

Here's a solution from my past experience.

You're trying to mimick the deltoid muscle which at it's base doesn't get much Z rotation on Top_Arm_bone, but where it attaches to the humerus should get around 100% Z rotation.

Your 5 little deltoid helper bones need to have kinematics and be pointing towards the elbow.

Parent a null to the Top_Arm_bone that will be used as the twist affector for the 5 deltoid helper bones. It should be at the elbow area and translated outwards in Y.

In the KIN_Chops, copy&paste your first deltoid bone's Kinematic Solver. Kin solver 1 has no Twist Affector. Kin solver 2 has a twist affector pointing to that elbow null. Comp those two solvers together. In the Effect parameter, set to 1/5. Set to 2/5 for the second deltoid bone etc....

Make sure your to update the Kinematic Solver path in the deltoid bone.

The beauty of this solution is that it will work for both IK and FK arm solutions!

If you're confused, I can post an attachment.

Jim

Link to comment
Share on other sites

I tried it and it works, thanks. just to be sure You use inverse kinematics on the deltoid helper bones?

and one other question comes into my mind: for this setup ( arm ikfk and 5 helperbones) I have to start 10 ik solutions, isn't this quite heavy.

anyway it works

but a attachment would be nice to be sure if I got it right?

martin

Link to comment
Share on other sites

had to clean it up a little bit. two solutions are inside, but both have are not flawless, they flip, arghhh <_<

I'm not sure if the first one is the one intended by Jim Su

but on the other side for a arm it may be sufficient, cause nobody I know can do this voluntarily

cheers martin

PS: I can not upload, I get this error message when I try to upload:

THE FOLLOWING ERROR(S) WERE FOUND

The requested file upload failed because suitable permissions have not been enabled on the 'uploads' directory. Please contact the board administrator and inform them of this error.

You can grab the file here:

http://www.booyabase.de/downloads/upperarm..._with_flaws.rar

Link to comment
Share on other sites

Here's the file:

deltoidMuscle.hipnc

Yes unfortunately the bone is flipping. I will have to eat my words. I vaguely remember what I did to fix it, so I'll post an attachment later.

The reason why you would want five bones (kind of overkill) is to preserve volume when weighting it.

If you do a straight forward deltoid bone IK with no twist, you can wieght that area pretty well, but may see some volume loss.

Jim

As a side note: No one has answered your question of extracting the local rotate Z of an IK Bone. I'm sure you can, Edward????. Back when I was using old Softimage, the rotation channels update in an IK bone, so it was pretty easy to take another bone and reference rotX * .5 for example (Softimage's X and Z are opposite of Houdini). The problem was at some point, the helper bone would gimbal flip as well. So the only solution was to what I just recommended, to point a deltoid bone at the arm bone so that it has independant twist rotation.

Link to comment
Share on other sites

I found a way to extract the ikfk solution values. I used a fetch chop, pointed it to the kinematic solver and changed Fetch to "CHOP Data Channels".

A example is in the file I uploaded. But nevertheless I'm very interested in other solutions.

I'm not sure if the flipping in ik mode can be avoided, cause of it's nature but in fk mode I managed to get rid of the flipping.

martin

Link to comment
Share on other sites

I modified the solution so now it doesn't flip.

The two deltoid solvers both have Twist Affectors. One is parented to the Arm, the other isn't.

The deltoid is parented to the Arm bone.

This solution adresses these scenerios:

- Arm IK = 0.

- Arm IK = 1 , Elbow Twist = 0

- Arm IK = 1 , Elbow Twist = 1

deltoidMuscle2.hipnc

Jim

Link to comment
Share on other sites

Pure IK-only flipping generally only occurs around the IK critical zones which are based from the IK rest positions. To see those, hit 'd' with your mouse in the viewport to bring up the viewer display options. On the bottom row of icons, around the right side there should be a button to toggle it on. One rigging technique is switch into IK Rest mode (from top menu Settings > Objects > IK Rest) and then use the IK rotate handles to adjust the bone chain (ie. use Pose handle and then hit 'r'). One usually wants to adjust the bone chain such that the IK critical reason is "hard to reach" (like inside the characters body for example). When done, switch back the object settings to None.

Link to comment
Share on other sites

hi Jim,

cool. But IK mode does flip, too. i guess there is no way to prevent this.

martin

Really? I can't find where the deltoid flips. Even when the arm goes to the critical zone, the deltoid still acts fine.

Jim

Link to comment
Share on other sites

may be I'm using it wrong, but when I change the deltaoid blend to 0.25 it and rotate it in ik mode with the twist handle it flips. so I thought if You add more bones for a more evenly distributed effect this should be visible. I think it is not visible when the blend is at 0.5. but as stated at the beginning I'm not sure if I modify something that should not be modified.

I tried it in an other package (xsi) there it works different, I guess the calculate the ik solution quite different but normaly You won't turn a arm this far

martin

Really? I can't find where the deltoid flips. Even when the arm goes to the critical zone, the deltoid still acts fine.

Jim

Link to comment
Share on other sites

may be I'm using it wrong, but when I change the deltaoid blend to 0.25 it and rotate it in ik mode with the twist handle it flips. so I thought if You add more bones for a more evenly distributed effect this should be visible. I think it is not visible when the blend is at 0.5. but as stated at the beginning I'm not sure if I modify something that should not be modified.

I tried it in an other package (xsi) there it works different, I guess the calculate the ik solution quite different but normaly You won't turn a arm this far

martin

I see what you mean.

Did your fetch solution work? I'm interested in trying it out. Flip free in IK mode?

Jim

Link to comment
Share on other sites

actually I found the right button now,hehe. but I'm still fiddeling around. For example if it is animated it works, but if You are changing the twist interactive it flips, mhhh.

EDIT: If it is keyed it does not flip, only in interactive mode it does, and I guess it does not know what way the twist object took to reach the current position

my ikchop has now this settings:

ikchop.gif

by the way, does anybody know what exactly start and end values mean, the help file is quite brief about this:

Start: The start position of the CHOP.

End : The end position of the CHOP.

here is the file with the working solution:

upperarmtwist.rar

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...