The purpose of bones in Moho is to provide high-level objects that are easy to manipulate in place of moving around lots of individual points. In order for bones to do their job, vector control points and other objects must first be bound to the bones. There are three ways to bind objects to bones: automatic binding, manual binding, and layer binding. This tutorial will show you the difference between the three.
For this tutorial, we'll start with a project file that contains some artwork to get started with. It's named "Tutorial 3.1" and it's located in the "Tutorials/3 - Bones" subfolder within the main Moho folder. Open this file in Moho, and you should see something like this:
Starting point for this tutorial.
The most common method of binding objects to bones is also the easiest - automatic bone binding. Whenever you draw new artwork in Moho (or import image files as image layers), those objects are set up for automatic bone binding. All you need to do is add the bones.
In the Layers window, click the New Layer button , and select "Bone" from the popup menu. Double-click the new bone layer to bring up the Layer Settings dialog. Name the new layer "Arm Bones" and click OK. Finally, drag the "Arm" vector layer upward to move it into the bone layer:
Arm layer placed inside a bone layer.
Make sure the bone layer is selected, then activate the Add Bone tool. In the main editing view, create two bones: the first one starting at the shoulder and ending at the elbow, and the second starting where the first left off and ending in the hand:
Create two new bones.
And that's all it takes for automatic bone binding. Use the Manipulate Bones tool to try moving the bones around. The arm will move with the bones automatically, since it was, well, automatically bound to them.
Test moving the bones.
This arm setup works pretty well as it is, but let's try to refine it a bit. Double-click the bone layer to bring up the Layer Settings dialog. Go to the Bones tab, set the binding mode to "Region binding", and click OK:
Turn on region binding.
Flexible binding (the default for new bone layers) uses a method of bone binding where every bone has some influence over every point in a vector layer. The farther away a point is from a bone, the less influence that bone has over the point. However, you can still experience some rubbery movement where a moving arm can cause a toe to twitch a little bit.
With region binding, on the other hand, every bone has a cutoff radius, outside of which it will not affect the movement of vector points. This can be used for cleaner movement, but requires a little extra setup.
Now that region binding is in effect, activate the Bone Strength tool. Around each bone you will see its region of influence. Vector points are controlled by the bone(s) whose regions overlap them. If a vector point is not within any region of influence, it will move with the closest bone. Using the Bone Strength tool, click and drag on each of the bones to resize its region of influence. The idea is to make the regions just large enough to contain the body part that the bone is meant to control:
Resized regions of influence.
Don't worry about the parts of the forearm that are outside the forearm bone's region of influence - they will just move with the closest bone, which is in fact the forearm.
Use the Manipulate Bones tool again to try moving the arm. The movement should be a little cleaner than it was with flexible binding.
Manually binding points to bones is a process that exists mostly for compatibility with older versions of Moho. Automatic binding, combined with bone regions of influence is the easiest way to work with bones in Moho. However, there may be some times where you want more control over exactly which bones control which points.
To manually bind the arm points to bones, first select the Arm vector layer. Then, use the Select Bone tool to select the upper arm bone:
Select the upper arm.
Next, activate the Bind Points tool and drag a rectangle around all the points in the arm to select them. Press the spacebar to bind the selected points to the selected bone:
Bind all points to the upper arm.
With the Bind Points tool still active, hold down the <alt> key and click on the lower arm bone to select it. When you select the lower arm bone, notice that no points are selected. When you select a bone, the points that are bound to it also get selected - in this case, no points are bound to the lower arm bone.
Next, drag a selection rectangle around the points in the lower part of the arm, as shown below:
Select the lower arm bones.
Press the spacebar to bind the selected points to the selected bone. You're done - you have manually bound points to both bones in the arm. Now test it out with the Manipulate Bones tool.
Although this method does work for binding points to bones, we don't really recommend it unless you have a special need to bind specific points to specific bones. You may have noticed that the arm doesn't move so smoothly with manual point binding. This is because the points around the elbow only move with one bone or the other, and so stretch apart and get distorted. With automatic binding, on the other hand, the points around the elbow move under the influence of both bones, and so move more smoothly.
Manual point binding can also be very labor-intensive, especially when your artwork has lots of control points. Finally, automatic bone binding can be used to warp image layers, while manual binding can't - another reason to stick with automatic bone binding (using either flexible or region binding mode).
The last way to bind an object to a bone is to bind an entire layer to a single arm. Make sure the Arm vector layer is still selected and activate the Bind Layer tool. Click on the lower arm bone to bind the entire Arm layer to the lower arm bone.
Bind the Arm layer to the lower arm bone.
Use the Manipulate Bones tool to try moving the bones around. Notice that the entire arm moves rigidly with the lower arm bone - the entire layer is bound to that one bone. This isn't very useful for this particular arm, but binding a layer to a bone is useful when you want to attach an object to a character. For example, a switch group containing multiple mouth shapes can be attached to a bone in the head. Or, if you want to make a character hold an object in its hand, you might bind that object to the character's hand bone.
Let's undo all of this extra binding and go back to automatic mode. With the Bind Layer tool, click on some empty space in the editing view - this tells Moho to not bind the layer to any bone. Next, select the Edit->Select All menu command to select all the vector points. Finally, choose the Bone->Flexi-Bind Points menu command to flexibly bind the points, as they were at the very beginning. Use the Manipulate Bones tool if you wish to confirm that the points are automatically bound again.
The arm under bone control.