Bone Weights Problems

Topics: Developer Forum, Project Management Forum, User Forum
Mar 23, 2007 at 7:08 AM
I got this error when trying to build my application.

Error normalizing vertex bone weights. BoneWeightCollection does not contain any weighting values.

anybody know anything about this? any help is appreciated. thanks ^^
Mar 23, 2007 at 10:25 AM
Edited Mar 23, 2007 at 10:25 AM
It means that you have some vertices in skinned meshes that are not attached to any bones. While this is often a critical fail case, it is not always. However, (and I didn't know this till recently), calling the XNA normalize method on one of these vertices thrwos an exception. In the next release, after I fix up the absolute mesh transform issues, i'll make it just log a warning.

If you want, you can edit the source code and just take out the Normalize method call. That should fix it.
Mar 26, 2007 at 2:49 AM
if i edit the source code, can i build it into dll file again? since it's a collection of class files, i don't really know how to make it into a dll.
Mar 27, 2007 at 5:17 PM
Yes. Check out the "compiling the code from source" link off the front page faq.

To compile it into a dll, just right click on project, click properties, go to the application tab, and select "Class Library" as the output type.
Mar 28, 2007 at 2:02 AM
which part of the code with Normalize method should i take out? i thought it's just for the camera usage, since there are codes like :

Vector3 direction = location - cameraPosition;

Vector3 n = Vector3.Normalize(cameraPosition);

i tried to comment out all the line with Normalize method, at BasicPalleteEffect.cs and ModelViewer.cs and still the error remains. any suggestions? thanks..
Mar 29, 2007 at 5:30 AM
In AnimatedModelProcessor, in the ProcessVertexChannel method, you can comment out the:
Apr 2, 2007 at 3:51 AM
I forgot to mention that it worked fine now. thanks.
Apr 13, 2007 at 11:35 AM
Adding to the problems....

I am able to solve the boneweight problem this way, but a new error occurs.

Error loading "Content\gubbe". 
Cannot find ContentTypeReader Xclna.Xna.Animation.Content.SkinInfoCollectionReader, Xclna.Xna.Animationx86, Version=, Culture=neutral, PublicKeyToken=null.

Any ideas?
Apr 13, 2007 at 12:38 PM
It exists. Try remaking the project. That seems to have worked for some people with similar issues. Other than that, I can't do much since that type reader does exist.
Apr 14, 2007 at 6:25 PM
Try adding:

Type myType = typeof(ModelAnimator);

Before you load any content. This forces the dll to get loaded into memory.
Jan 9, 2011 at 3:29 PM

I focused the exact same error message using XNA 3.1 with the XNAnimation library. After a while I found the following advise in the source code solution to resolve the problem.

+ Error normalizing vertex bone weights. BoneWeightCollection does not contain any weighting values.
  + Clean the solution.
  + Close the solution.
  + Shutdown Visual Studio.
  + Restart Visual Studio.
  + Open the solution.
  + Build the solution (F7).
  + Run the application (F5).

I wrote the steps to take in some more detail here. Good luck to everybody.