Getting Error when trying to skin the mesh to the rig.

Hello everyone. This is just driving me crazy. It worked for me yesterday with a slightly simpler version of my mesh but I have a pretty complex human female character mesh and heres the problem.

  • First I select my mesh and then the rig.
  • Ctrl + P - Set Parent to - With Automatic Weights

And I get this:

Bone heat weighting: Failed to find solution for one or more bones.

I have tried all the solutions I found to fix this but nothing is working properly.

I have:

  • Removed Doubles from the mesh

  • Recalculated Normals

  • Deleted all active modifiers before skinning

  • Turned off X-Axis mirror in the armature edit mode

  • Applied rotation and scale to both the mesh and the rig

  • Tried Smooth Vertex

  • Tried giving the mesh a subsurf modifier which worked for a while (bad idea though, the mesh is pretty complex itself so this is a bad solution) but after the automatic weight painting, I deleted the modifier and the mesh wasnt moving anymore. Even when I applied the modifier, again the weight painting was gone after that.

So, what could be the problem? As I said, maybe it is the mesh. I imported it as .obj with Keep Vertex Order and Poly Groups checked.

Yesterday I had a simpler version of the same mesh and it worked.

Post a blend.

Check your armature bones, select heads and tails in edit mode and look at their locations. Open the properties panel (hit n) select the heads and tails of the bones that are supposed to be centered. Are they all at x=0?

Hey there, yes all the center bones are at x=0, I cant upload the blend because the figure isnt my creation so I guess I shouldnt be posting it anywhere. Any other ideas what could be causing this?

Who knows, it’s just a guessing game. Check the mesh center loop(s) of verts. Are all verts all at x=0. Select them 1 by 1, and check.

Beyond that I have no idea. Where did you get the model, what is the license? it’s possible you just need to attribute the artist.

Okay so heres what I found.

Pic 1 - The mesh in object mode, you can see that the x is 0

Pic 2 - The mesh in edit mode with everything selected, the x is no longer 0.

Pic 3 - The center line of vertices, here I have them all selected but I checked them individually and none of them is at x = 0.

What should I do?

Attachments




Your armature looks seriously messed up. Although there’s some rigs that have disconnected bones I would hazard a guess that those gaps and overlaps are where the automatic weighting is failing. Nothing seems parented but maybe it’s just not the right view or you have r lines turned off whatever.
Don’t worry, we can figure it out. Without a file it’ll just take longer, maybe a week or so of daily back and forth instead of fixing it in a couple of hours.

You could get started by posting a picture of the armature in edit mode, with the mesh hidden, two or three views from different angles, and maybe some zoomed in on the arm and chest area.

Then follow that with screenshots taken in weight paint mode of the mesh, one screenshot for each bone selected - you can right click on a bone in weight paint mode to show its weight (heat).

Also expand the vertex groups panel to its full size and take a screenshot of that.

Hey DruBan, the armature is the one from the Rigify addon so there should be no problem with it. It must be the mesh. As I said, I have tried this with a more simple version of my mesh and it worked.

Actually DruBan has a point. What you are showing is not like Rigify rig. Look at the arm, you have one bone from shoulder to elbow. That is ok. Next bone, you have forearm bone stating from halfway up the upper arm going down halfway on forearm!? The lower part of forearm is rigged with two bones side by side!? Rigify rig don’t look like that at all.

Hey ridix. Yes it is the rigify rig, it was just a different display. Here it is back in normal.

Pic 1 - the rigify armature used to generate the rig
Pic 2 - default rig display after generating

Attachments



Well that’s day 1…

Maybe you could delete that pretty generic female mesh from your file and post the rig at least so we can trouble shoot it. If it’s a rigify rig it’s not copyrighted…

Still looking for that screenshot of the armature in edit mode, and please don’t crop the image. The interesting bits are not always in the center!

Mesh looks clean. If there is a subsurf on it take it off and try again. Show wireframe view to check for internal organs.

Edit: also I bet we are not seeing the entire rig. These are just the control bones. In the armature props turn on all the bone layers please.

Are all your bones within the boundaries of the mesh and not sticking out? I would look for that, then clear all vertex groups and re-parent with automatic weights.

Which bones fail to get weighted to the mesh? What kind of results do you get?

You can rig and animate the figure with simple mesh with subsurface modifier active, and not applied. Did you try that?

Hey there guys!

Druban: Here´s the screen of the armature in edit mode. The mesh does not have a subsurf on it and as for organs theres tongue and eyballs only I believe.

Geometricity: The bones shoould be okay and the error message I get is the one I described above: “Bone heat weighting: Failed to find solution for one or more bones.”

ridix: yes I could try to do that but I now, I really wanna get to the bottom of this and find out why the more complex version of the female mesh wont work while the simpler version does : )

PS: Anybody knows how to mass move the center line of vertices to x=0 instead of positioning them one by one?

Attachments


Actually I am in same situation right now. However, I don’t think the armature is problem. Well, for my case. I have created multiple armatures and tried to riffed them, but they all didn’t work, displaying same error over and over. Last 2days I have gotten nowhere. Wasting my time and efforts.
I did try all the methods uploaded on internet, but even though I fixed the asymmetric (which was very very subtle from the beginning) didn’t work. Double vertex didn’t work, nothing works! I have already tried to make again from the scratch, but I realized that will take away alot of time. I mifht just try rigging it by my own hand. I have been usong blender for almost 5years now, and I am constantly having this problem every freaking single time I try to skin the mesh. I think blender hates me.
I should try to export the file to Maya and then import back again to blender. Or maybe O should just try to rig it in maya and bring it in to blender.

for a quick test i move a rig part way out of the human body and parented. I got no error. This error is almost always the mesh. Post a blend and get a answer.

I know what you did! You scaled the whole armature in object mode, on the z axis from the looks of the picture in post #5. Yeah don’t do that :slight_smile:

Zingzong how about you? can you upload your file that you are having problems with? it’s looking impossible to ix te file from OP without actually seeing it.