[Blender/Rigodotify How-to] Adding additional bones to your rig

I recently came across a nice Blender plug-in called Rigodotify that makes the process of rigging meshes for use in Godot just a little bit easier. It’s a good plug-in, as it takes just a few minutes to install and just a few more to rig a basic character so it can do things like walk, dance, and die dramatically.

Rigging slightly less basic characters, however, requires more expertise. If your humanoid has wings, an extra pair of arms, or something truly preposterous like a ponytail, you can’t simply add a few bones to the rig and expect everything to work. And that’s a bit of a problem, because I couldn’t find a short but comprehensive guide that shows how to do this anywhere on the internet. It took me a day and a half of futzing around in Blender and reading scattered bits of information to come up with a solution that works for me. I’d like to share my findings in the hope that someone might find it useful. (And if not, then I at least have a reference for myself that I can use.)

Step-by-step procedure

I’m going to assume you already have a mesh that’s parented to a control rig. The result will look something like this:

Except, of course, you’ll have your own mesh. In mine I already have a ponytail and one side bang (the one on the character’s left side) fully rigged. I’ll show you how to rig the other bang.

You’ll want to select just your metarig and enter edit mode. Then, in the properties window, click on the ‘data’ tab. (The one showing a green stick figure.) Scroll to the bottom and open the samples box.

Click on basic.copy_chain (that’s the name of something called a rig type), then Add sample. A three-bone structure will appear.

Depending on your needs, you may need more bones or fewer. Right now, it’s immaterial what rig type we’re using. (We’ll change it later.) All that is important and matters is that the basic.copy_chain has deformation bones and no bendy bones. Place this three-bone structure on your mesh anywhere you please.

Rather than changing scale, you should only lengthen or shorten bones by clicking on one of the spheres at either of the bone’s ends and pressing g to move that end.

Keep in mind that the sphere near the thick end of the bone is the part around which the bone will rotate. As you can see, in order to make my character’s side bang I had to rotate the bones 180 degrees around the x-axis. You may or may not have to do something similar, depending on what sort of body part you’re adding to the rig.

Next, parent your new bones to the rest of the metarig. (Select the body of the bone to parent first, then shift click one of the spheres attached to the bone that should become the parent. Now press ctrl + p and select ‘keep offset’ . Your workflow might differ if you’re rigging something other than a side bang like I am.)

Optional step, but now is a good time to rename the newly parented bones. My character’s mesh has two side bangs that are identical. I already have the other bang set up, but if I hadn’t, I could make my new bones have a name that ends in .R. This would then let me right-click and choose symmetrize to automatically create the bones for the left bang. I’m still choosing to pick a name ending in .R because it’s a good practice.

We now have to regenerate the rigify rig and convert to a Godot-compatible rig. (Click the Re-regenerate and Convert to Godot buttons again in the data tab of the properties window. The one with the little green stick figure.) There’s no need to parent the mesh to the control rig again.

Now is a good time to fix the bone roll of the newly added bones. If you go back to the picture where I placed them on the mesh, you can see a set of xyz-axes for each bone. The bottom two bones have their axes in the exact same orientation, but the top bone’s axes differ from the others. When you tell all three bones to rotate around their own x-axis, the resulting movement will look very strange if their xyz-axes don’t point in the same way.

Rotating bones can be done by selecting the metarig, going into edit mode, selecting a bone by clicking it, then rotating it with r. There’s also a keyboard shortcut for aligning with the global axes: shift + n.

In case you don’t see the axes, select your metarig, go to the data properties window, click on viewport display, then tick the box axes. Regenerate and convert your rig after changing the bone roll.

We’re nearly there, but have yet to complete the most crucial step. If you were to use the converted control rig right now, you’d see that the mesh does not respond when the control rig changes. This is because we have yet to define vertex groups that will be influenced by the deformation bones.

Go into object mode and select your mesh. Then in the properties window, press on the ‘data’ tab (the one with the green inverted triangle icon.)

New groups can be added by pressing the little ‘+’ icon on the right side of the window. Make two groups for each of the bones you added. (My side bang has three bones, so I add six.) Each vertex group must have the exact name of one of your newly added bones and its corresponding deformation bone. If you named one of your bones side_bang_a.L, you would name your vertex groups side_bang_a.L and DEF-side_bang_a.L.

Once your groups have been named, it’s time to weight paint them. Select your mesh and enter weight paint mode. Click on DEF-side_bang_a.L in your data tab, then weight paint the relevant area.

Regenerate and convert the rig, then enter pose mode and try rotating the control bone. The side bang should now move.

