Weight painting, sometimes known as skinning, is my least favorite part of making a model. If you want to paint weights, it’s important to understand as much as possible about the tools and terminology to avoid any extra frustration.
PMXE weight painting mode
To enable weight painting, hit the Wght button on the top bar of PMXE’s 3D view, or hit F6. To get started painting, hit the Start button, then shift-click on the bone to which you want your vertices skinned. PMXE gives you an option to quickly select a bone’s parent or one of its children to make it easier to switch between bones. I like to leave the selection guide open with all important bones in it so that I can quickly select a new bone.
There are three main ways PMXE lets you paint weights: circle fill, circle gradient, and linear gradient. There are a few other options there, but UV painting isn’t actually about weights, and W4 won’t make any sense until we explain a few other concepts.
But before we talk about those, let’s talk about some options in PMXE that will make weight painting easier.
Mode and x-ray
You’re going to have trouble painting weights if you can’t see them. On the bottom of the PMXE 3D view, there’s a button labelled mode. If you click on it, you’ll get a menu of different ways for PMXE to display your model. Try weight(D). Now select a bone. Vertices and faces strongly weighted to that bone will show up in red. Vertices and faces weakly weighted to that bone show up in blue. And unweighted vertices and faces will show up as black and gray.
Another important button down there for weight painting is for disabling X-ray mode. It’s the leftmost kanji on the bottom of the screen. When you disable X-ray mode, you won’t be able to select vertices behind other faces, and your weight painting will only affect the vertices that are facing you– the faces that you can see.
You can easily limit your weight painting to parts of your model with the masking window (F3). Limit to a particular material, or to one or more bones when you mask by weight. Use Bone->Soft -Select to include vertices only partially weighted to your selected bones.
Circle fill just paints the weight you’ve selected on all vertices under your cursor. It’s a good way to rapidly paint solidly weighted objects, and it’s a decent way to tweak carefully created weights. To set the weight you want to paint, type a number in weight and hit enter, select one of the five preset weights, or ctrl-LMB on a vertex to select that vertex’s weight (if it has any).
By checking the weight box, you can limit your painting to vertices already weighted to your selected bone. By checking the vertex box, you can limit your painting to only vertices you have selected. But since entering weight paint mode deselects all vertices and disables the selection tools, I haven’t found a way to make this useful. Instead, I often truncate faces to a new material (Edit->Vertex->Show face to select faces from vertices + Edit->Face->Truncate to truncate) and use that for masking if I want to limit my weight painting to specific vertices.
You can also use a spray gun to add to or subtract from existing weights. Set Strength with the slider or with a number in the drop-down (smaller numbers are stronger). Freq is how long the spray gun waits to drop more paint on the vertices under the cursor (smaller numbers are more frequent). The plus/minus radio buttons allow you to switch between adding weight and subtracting weight.
When painting, the hardest thing is getting smooth transitions. Gradient tools are handy for this.
The circle gradient affects all vertices under your cursor, but it affects them differently depending on how distant those vertices are from the center of your cursor. At the center, it paints the full weight. At the edges, it paints no weight. And between, it scales smoothly, interpolating weights.
You can’t change the size of the circle gradient. You can’t change its aspect. But you can zoom in and out in the 3D view, enable or disable orthographic view, get a new perspective on your model by moving your camera, or change the FOV in the Display settings dialog (F1, tab 2). Since the circle gradient stays the same regardless of view, you can get your circle gradient acting at any relative size and aspect by adjusting these factors.
Other options are identical to those for Circle Fill above.
The linear gradient is useful for rapidly getting smooth gradients along straight lines, especially for long bones, like at the knees or elbows. Select a start weight and an end weight, then click and drag a line. Vertices will be weighted to your selected bone based on how far along that line they lay. You still have access to the weight checkbox to limit the affected vertices. Note that the linear gradient draws a zero weight on everything outside of the band described by your line, which is a little annoying, as it will probably overwrite some 100% weights that you would rather not see changed. Mask these out of the display, or just paint them back with the circle fill.
Blend mode does something different. I can’t say I understand it. If you do, please let me know!
One of the frustrating things with weight painting is that weights always get normalized. PMXE recalculates their values every time you select a new bone, adjusting them until all of their values add up to 1.0. If none of your changes seem to stick, make sure that vertex is actually weighted to another bone! If it’s not, weights are always going to be 100%.
Sometimes you just can’t get a vertex unweighted to a particular bone in order to weigh it to a new one. Try weighting it 100% to one of its parents first, then weigh it to your new bone.
One big problem is finding stray vertices. One of my techniques is to mask by weight, then truncate to a new material and mask by that. Enable Parts and look for holes.
When you delete a bone, PMXE drops all of its weights onto the bone just above it in the list. So you can combine weights just by positioning bones in the list and deleting them.
If worse comes to worst, you can edit weights directly in the Vertex tab. Unfortunately, the menu options that suggest that they should allow you to halt normalization of weights don’t actually work– or at least, don’t work for that purpose.
Good weight painting usually means switching between the transformation window and your 3D view frequently to check your work. Remember, these views have independent undo histories. Selecting a bone in the transformation window will also change to that bone in the 3D view when you return to continue weight painting. Always make sure you’re painting to the correct bone.
Take a look at one of your vertices now. Look at the method used to deform that vertex. There are a few choices here, and it can be useful to understand them.
There’s actually a few varieties of BDEF, based on how many bones factor into the deformation. I’m not sure what BDEF stands for, but it’s a linear deformation. BDEF1 deforms the vertex by a single bone. BDEF2 deforms the vertex by the combined action of two bones. And BDEF4 deforms the vertex by the combined action of four bones.
What about BDEF3? BDEF4 bone weights can be zero, so if you want a vertex to be deformed by three bones, make a fourth entry with a zero weight.
PMXE should move smoothly and invisibly between BDEF1 and BDEF2 so you shouldn’t have to worry about which is which (but you can always select all of your vertices and change them to BDEF1 to limit them all to a single bone’s influence). But PMXE has very limited tools for working with BDEF4. The W4 weight painting tool allows you to paint BDEF4 vertices, but without any of the handy goodies you have with the other tools. If you would like to be able to skin vertices to more than 2 bones, I would strongly recommend learning Blender.
As BDEF bones rotate, the volume described by their vertices collapses. Spherical deformation alleviates that problem. It uses two additional parameters, intended to act as a sort of center for the sphere. PMXE figures these out for you. It’s easy, because these centers are the same as the centers of the bones involved.
SDEF is great for twist bones and “knobby” bones, like elbows and knees. Sometimes, enabling SDEF on a knee feels like magic. With the push of a button, a troublesome part of the mesh starts working perfectly.
To change vertices to SDEF, select the vertices you want to change, then, on the 3D view menu, select Edit->Weight->SDEF. PMXE assigns centers and tells MMD to use spherical deformation.
Spherical deformation looks great on some bones. It looks awful on others. You’re going to need borders between SDEF vertices and BDEF vertices. The best place for borders is wherever you can make 100% weight lines. Ideally, you want a loop of SDEF vertices weighted 100% to a single bone, followed by a loop of BDEF vertices weighted 100% to the same bone. This reduces the risk of tearing at these borders.
If you convert vertices to SDEF then adjust bones, the vertices’ centers won’t be updated with the bones. You might do this on purpose in order to play with what happens when SDEF centers are located off-bone. But if you want to restore the centers to their default position on top of their bones, the easiest way to do it is to select your SDEF vertices, convert to BDEF2, then convert back to SDEF.
The final thing about spherical deformation is that there’s no way to deform vertices with more than two bones. If you want to do that, you’re stuck with BDEF4.
QDEF stands for Quaternion Deformation. And it’s very easy to understand its relevance to MMD: if you have any QDEF vertices in your model, your model will crash MMD. QDEF is not implemented in MMD.
Other weight tools
Edit->Weight->Average can be very useful. When you use this on a group of selected vertices, it computes an average weight and assigns this to all selected vertices. It’s important to use this to prevent ugly deformation on things like clothing rims. Otherwise, even small differences in weights can lead to ugly stretching of the rim.
Edit->Weight->Mirror Vertex is another handy tool. Once you have one half of your model weighted, select the other half (careful not to select the center vertices), then use this option to copy the weights over. If bones are named appropriately (using 右 and 左), the weights will be applied to the appropriate bones.
Edit->Weight->Smooth and Smooth Value sound like they would be useful, but my experiments with them have not led to anything smooth. I don’t understand how they work, and if anyone understands them or how to use them well, please let me know!
Any weight painting tutorial would be remiss not to mention the excellent weight transfer plugin. This is the fastest way to paint weights. It’s not perfect, but the ease of use means it should always be the first tool you try.
The skirt plug-in is a handy way to rapidly weigh any area– not just skirts! Remember, you can always delete any of the physics it creates.
Finally, there is a free tool with much more powerful ways to paint weights. The best thing about Blender is that it allows painting directly on posed models. That turns the nightmarish task of weight painting into one merely tedious.
– SEE BELOW for MORE MMD TUTORIALS…
— — —
– _ — –