Results 1 to 18 of 18
  1. #1

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

    trying to create bone heat I got

    bone heat weighting: failed to find solution for one or more bones

    so, what does it mean?



  2. #2
    Most likely you have X-Axis Mirror turned on, but your armature isn't really symmetrical, i.e. a bone is named wrong on one side or another/and is out of symmetry .

    Also make sure the central axis bones (bones without _L or _R extensions) are lined up properly along the X axis (select them all in Edit Mode and hit S -> X -> 0) . You might have to move one side of the L/R bones to get them to align afterwards (use L to select linked bones) .



  3. #3
    I'm not using X-Axis Mirror but I did manually duplicate, mirror and reconnect some of the bones, could that be the problem?



  4. #4
    Yes, I think the bone heat skinning is based on having the X-Axis Mirror on . Just turn it on and see if you still get the error message . If you do do what I suggested above .



  5. #5
    I still got that error but additionally I don't want to use X-Axis Mirror because my model's not completely symmetrical.



  6. #6
    Well then you will just have to skip using the bone heat skinning until/ if Brecht gets around to coding it for asymmetrical armatures/meshes . You'll just have to use the other options available like envelopes/weight painting/manually assigning vertex groups etc.

    But if you really need the feature you can try a workaround if the asymmetry in your model isn't complicated ... first just make your model symmetrical, then make an equally symmetrical armature with X-Axis Mirror on and parent etc, so the feature works . Now go into Pose mode and try simulate the asymmetry with a pose with the armature . Once you are happy with the results select all bones and hit I and set a keyframe (make sure you are at frame 1) ... Go into the Action Editor and rename the Action something like "Basis" ... Now whenever you want to animate just open this "action" to start keying poses ...

    If you want an another level of "pose security" you could also add empties along the armature chain by 1) add empty 2) shift-select the bone you want he empty to be assigned to 3) SHIFT+CTRL+P to make parent without inverse (which will snap the empty to the head of the bone) ... 4) and once you have done that for the entire armature you can save the rotational data to the empty by hitting Alt-P -> Clear and Keep Transformation (Clear Track) ... Just in case some how you loose the action data or if you want to actually make the armature's rest position/edit pose the same as the mesh (... remember the empties' position in 3D represents the position of a head of a bone) so you could just Shift-S to get the actual position of the head/tail positions by tabing in and out from Object to bone Edit Mode ...



  7. #7
    Member martinellison's Avatar
    Join Date
    Aug 2006
    Location
    Hong Kong
    Posts
    155

    When is it unhappy?

    Does anyone know the exact formula the bone heat code uses to work out that it is not happy with the armature?

    I am trying to write a script to fix an armature (from MakeHuman).

    Looking at the source code... the message comes from ./source/blender/src/meshlaplacian.c around line 715. It tries to solve a Laplacian, and if that fails, it displays the message. Presumably, see http://en.wikipedia.org/wiki/Laplacian. I have looked at the code, but so far I can say that it has something to do with matrixes.

    It would be nice if the code could tell us which bones had problems and perhaps even provide a second-best solution if the Laplacian does not work. At least it could fail a bit better by continuing with the other bones so that maybe only one bone needs manual weight painting, rather than stopping the whole exercise at the first bone with a problem. The code is looping through the bones in sequence, and for each one it sets up a Laplacian, solves it, and then uses it to define the weights for each vertex. I think the idea is that we get a nice smooth fall-off in the weights so that the mesh deforms evenly.
    Last edited by martinellison; 25-Jul-08 at 11:57. Reason: More research into problem



  8. #8
    what martinellison said plus

    1, from a algorithmic perspective why does it need to be x mirrored but doesn't care about the other 2 axises

    2, im pretty sure I have gotten bone heat to work without x mirroring before, is it possible when it gives this message their actually something about the mesh it doesn't like?



  9. #9
    Member martinellison's Avatar
    Join Date
    Aug 2006
    Location
    Hong Kong
    Posts
    155

    This script worked for me

    I have written a script which fixed my mesh (as output from MakeHuman). When it runs, it will list all the armatures and meshes in the scene, and you need to select one of each.

    This is not tested very much, so feedback would be good.
    Code:
    #!BPY
    
    # """
    # Name: 'Re-align Armature'
    # Blender: 246
    # Group: 'Mesh'
    # Tooltip: '(Re)Attach an armature to a mesh and ensure that they have the same object centres.'
    # """
    
    import Blender 
    from Blender import Window, Draw, Scene, Object, Mesh
    
    __author__ = 'Martin Ellison'
    __version__ = '1.0 2008/07/30'
    __url__ = []
    __email__ = ["Martin Ellison, m.e:acm*org", "scripts"]
    __bpydoc__ = """\
    From the popup, select one armature and one mesh.
     
     """
    
    # ***** BEGIN GPL LICENSE BLOCK *****
    #
    # Script copyright (C) Martin Ellison
    #
    # This program is free software; you can redistribute it and/or
    # modify it under the terms of the GNU General Public License
    # as published by the Free Software Foundation; either version 2
    # of the License, or (at your option) any later version.
    #
    # This program is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    # GNU General Public License for more details.
    #
    # You should have received a copy of the GNU General Public License
    # along with this program; if not, write to the Free Software Foundation,
    # Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    #
    # ***** END GPL LICENCE BLOCK *****
    # --------------------------------------------------------------------------
    import Blender
    from Blender import Window, Scene, Geometry, Mathutils, Object, Armature, Mesh, Draw
    from Blender.Mathutils import Vector
    
    def alignArmature(armatureObject, meshObject):
            armatureLoc = Vector(armatureObject.loc)
            armature = armatureObject.getData()
            meshLoc = Vector(meshObject.loc)
            diff = armatureLoc - meshLoc
            armature.makeEditable()
            for bone in armature.bones.values():
                    bone.head -= diff
                    bone.tail -= diff
            armature.update()
            armatureObject.setLocation(meshObject.loc)
    
    def main():
            print '-----'
            scn = Scene.GetCurrent()
            sel_object = scn.objects.active
            popup = []
            armatures = []
            meshes = []
            for obj in scn.getChildren():
                    if obj.type == 'Armature':
                            tog = Blender.Draw.Create(0)
                            popup.append((obj.name + ' (arm)', tog))  
                            armatures.append((tog, obj.name))
                    if obj.type == 'Mesh':
                            tog = Blender.Draw.Create(0)
                            popup.append((obj.name + ' (mesh)', tog))  
                            meshes.append((tog, obj.name))
            if not Blender.Draw.PupBlock("Attach mesh to armature? ", popup): return
            armatureName = ''
            for tog, name in armatures:
                    if tog.val:
                            if armatureName != '': Draw.PupMenu("Duplicate armature")    
                            armatureName = name
            meshName = ''
            for tog, name in meshes:
                    if tog.val:
                            if meshName != '': Draw.PupMenu("Duplicate mesh")    
                            meshName = name
    
            mesh_object = Object.Get(meshName)
            armature_object = Object.Get(armatureName)
            if mesh_object.getType()!='Mesh':
                    result = Draw.PupMenu("You need a mesh")             
                    return
            the_mesh = mesh_object.getData(mesh=1)
            print 'the mesh is at ', mesh_object.loc
            if armature_object.getType()!='Armature':
                    result = Draw.PupMenu("You need an armature")             
                    return
            the_armature = armature_object.getData()
            print 'the armature is at ', armature_object.loc
    
            editmode = Window.EditMode()   
            if editmode: Window.EditMode(0)   
            Window.WaitCursor(1)  
    
            if mesh_object.parent != None: mesh_object.clrParent()
            alignArmature(armature_object, mesh_object)
            armature_object.makeParentDeform([mesh_object])   
                    
            if editmode: Window.EditMode(1) 
            Window.WaitCursor(0)
            Window.RedrawAll() 
      
                
    if __name__ == '__main__':
       main()



  10. #10
    Member martinellison's Avatar
    Join Date
    Aug 2006
    Location
    Hong Kong
    Posts
    155
    Besides fixing a few things* with the above script, I have tried again with the same mesh, ran the script again, but this time it 'failed to find a solution'. So I don't know what to; forget about bone heat?

    * (You need to change
    diff = armatureLoc - meshLoc

    to diff = meshLoc - armatureLoc

    I think)
    Last edited by martinellison; 06-Aug-08 at 03:47. Reason: explain fix



  11. #11
    Member Moritz's Avatar
    Join Date
    Sep 2009
    Location
    Germany
    Posts
    33
    Hi, I got the same problem with that error message. I fixed it by turning on subsurf. Donīt ask me why, but when you turn on subsurf the problem is solfed. After connecting the armature to the mesh you can just deactivate subsurfing and it works perfectly.



  12. #12
    Originally Posted by Moritz View Post
    Hi, I got the same problem with that error message. I fixed it by turning on subsurf. Donīt ask me why, but when you turn on subsurf the problem is solfed. After connecting the armature to the mesh you can just deactivate subsurfing and it works perfectly.
    Nice that worked for me too! Thanks.



  13. #13
    I've had this problem before 2.5 . my solution is to build deform bones in one layer, control bones in a separate layer and and use bone heat with only deform bones. I think you get this problem when you have for example eight bones in and around a foot but only two
    deformer bones.



  14. #14
    Member almux's Avatar
    Join Date
    May 2007
    Location
    Switzerland
    Posts
    2,021
    @Moritz
    Probably why i (allmost) never have any bad issues with Bone Heat... Never do nothing with no Subsurf on!!
    ((Mac OS X 10.7.5, 2 x 3 Ghz Quad Xeon, 16 Go 667 Mhz DDR2 FB-DIMM, Radeon 6870 HD Asus. Mostly using FCS pro and Blender 2.6X)) This one: OUT OF ORDER!
    Computer in loan: Mac OS 10.8.5, 2 x 2.6Ghz Quad Xeon, 24 Go 1066 Mhz DDR3, Radeon 6870 HD Asus (from older).



  15. #15
    Try a 'remove double' before using bone heat.



  16. #16
    Member
    Join Date
    Jun 2008
    Location
    Laguna Beach, CA
    Posts
    41

    bone heat not finding a solution

    I have tried all the recommendations on this track. Made sure my non side specific middle bones are exactly at the middle line. As for double checking and ensuring how perfectly mirrored my armature is. I did create it with X-mirror on, but I might have moved some bones on one side by turning the X-mirror off temporarirly. That is there could be very slight location mismatches between both sides. Or who knows I might have mistyped some of the bone names. I did not automatically generate 'em. Is there any kind of script that can check one's armature for symetry and use one side as the master and report on the mismatches it finds, and automatic fixes it makes?

    I not only removed doubles, I ran "clean meshes" script.

    I tried enabling the Display of Subsurf that did not do it, I Applied it. Since I was not sure what you meant by "Turning On subsurf".

    Except this last recommendation

    Originally Posted by sx-1 View Post
    I've had this problem before 2.5 . my solution is to build deform bones in one layer, control bones in a separate layer and and use bone heat with only deform bones. I think you get this problem when you have for example eight bones in and around a foot but only two
    deformer bones.
    I did not try putting my deform bones in a separate bone group than my other bones. I kind of assumed the algorithm would check on the Deform flag of the bones as it seeks a solution. It sounded like 2.49b would need this work around, correct? My rig is not that sophisticated to have control bones outnumber deform bones. ;-)
    Last edited by meloblends; 12-Sep-10 at 02:23. Reason: added content



  17. #17
    I had the same problem and I fixed it by applying scale and rotation
    from 3d window tool bar --> Object --> Apply --> Rotation & Scale
    also I turned X-Axis Mirror off for the Armature



  18. #18
    Member Tobop's Avatar
    Join Date
    Apr 2011
    Location
    Australia
    Posts
    7
    I had the same prob in Blender2.57, upgraded to 2.59 - same problem...
    My issue was the mesh.
    I fixed it by selecting all > Mesh > Verticies > Smooth Vertex - then parenting the rig.
    Last edited by Tobop; 16-Oct-11 at 11:11.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •