Bone Heat Weighting: failed to find a solution for one or more bones I'm having a problem automatically assigning weight to my mesh. I have been following this tutorial http://blog.digitaltutors.com/rigging-minutes-blenders-rigify-addon/ to teach myself how to create an armature and when I get to the section for assigning automatic weights I get the error "failed to find a solution for one or more bones." I do everything it suggests in the order it suggests it and everything up until that point works, as such when I continue with the tutorial the bones are not associated with the rig and I cannot move the mesh around.

I have been looking at other similar posts about the issue and have tried removing doubles, joining the meshes eyes to the rest of the body, turning Axis mirror on and having Bone Envelopes turned on. However none of the ideas solved the problem.

Any ideas as to why this is happening would be greatly appreciated.

It is also a MakeHuman model but I removed the rigging provided by the MakeHuman software manually.

To clarify that this is not a duplicate as it has been suggested. I followed what the solution provided by Shady Puck suggested and removed the armature modifier and instead applied a Decimate modifier. I selected Planar and set the angle limit to 6.4 degreees. I then proceeded to select the mesh then holding shift selected the armature and pressed Ctrl + P and selected "With automatic weights" but the same error message "Bone Heat Weighting: failed to find a solution for one or more bones" still appeared. I then followed the advice of the next answer given in the same link (to set the origin) and still the same error message was displayed.

This is the almost working rig however the left leg (when facing the front) does not operate correctly. https://www.dropbox.com/s/joy7zbcu0zui0hh/Original_V3_With_Armature.zip?dl=0 when using the controls to move the rig.
Use the decimate modifier, as Shady Puck mentioned.  But instead of Planar, select Un-Subdivide, and use 2 iterations. It looked pretty good to me (~29,000 -> ~14,000 polys).  But make your own judgement after trying that out.

If someone else could tell my why this works, I would be happy.  Even better, please edit this answer, so it actually sounds like a good answer.



After applying that Decimate modifier, I went into your 'rig' (did you mean to use 'metarig' to learn?) and selected the bottom-right four layers.  I had to clear the Pose constraints on the bones because they were all wacky, but once I did that, I selected those bones DEF bones and automatically assigned weights to the VGs, no envelopes required.