Flexi-Binding Leg Bones with Targets

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
sacrowe
Posts: 2
Joined: Tue Jun 14, 2022 2:56 pm

Flexi-Binding Leg Bones with Targets

Post by sacrowe »

I'm new to Moho and I'm learning how to rig through the trial to see if I want to buy it. I was following along with a tutorial on how to apply flexi-binding but I must have missed something.
My problem is that the legs on my rig don't seem to bend as they should. I've deleted, rebuilt the skeleton and flexi-bound it so many times and I'm still not sure why it isn't working. I've also remade the legs a number of times too and now they are just simple strokes.
https://imgur.com/Sv56qMV
So most often the legs just don't bend at the knees, even when I put a point where the knees should bend.
https://imgur.com/PJqt4GP
And sometimes I manage to get them to bend but the ankle floats off away from the feet once the legs start moving.
https://imgur.com/y60eBnx
I've made a test leg in the same file made just of strokes, rigged the same way and that seems to work fine so I'm not sure why it isn't working on the owl model.
So I'm not really sure what's going wrong in either instance and would love to get some advice. :)
User avatar
Greenlaw
Posts: 10466
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Flexi-Binding Leg Bones with Targets

Post by Greenlaw »

I whipped up a super basic rig that might help explain what you need.

Image

Pick this project apart....

leggyEggy.moho

Rigging
Strength is set to zero for all bones except the leg bones. This because the body and feet are non-deforming so I just Layer bound these.

IK is used for the legs, and each leg bone chain points to a target bone.

The feet bones have Independent Rotation enabled to keep them from rotating freely. You can keyframe the feet rotation as needed.

The leg art uses Selective Flexi-binding. This is different from the default Flexi-binding in that the layers have been set to deform ONLY by certain bones. In this case, the right leg art is only deformed by the right leg bones and the left leg art is only deformed by the left leg bones.

To use Selective Flexi-binding, first select all the layers you wand to be deformed by certain bones, select those bones, and then choose Use Selected Bones For Flexi-binding.

(Note: if this doesn't work, you may have previously applied binding that's interfering. In which case, select the art layers and choose Reset All Bone Rigging. This will reset the rigging to the default Flexi-binding for only the selected layers. Now try the above again. If it still doesn't work, make sure these bones have some strength; flexi-binding doesn't work with zero strength.)