But we can do even better. Go back to object mode. Select your metarig (not the control rig), and enter pose mode. Select the top bone of the chain, then go to the ‘bone’ tab of the properties window (the one with the green bone icon.) Scroll down, and change the rig type to spines.basic_tail. Regenerate and convert the rig, and…

You get a much nicer control. That little blue crown thing in the bottom left corner lets you move about all bones in the chain.

Maybe your side bang rotates, but in an unexpected direction. It’s a good idea to go back to the ‘bone’ tab in pose mode and check which axis in ‘options’ is checked:

Here, ‘x’ is checked. Bones in the chain will only roll around this axis, so check your bone rolls again. If the x-axis points in an unexpected direction, then that explains the weird motion you see.

Now you can animate to your heart’s content.

Final thoughts

This how-to errs on the side of over-explaining if for no other reason than to properly reflect the ten-thousand rakes I stepped on while learning how to rig characters.

I’ll admit that this guide has more to do with Blender than Godot, but I don’t really frequent any Blender forums and doubt anyone there would have much of a use for this guide.

I’m not much of a rigger or even 3D modeler, so if you find any errors or know how to simplify/improve the workflow, please do drop a comment. It’s much appreciated.

This guide was written for Blender 5.0, which is the most current release.

4 Likes

I recently stepped on a few more rakes and would like to talk about this experience so you don’t have to.

Remember what I said about weight painting about selecting vertex groups? That technically works, but is not a very ergonomic solution as you would need to know where all of the bones are to effectively apply the weight paint. For simple joints this might not prove to be too difficult, but more complex joints or places where the mesh is influenced by multiple bones - such as the hips - weight painting is a nightmare.

Rather than guessing where the bones are, it’s more fruitful to actually show them instead. You need to do a bit of a trick to show them, though. Go to the edit menu and make sure ‘lock object modes’ is unchecked:

If checked, uncheck it.

Now enter object mode and select your control rig (not the metarig), and click on the armature icon (the little green feller) in the properties window. Scroll down until you see DEF and make sure the eye icon is visible.

This makes the rig’s deformation bones visible. In the viewport, click on your control rig, then enter pose mode. Press A to select all of your control widgets, then shift click on your mesh. Now change to weight paint mode, and your deformation bones should show up in green:

Press alt and left click on a bone to visualize and edit the mesh’s weighting. As a nice bonus, it is possible to alt left-click on one of the control rig’s control widgets and rotate/translate them as you would in pose mode to directly see and test the changes you’ve made to the mesh’s weighting.

Please note that whenever you regenerate your rig, the deformation bones will be hidden again. You’ll need to repeat these steps to make them visible.

Mini-rake: does one of your character’s body features suddenly shrink into non-existence after you weight-paint it and test your changes? Add a corrective smooth modifier to your mesh. Does the modifier appear to do nothing? Make sure it is listed below the armature modifier.

The corrective smooth modifier affects your entire mesh if you do not specify a vertex group. You don’t want two corrective smooth modifiers to affect the same vertex group, otherwise your character will appear to crumple every time it moves.

2 Likes

Chief rake-stepper here. If you’re playing along at home, trying to make your own ponytail/bangs, you may have noticed that spines.basic_tail introduces some subtly interesting behavior in your rig that you probably won’t like. If you select your control rig, go into pose mode, and rotate the head around the y-axis, you’ll see that the bangs’s first bone (i.e. start of the basic_tail) rotates in an independent manner from the head bone. That’s good-- for this specific kind of rotation. If you instead rotate the head around the z-axes, the bangs’s first bone also seems to rotate independently from the head bone. But in that situation, it just looks wrong.

I haven’t been able to figure out why basic_tail has this kind of behavior; the Blender documentation is quite terse when it comes to rig types. What I suspect is happening is that basic_tail is only intended to be used in situations where the tail’s first bone and parent bone either:

  • meet at a 90 degree angle, or
  • are directly connected to one another and both point in the same direction.

In all of my examples, the basic_tail and head bone are practically parallel to each other, which doesn’t seem like a thing you’d expect to see in nature.

If you’re modeling a cat or a dog, it’s probably nice not to have the tail move on its own when you rotate the animal’s torso. But human hair seems to have different requirements in that regard.

With the knowledge I have now, I would suggest using a limbs.spline_tentacle rigs type instead. Your model’s bangs will no longer automatically ‘point down’, and you’ll either have to manually move the bangs yourself during animation (you can do this by moving the last green sphere on the bone chain while in pose mode), or maybe use a wiggle bone add-on in Godot to make the hair follow gravity/wind and let that control the hair.

I’m putting these hair experiments on pause for a bit as I get back to animating. Then I’ll try if I can get the model to work with both wiggle bones and animations playing simultaneously. I’ll report back on that when I know more.

1 Like