Im using the BSoD Introduction to Character Animation tutorial as a reference while rigging my own model, but ive run into a rather stupid inconvenience which is probably correctable with the click of a button, a button which seems to elude me lol
When im weight painting for my bones, i cant see my armature over the model mesh (like in the screenshots in the tutorial) so i have to randomly click around until i select the bone for which i want to paint, but even then i cant see it, my only clue ive selected a bone is when red patches (painted weights) appear or disappear. Its really frustrating
Ive noticed that whenever you paint a vertex by mistake (adding it to the selected bone’s vertex group by mistake) it wont be removed from the vertex group by painting it back to zero weight, which sounded logical.
After noticing that my bones seemed to move random vertices i tried to correct the situation. Painting to zero had no effect. It took me a while to figure out that the vertex, once added to the group, had to be manually removed from the group in the “links and materials” panel.
My question is: Is it a bug or is it intended?
EDIT: Ive also noticed that you cant remove a vertex from a group if its weight is > 0, even if you do it throught the “links and materials” panel.
it is intended. although i would think that if a vertex’s weight was truly zero, it should not be influenced by any bone movement.
All errant vertices can be removed all at once, thru the L&M panel…just select them all and Remove.
Vertices with any weight CAN be removed from a group. Scroll to the group, click Select. Box unselect the ones you want to stay, leaving the ones you want to remove selected. Click Remove. Press A to unselect all verts. Click Select, and you will see the only the ones you unselected.
Ive noticed that whenever you paint a vertex by mistake (adding it to the selected bone’s vertex group by mistake) it wont be removed from the vertex group by painting it back to zero weight, which sounded logical.
Yes, this is annoying. Not sure if it’s as designed or not. I have a little script that fixes this. Paste the following script in a text window and do Alt-P with the mesh selected:
#!BPY
"""
Name: 'Clean Groups'
Blender: 241
Group: 'Mesh'
Tooltip: 'Remove vertices with very small weights from vertex groups.'
"""
##cleangroups.py clears all vertex groups in
##selected objects of all vertices with a very
##low weight (in this case below .1).
##The weight cutoff can be edited in line 24,
##and uncommenting line 23 and commenting 24 will
##remove only zero weighted vertices
##Python 2.4, Blender 2.41
import Blender
from Blender import Mesh
object = Blender.Object.GetSelected()
for obj in object:
if obj.getType() == 'Mesh':
mymesh = obj
mymeshdata = mymesh.getData(mesh=True)
groups = mymeshdata.getVertGroupNames()
for vgroup in groups:
gverts = mymeshdata.getVertsFromGroup(vgroup,1)
for v in gverts:
#if v[1] == 0:
if v[1] < .1:
mymeshdata.removeVertsFromGroup(vgroup,[v[0]])
else:
print "Warning, selected object ", obj.name , " is not a mesh."
vert groups can be tricky; I have found that I have to print, very carefully using magic marker (so it washes off) “Unselect All when changing vert groups” on my forehead backwards, and then put my laptop on my sink when working with vert groups. Otherwise, I end up Assigning verts to a group I didnt mean to because I left them selected from another group or some editing iwas doing, and then when I click sleect Blender ADDS those verts to the selected mesh and I get frustrated and throw my laptop in the sink. Then I look in the mirror, realizing what a stupid thing I just did, and read my forehead, and realize my mistake, and hurridely grab for my laptop while it is still sparking BUT forgetting to unplug the darn thing I electrocute myself and have to be taken to the hospital where they use alchohol swabs to wipe off my reminder and when I am done with counselling (it was NOT a suicide attempt, doc) and back at home, I have to start all over again. Like I said, tricky.
By the way; if you’re having problems painting accurately and avoiding overshooting, you should know that pressing the F key in weight paint mode will put you into face select mode, where you can select specific faces to paint, and other faces will not take any paint. In this mode you can also hide selected faces with the H key, and hidden faces will not be painted, they will also not be in your way while you are trying to paint other faces.
Great stuff, blenderman. added to wiki under vertex and weight painting:
‘’‘Face Painting’’’: By default, you will be painting the whole mesh. To only paint part of the mesh, press {{Literal|F}} for Faces when in Vertex Paint mode. The faces of the mesh will be outlined for you. {{MB|R}} clicking on a face, or {{SMB|R}} clicking, or doing a {{Literal|B}}order select with the {{MB|L}} button selects only certain faces to paint. Doing a {{Literal|B}}order select with the {{MB|R}} button excludes those faces from painting.
Without bothering to explain it in too much detail, this is a really, really stupid thing about Python, IMO.
Actually, I can’t fix it, because the problem is in indentation and whitespace and Python depends on consistencies between editors for its parsibility(!). All that’s needed is a space or a tab deleted and re-entered here and there, but…
The most expedient solution would be for me to email you the script as an attachment, and for you not to cut and paste it but rather open it directly as a text file in the text editor. Silly me thinking one could cut and paste a Python script from a forum and have it run as is. If you’d like me to do this PM me with an email address and I’ll get it to you as soon as I can (which won’t be immediately, since I’m on a different computer at the moment and I’m going to bed soon).