Animation
IK always likes to bend in a preferred direction which is defined by 'pre-bending' the bones. So if the knee joint is even slightly bend outward, the IK will try to bend in that direction. (Tip: you should test this on a non-zero frame. For various reasons, frame zero doesn't always work reliably for rig testing, notably IK testing.* I like to pick a nearby by frame like 12 or 24 for testing, and I use the Design Mode shortcut to hop back and forth between the frame and frame 0.) Note that the artwork doesn't need to be drawn in a bent pose, just bend the bones, and the bend can be smaller than what you see in my example file.

When you need to bend the joint in the opposite direction during animation, you need to keyframe the rotation of the bone. Use the Transform Bone tool and scrub over the bone to 'rotate' it until you see the bend direction change. You can adjust the animation to make this 'pop' imperceptible by lifting the character using IK, or by keyframing the length of a leg bone, or by just animating the motion quickly. Once you get the hang of this, you'll know exactly which to use and it will go quickly.

Animate the body by moving the root bone. This moves everything but the feet stay locked to the ground. Rotate the body by turning the body bone.

Animate the feet by moving the feet targets. Rotate the feet by rotating each foot bone directly.

This is a really simple rig but everything in it represents the foundation for pretty much any character rig I've build for a number of TV shows I've worked on.

Hope this helps.

-----
*You can test and see for yourself. In frame 0, grab the root bone and move it around using the Manipulate Bones tool. You'll probably see the knees bend in both directions uncontrollably. Now move to a later frame (say 12,) and do the same. Notice how now the knees only bend outward when you move the root bone.

Another tip: notice how I colored the target bones differently from the rest of the rig. This makes it easier to identify the target bones so I don't try to move the feet bones instead.
User avatar
Greenlaw
Posts: 10466
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Flexi-Binding Leg Bones with Targets

Post by Greenlaw »

In the previous post I wrote:
When you need to bend the joint in the opposite direction during animation, you need to keyframe the rotation of the bone. Use the Transform Bone tool and scrub over the bone to 'rotate' it until you see the bend direction change. You can adjust the animation to make this 'pop' imperceptible by lifting the character using IK, or by keyframing the length of a leg bone, or by just animating the motion quickly. Once you get the hang of this, you'll know exactly which to use and it will go quickly.
Just for fun, I made a leg turn example to illustrate...

Image

leggEggy_legTurnExample.moho

To do this as described, I used the Transform Bone tool to rotate the lower leg bone until the knee changed direction. Then I animated the root bone up and down to 'straighten' the legs to smooth out the pop in the joint. Finally, I flipped the foot bone and corrected the angle.

Some of this can be simplified using a Smart Bone Action, but as you can see it's really not hard to do manually.

Anyway, just wanted to demonstrate how to change IK direction during animation.
sacrowe
Posts: 2
Joined: Tue Jun 14, 2022 2:56 pm

Re: Flexi-Binding Leg Bones with Targets

Post by sacrowe »

Thanks so much for the advice! That was super helpful, I think I was getting a bit lost.
I have followed along with your advice (what you were saying about layer binding was very useful and about flipping the knee joint) and I was able to make a little animation, however I am finding that the lower legs still tend to drift off the feet still a little. I think I managed to improve it a little by moving the artwork for the feet but it does look a bit like that bottom point tends to drift off the end of the target bone. I'm wondering if it could be down to bone or artwork placement but I'm not certain.
Image
Any more advice would be amazing! :D
User avatar
Greenlaw
Posts: 10466
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Flexi-Binding Leg Bones with Targets

Post by Greenlaw »

If the art drifts when the skeleton is posed and animated, it could be a binding issue...maybe the feet artwork is being influenced by bones other than the feet bones?

If you don't want the feet to be affected by other bones, you need to specify which bones will affect it. This can be done using either Selective Flex-binding (in my example, this was used to assign each leg layer a specific pair of leg bones,) Layer Binding (when you want the art to be affected by only one bone; this was used on the feet,) or Point Binding (individual points can rigidly assigned to specific bones; unassigned points are still affected by bone strength. Use this for vector art and meshes.)

Two other binding methods are available but they're less specific and can result in 'squishiness'.

Flexi Binding (the default method) means the art is affected by all bones that have strength, and you can minimize the affect of distant bones by reducing their strength. IMO, this method is okay for a general setup but you'll want to apply at least some of the other methods for more solid results.

Then there's Offset Bone, which isn't really a binding method, it's more of a technique. The idea is to offset your artwork and bones so they're affected less by the other bones in the skeleton, and you use this tool to move the bones into position. When the tool is inactive, the artworks and bones will move back to their offset position on frame 0, but will automatically move into place on frame 1. This was a workaround method for 'excluding' other bones in the rig before we got Selective Flexi-binding which actually excludes other bones. Offset Bone isn't used as much nowadays but I find it still useful in special situations.

Finally, we have Smooth Joint. This let's you assign a pair of bones to create a focused bend in your selected artwork. This is a super easy binding method that has some interesting advantages but it also has limitations which I won't go into here. (To see an example of Smooth Joint in action, see my Puss-In-Boots demo. The arms and and legs in this rig use Smooth Joint.)

In the case of your character's feet, since you have only one foot bone for each foot art, I would use Layer Binding. If a single foot is in multiple layers, place the layers in a Foot group and then Layer bind the group to its foot bone.

If the art drifts when the rig is repositioned, I'm guessing you have some of the layers positioned at different depths and you're seeing the effect of parallax. Make sure all the z-positions of all the layers are set to 0 unless you have a specific reason for pushing them into 3D space.

Hope this helps.
Post Reply