View Full Version : Need help w/ slider from IK to Inherit end EXP

12 December 2005, 11:58 PM
I have an IK rig for a hand and I want to alternate between the IK and the inherit end expressions.

As it stands now, I have a slider for a keyfader to turn the IK on and off but I can't figure out how to use that same slider to add back in an inherit end expression. I wan't to use the same slider to toggle back and forth.

Anyone have any advise for this?

I have heard that you can use expression names for values within an expression, but I have never done it. If that is the probable solution, could someone explain it to me?

Thanks a million.

If you need some context for what I am doing, think of the hand (thing) in the Adam's family for the IK system, and then pretend it can be attached to a biped rig's arm to act like a regular hand as well. I have a dynamic parent system so the hand can detatch from the body at any time and take off running or whatever. I just want the left and right hand rigs to match while it's attached to the character.

12 December 2005, 02:49 AM
it should be as simple as dumping the slider:xpos into the last value of InheritEnd.

i.e.: InheritEnd(Bone1,Bone5,Motion,[Slider:Xpos])


12 December 2005, 02:59 PM
Hey Joe, good to hear from you.

Love the videos. I have all of them.

I totally understand what you are saying. Here's what I'm trying to figure out though:

At zero I want the slider to turn on inherit end and at 1 turn it off.

At one, I want IK and at zero turn it off.

Basically I want a flip flop.

Is there a particular number that I put in or a negative value or something that needs to be put in?

12 December 2005, 03:00 PM
One more thing.

As far as the order in the expressions list, and the BeforeIK/AfterIK buttons, what would be the right way to do this?

12 December 2005, 04:25 PM
you would use two cond() expressions, one opposite the other, then call their variable names
inside the expression. i.e:

condition1 (slider=1,1,0)
condition2 (slider!=1,0,1)
ikexpression( bone1, bone5,1, Condition1)

this basically says, when slider is at 1, condition1 says turn the IK on
when slider is not at 1, turn IK off.

same with inherit end, except it's looking at condition 2 instead, which is opposite.

before and after IK is like an override to the execution order of the list. if it's after IK, it will run through the before expressions first, then run through the Afters. Motion is dead last, even after effects.

clear as mud?


12 December 2005, 06:53 PM
The water is still a little murky, but not completely muddy. :)

Can I type in exactly what you have here and it work or is there something else I need to type in for the condition expressions?

12 December 2005, 12:24 AM
do a search for Cond() in the expressions list. it will explain the correct syntax.

example: Cond([Slider:xpos]!=1,0,1)


12 December 2005, 06:58 AM
That sounds like a plan. I will try it.

Have you been having problems with morph targets and bone effects not working together lately? What's up with that? Do you have a work around?

12 December 2005, 12:57 PM
I'm not sure if that's exactly what you're after, but if you just want a slider to turn one function on and another function off at the same, you could simply use "1-[slider:xpos]" for one of the two, which reverts the slider values.

12 December 2005, 02:52 PM
Maks, if that works, I think that is exactly what I was looking for and possibly a little simpler as well.


p.s. Have you been having problems using morphs and bones together in the newest messiah versions? I'm asking everyone this question to find out if I'm doing something wrong or if it's a bug. If it is a bug, that's a pretty huge one that needs to be fixed immediately.

12 December 2005, 03:55 PM
Maks, if that works, I think that is exactly what I was looking for and possibly a little simpler as well.

It works very well for a 1 to 0 switch, i use this all the time. Simple math: 1 - 0 = 1, 1 - 1 = 0 ;)

p.s. Have you been having problems using morphs and bones together in the newest messiah versions? I'm asking everyone this question to find out if I'm doing something wrong or if it's a bug. If it is a bug, that's a pretty huge one that needs to be fixed immediately.

There is no bug AFAIK. You have to click on the "Bone_Deform" effect, and in the "Target Object Options" tab select the correct target object in the pulldown menu if you have several objects deformed by the same bone deform effect, the one that has the morph blender effect applied, then check the "Use Pre-Deformed Points" option. That should do it.

12 December 2005, 02:48 AM
I knew about the "use predeformed points" part, but for some reason it hasn't been working since I updated to the last "animate".

However, I just upgraded to "workstation" and haven't tried it. Maybe all is well. I'll let you know.

Since I have both you and Joe talking with me right now, I might as well ask you both another question:

Based on the rig that I have been talking about (severed hand/attached hand) would you guys do a rig this way with the dynamics and all, or just do an object dissolve with two completely different rigs as needed? As it stands right now, you're not going to see the hand become dettached. It just appears dettached when the character's arm is revealed as a knub to the camera. The character then looks around for his missing hand and notices it running away. Prior to that, of course, it's business as usual with the hand attached.

Make sense?

What do you guys think?

12 December 2005, 06:05 AM
there's no reason you couldn't use one rigged model as a morph target. that might be better, considering the complexity of what you wish to do.

assuming that you want to do the FK to IK in one continuous scene. just duplicate your bone effect, hook one up to InheritEnd heirarchy, and the other up to IK heirarchy, then use the first mesh as a morph to the second.
sure, it doubles the geometry, but as long as the poses are similar, it will look normal.

sound like a crazy idea?

12 December 2005, 12:44 AM
Now, how would I morph from one to the next? There are no morph targets so I'm guessing it's sort of a cheet. Can you fill me in a little bit on that one please?

12 December 2005, 02:45 AM
sure there are morph targets. you have two duplicate meshes, one being controlled by IK, the other, FK. if you set up a morphblender slider you use one of the meshes as a cluster for the other.

12 December 2005, 02:10 PM
That's sounds easy enough, but I'm so confused as to how the morph slider knows how to switch between the IK and the FK. I thought it just swapped out meshes. What you're saying is that the slider would not only swap out the mesh, but the bone effect as well?

I think I just wet myself.

My brain is trying to process how this is possible, but I believe you.

12 December 2005, 02:04 AM
And it swaps out their bone deforms?

That's really cool.

12 December 2005, 04:47 PM
actually, once you take a look at the attached project, it will be obviously simple.

I'm not doing anything with the skeleton at all, I'm using MorphBlender to pull the mesh away from one heirarchy and mimic the movement of another.

take a gander at the project file(rename to .prj)


both skeletons are first in the effects list. the primary skeleton has predeformed points checked.

Morphblender is the last thing in the effects list(since it will be the switch)
it's settings are source and target use transformed points.
check process after transformation, or both morphs will be executed parallel.

so.... as long as the heirarchies have the same position when you slide between them, there is no distortion, and nobody knows you made the switch.

this also works with objects that need to behave like a dynamic parent.


12 December 2005, 02:06 AM
I can't wait to check this out. That sounds genius dude. Thanks a million.

CGTalk Moderation
12 December 2005, 02:06 AM
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.