Vertex Group Trouble

As much as I love to model for source, there’s one thing that keeps me from ever making anything 100% compatible and that’s vertex groups for bones. I might be missing some important information that keeps me from ever achieving decent models but it’s driving me crazy. I recently finished up a model for the spy in tf2.
Here’s the vertices for the pelvis…
Spine 0…
and Spine 1…

And here’s what the model looks when bending those bones:

Everything else works just fine. The spine is the only issue I am having. It’s not just this model either. Every model I have ever made has vertex issues and I don’t know how to conquer it. I tried hard to mimic the original spy model and even then, I get imploding polygons and folds like the model was made out of paper. I’m asking for anything up to this point, advise, help, or even someone just doing the vertex job for me. What factor am I missing with vertex groups? Do certain groups have a weight to them that I can change to make the curves seem less colliding? What am I doing wrong here?

Make sure the weights for each of the vertices do not exceed 1.000 in total for all vertex groups. You get some derpy stuff if you have multiple vertices having 1.000 while parented to the same two or more bones.

I’m assuming you’re using Blender because that’s where my explanation is coming from. Although it should be the same in 3DS Max as well.

Here’s an example in case you are still confused.


See how this individual vertex belongs to multiple groups? However both numbers combined would give the vertex a total weight of 2.000 which would cause bone conflicts when trying to move it and result in the mesh fuzzing up when you try to move the associated bones. This is an example of doing it wrong. Instead, it should be more like this…


See how each of the vertex weights add up 1.000 in total. It needs to be like that for all vertices that are in multiple groups. The way it works is that the vertices of the parent bone are already moving the child bone, so the weight of that child bone adds onto the weight of the first when moving that parent bone since it is already moving its child bone. In this case, your spine 0 is moving your spine 1 already.

For example, here is a vertex from the lightning model I am using with its weights. The model came with a number of adjustment bones for each main bone, so the weight was evenly distributed among them.

As you can see, the total weight is exactly 1.000. The Shoulder 2 bone has a value of 0.000 because I added that vertex to the group that was parented to the bone. I wanted to delete the adjustment bones, which were parented to the Shoulder 2 bone and transfer all the weight onto that single bone. So in order to maintain that 1.000 total bone weight, I had to transfer all the weights of the adjustment bones onto the shoulder 2 bone since deleting the adjustment bones would result in the weight of those vertex groups becoming defunct. This also means that I had to add in the vertices of the adjustment bones that weren’t part of the “Arm Shoulder 2” bone’s vertex group into said bone’s group.

Having done that, the final result would be like this…

The weight for the vertex of the Arm Shoulder 2 is now the total of all the adjustment bones. The total weight is still 1.000, since the adjustment bones have been deleted and the weight values for them are now defunct. Whether I set them to 0 or not doesn’t matter, since they are no longer parented to any bone and have no effect on the model’s posing. You generally have to do each of these by hand for your model, which can get pretty tedious if you’re trying to edit over 300+ individual vertices which can take a good while to do. But ultimately it works and will result in smooth transitions for your model. I like using Blender not only because it’s free, but it has a script that allows me to edit the specific weight values of each and every vertex and do it quickly without having to switch between vertex groups to do so.

So to summarize, you generally want to make sure that vertices shared between vertex groups maintain a combined weight of 1.000. If you go over it can result in some odd bending here and there which may be the problem you are experiencing in your model, whereas if you go under the same thing happens but with the mesh lagging behind the bones. I’m not sure if that is the problem you are having, but I ran into that issue when I was trying to rig my Lightning model and it resulted in some really derpy flexes when I tried to pose it inside Blender.

Hope that helps you out. Let me know if that solves your problem. Sorry for the long explanation, I figured it would be best to be as thorough as possible since I know how frustrating it is when people on the forums give just 1-2 sentence advice without actually going into detail which can sometimes make one more confused than when they started.

I really do appreciate the thoughtful feedback and I’m glad you clarified that there’s more to vertex groups than what I originally knew. Still, I’m not an expert at blender so if I may ask, how would I go about changing weights or even viewing the weights? You also mentioned a script. Where can I access this? :slight_smile:

You can get the script I’m talking about here. It’s really helpful and I don’t know why Blender doesn’t come with it automatically.

Show Vertex Group Weights

I’m assuming that you know at least the basics of Blender’s UI right?

