Target Bone and IK Issue

Have you come up with a good Moho trick? Need help solving an animation problem? Come on in.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
lazerslab
Posts: 32
Joined: Sat Mar 26, 2022 12:55 am
Location: Cranston, RI
Contact:

Target Bone and IK Issue

Post by lazerslab »

Happy New Year everyone-

I have been running into an issue lately with target bones and wanted to post something here to see if anyone had any insights. I find that with more complicated rigs, target bones behave kinda choppy and unwieldy. So my first question is do ya'll have any tips to make a target bone IK system operate more... predictably?

The million dollar question though, is this issue that I have had occasionally where once I keyframe position on a target bone, the limb just floats back to it's default position. I'm racking my brain to figure out why this is happening without a keyframe for that position in place... and also why it only happens when I play an animation, but not, for example, when I scrub the animation in the timeline. I'm attaching a video of the issue, as well as the RIG in question. FYI I use a lot of smart actions and probably some unorthodox practices... but anyway I have scoured for awry keyframes on smart actions that might be causing the issue and can't come up with anything. I'm sure its something simple and obvious that I am overlooking. Anyway, here is the video of the issue (setup first minute... demo of issue begins around 1min. mark):



And here is the rig:

https://we.tl/t-5HhuqklwUo

Any info would be helpful! Thanks!
User avatar
synthsin75
Posts: 9979
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Target Bone and IK Issue

Post by synthsin75 »

This is an interesting case of a common issue. When using a target bone for a bone chain in a straight line, Moho doesn't know which way you want the bones in the chain to rotate to reach the target. In your file, you're telling Moho using the leg bone angle constraints. In this case, that's not quite doing the trick.

When this happens, you want to go to frame one and add a rotation keyframe to, in this case, the thigh bone, so Moho knows it's suppose to rotate outward. This is the more consistent way to ensure Moho knows how you want the targeting bone chain to move.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Target Bone and IK Issue

Post by Greenlaw »

What Wes says is all correct. The only thing I do differently is I like to pre-bend my joint at frame 0 toward the most likely direction I'll use by default. The artwork (upper and lower leg) can remain straight, I just put a slight bend in only the joint. It doesn't need to be very much, just enough to inform the IK.

When you need to, you can always change the preferred angle for the IK on an animation frame (frame 1 and higher.) Do this by pressing Alt (assuming you're using the Manipulate Bones tool,) and rotating the lower leg bone until you see the IK cause it 'pop' in the other direction. The 'pop' can be distracting but it can be convincingly hidden during animation by scaling a leg bone slightly shorter or just by making the character turn quickly.

Anytime you see characters turning 180 or 360 degrees in Moho animations I've create for our TV programs, that's all I'm really doing. You can make almost anything look smooth by having the character's whole body move into the motion instead of just mechanically rotating from side-to-side. (I'll spare everyone the '12 principles' lecture; there are plenty of videos on the topic already.) 😸

Hope this helps.
Last edited by Greenlaw on Wed Jan 04, 2023 7:11 pm, edited 1 time in total.
User avatar
lazerslab
Posts: 32
Joined: Sat Mar 26, 2022 12:55 am
Location: Cranston, RI
Contact:

Re: Target Bone and IK Issue

Post by lazerslab »

Thank you Synthsin and Greenlaw - I attempted both of these solutions- not sure if I am doing it correctly but I am still having the same issue. In this video I demonstrate what the method of bending the thigh bone on frame 1, which still results in the leg moving on its own. I then attempted to change the actual bend of the leg on frame zero, but the results were the same unfortunately (for the record though, this solution has worked for me on other rigs before... sometimes). Not sure what I am doing wrong but it seems fairly tempermental depending on the rig, sometimes it happens... sometimes it doesnt... but I can't seem to pinpoint this wacky behavior.

Any other ideas by any chance??

User avatar
synthsin75
Posts: 9979
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Target Bone and IK Issue

Post by synthsin75 »

https://www.mediafire.com/file/isnark3w ... .moho/file

All I did was set the frame 12 target bone keyframe, go back to frame one, and rotate the thigh bone outward until the problem behavior no longer happened.
You could also just do this at the same frame, whenever it give you trouble. Just rotate the thigh bone until it pops into bending the right direction.

If the leg is still popping as you move the target bone, you likely don't have enough rotation.
User avatar
lazerslab
Posts: 32
Joined: Sat Mar 26, 2022 12:55 am
Location: Cranston, RI
Contact:

Re: Target Bone and IK Issue

Post by lazerslab »

Thanks Synthsin! I guess I wasn't putting enough of an angle on it. Seems like it requires a large angle to lock in correctly, but I guess if I need the leg straight for any extended period I could just disable target temporarily. Simple solution - most appreciated!
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Target Bone and IK Issue

Post by Greenlaw »

You shouldn't have to do that. If the leg is bending in a frame where you want it straightened, just keyframe the bone shorter and it will straighten. Alternatively, you can just raise the character's root bone to straighten the leg.

Another option: depending on your rig design and animation style, using the Squash and Stretch Constraint for the leg bones could automate that for you.
Post Reply