Driving custom attribute with rotation from a bone in an IK?


#1

Hullo,

looking for a bit of advice. I’m (trying to) rig a model of a skeleton with the muscles on it. the muscles have to bulge as the skeleton moves. so bicep flexes and bulges as the arm bones bend.
now i know what your thinking

“why doesn’t this stupid fucker use morph targets” but i cant, the engine the skeleton is going into doesn’t support them…

So far i have a simple set up of bones that i can skin each muscle to, in order to control bulging… i linked these to a custom attribute (flaot 0 - 100) with the Reaction Manager. That was fine… every thing was dandy… i was feeling quite pleased with myself.

Then I tested to see if the bones rotation could drive the custom attribute(and make the muscle bulge). It could!! fantastic… so i added a HI IK solver… and it stopped working …
:banghead:

I cant seem to get the reaction manager to see the rotations in the IK bones. i tried linking it to all of the different rotation i could see… but nothing seemed to be changing…

I also tried orientation constraining a point helper to the bone and trying to use its rotation in the Reaction manager… but no… couldn’t get that working either.

I would really appreciate some help, can any one suggest a different way of doing this? i looked at using wire parameters but i thought that it would just be messy…i also have fuck all programming experience…
or can any one explain why the reaction manager doesn’t see the rotation in the IK bones… or orientation constraints…is there a way around that?

I’v had a goolge already and couldn’t find anything… would really appreciate some help.

cheers
-Pearse


#2

Hello,

Here’s something to check: create a basic three bone FK chain (third bone is the end bone) and select the second bone in the chain and in the Motion tab of the Command panel look at the individual rotational values, then change the rotation of the bone and check again - you’ll see the values change in the particular axis that you’ve rotated the bone.

Now reset the orientations of the bones in the chain and apply an IK solver, again check the rotations of the second bone, reposition the IK goal and again check the rotations of the bone - this time they haven’t changed.

The reason they change the first time is because the bone’s transforms (in particular its rotations) are relative to its parent space, however when you apply IK it creates a kind of parent space which controls the positions and rotations of the bones in the chain so when you reposition the IK goal or adjust the swivel angle the bones themselves are not being transformed, the parent space is.

So to answer you’re question, you need to use an ExposeTm helper which will allow you to extract the local rotations of the lower arm bone relative to its parent, the upper arm. You can use these values in Reaction Manager.

If you create an ExposeTm helper, you’ll see at the top there’s a section with two pick buttons with labels “Expose Node:” and “Local Refernece Node:” you want to expose the local transforms of the lower arm and use the upper arm as the local reference, but you’ll notice that the pick buttons are greyed out, for some reason you need to switch from the Create tab to the Modify tab for the pick buttons to be enabled. Once you’ve chosen the relative scene objects the values will be displayed below in the Exposed Values rollout.

Hope this helps,
-Harry


#3

That was exactly what I was looking for!

I gave that a shot and it worked great. thanks for taking the time to help me out Harry. you saved me a lot of time (and tears :stuck_out_tongue: )

thanks again
-Pearse


#4

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.