1. First click on your armature. Click on the bone that has the vertex groups you want to edit. Usually the bone and the vertex group will share the same name, that’s how Blender recognizes what to parent the vertex groups to. Make sure you are in pose mode. You can do that either by changing it on the tab in the lower left corner or hitting “CTRL+TAB”, but make sure it is in pose mode.

**2. ** Next, with your armature selected, “SHIFT+Left Click” on the mesh you wish to edit. If there’s just one mesh, then just click on that. The mesh in this situation would be your model, but in other instances the mesh may be divided into multiple parts for editing… similar to how I am currently working when I am porting models into Source.

3. After that, change your mode into “Edit” mode. If you want you can then change it into “Weight Painting Mode”, and then later simply press tab to switch between “Weight Painting Mode” and “Edit” mode on your mesh. This will be very useful if you want to check out how your armature deforms. Since the model automatically T-poses in edit mode, you can pose your model in weight painting mode, and then switch back and forth between edit and weight painting to see if your model is deforming correctly. Any changes to the weight via edit mode will automatically be applied in weight painting mode with the model deforming appropriately, so you can see how your changes affect your model right away.

4. Now, in the lower right window underneath your scene window you should select the tab that looks like a triangle. It should be next to the “Modifier” tab that looks like a wrench. This will take you into the “Vertex Group” tab where you can edit your V groups and do all the weighing and stuff like that.

In the vertex window you will see a button that says “Assign” followed by a slider that shows the weight. There is also a subwindow displaying all the vertex groups you have currently on the model. If you press “Assign” when you have vertices selected, it will automatically add those vertices to the Vertex Group, as well as automatically assign the weight that you specified in the slider to them. You can also remove the weights and vertices from the group by pressing the “Remove” button.

With the “Show Vertex Weights” Script
This makes it a lot faster since you can just select the vertices you want and then apply them right away.

Just select the vertices you want to edit and then change them with the script. There should be a window at the very bottom of the right pull-out tab (forgot the name of it) where you can edit the vertices.

If you ever need to add additional vertices to your vertex group without overwriting the entire weight of the group. Select the vertex group you want to add, then go to the main vertex group you’re adding to, press “Deselect” to unselect the main vertices, then press “Assign” with whatever weight you want. If you have two overlapping vertex groups and you do this, Blender will just apply the additional vertices to the vertex group and hopefully you only have to edit those without overwriting all the weights.

Let me know if you have any more questions. Again I apologize for the wall of text but I figured that someone else might have the same questions so I figured I’d write a mini-tutorial for future reference.

One problem, I can’t seem to install that script. The installation says it’s in blender under the testing tab but I can’t find it anywhere in the addons window.

In the search box type in “Show Vertex Groups”.

Also you may need to have the latest version of Blender installed. Preferably version 2.6.

I think I have 2.69 installed. Also there are no results for searching Show Vertex Groups, even with all of the Supported Levels highlighted. If I can’t figure this out, how else can I work on weights then?

Without the script you would have to approximate each vertex based on its color and then apply it manually either with the “Assign” button or the weight paint tool.

Did you put it into the 2.69/scripts/addons folder?

There was no file or script to download from the page provided, or at least I didn’t see one.

It’s under the “Executable Information”. It’s the link that says “SVN”. Click it and it will download the file for you.

Alternatively the direct link is here.

Ah I see and I got it into the program! Thank you very much! I’ll try to see if I can figure out this issue from what you’ve told me already. If I come across any more issues or have any more questions I’ll be sure to reply back! I appreciate the constant feedback! :smiley:

no problem. I struggled a lot when learning Blender too. Good luck

Also, is there any way to select multiple vertices from a vertex group and give them a weight value altogether? Might save me some time if there was an easy way to do that. :slight_smile:

Yes. I’ll go into detail for the sake of thoroughness.

In Blender you can assign a single weight to multiple vertices through the vertex groups tab.

  1. Select the vertices you want to weigh.

  2. Click on the “Vertex Groups” tab.

  3. Select the vertex group you wish to apply the weights to. This is important because it will affect how the bones associated with the vertex group move the mesh. I forgot to show it in the picture, but your selected vertex group will show up above in a small window above the “Assign” button.

  4. Assign the weight you want to use on the selected vertices via the weight slider in the Vertex Groups tab.

  5. Hit the “Assign” button to assign the selected weight to all the selected vertices.The weight will only be applied to the vertices in that vertex group, and will only affect that vertex group. You can apply different weights to the same vertices if they are a part of different vertex groups.

Even better! Thanks! :smiley:

no problem. Good luck!