locked
problem loading model with bone animation RRS feed

  • Question

  • I have a problem with loading a model with bone animation. I created two simple boxes with 3ds max and a simple bone animation. Then I exported this object as fbx and with the panda exporter as x file as well. When I try to load any of these models in my xna project, I get the following error:

     

    Error 1 Building content threw ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
    Parameter name: weight
       at Microsoft.Xna.Framework.Content.Pipeline.Graphics.BoneWeight..ctor(String boneName, Single weight)
       at Microsoft.Xna.Framework.Content.Pipeline.MeshConverter.FillBoneWeightCollectionFromSkin(KFbxMesh* fbxMesh, KFbxSkin* skin)
       at Microsoft.Xna.Framework.Content.Pipeline.MeshConverter.FillBoneWeightCollection(KFbxMesh* fbxMesh)
       at Microsoft.Xna.Framework.Content.Pipeline.MeshConverter.FillNodeWithInfoFromMesh(KFbxNode* fbxNode, String name, KFbxGeometryConverter* geometryConverter)
       at Microsoft.Xna.Framework.Content.Pipeline.FbxImporter.ProcessInformationInNode(KFbxNode* fbxNode, String name, Boolean* partOfMainSkeleton, Boolean* warnIfBoneButNotChild)
       at Microsoft.Xna.Framework.Content.Pipeline.FbxImporter.ProcessNode(ValueType parentAbsoluteTransform, NodeContent potentialParent, KFbxNode* fbxNode, Boolean partOfMainSkeleton, Boolean warnIfBoneButNotChild)
       at Microsoft.Xna.Framework.Content.Pipeline.FbxImporter.ProcessNode(ValueType parentAbsoluteTransform, NodeContent potentialParent, KFbxNode* fbxNode, Boolean partOfMainSkeleton, Boolean warnIfBoneButNotChild)
       at Microsoft.Xna.Framework.Content.Pipeline.FbxImporter.Import(String filename, ContentImporterContext context)
       at Microsoft.Xna.Framework.Content.Pipeline.ContentImporter`1.Microsoft.Xna.Framework.Content.Pipeline.IContentImporter.Import(String filename, ContentImporterContext context)
       at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAssetDirectly(BuildItem item, String importerName)
       at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAsset(BuildItem item)
       at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAssetWorker(BuildItem item)
       at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAsset(BuildItem item)
       at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAndLoadAsset(BuildItem item, BuildItem requestingItem)
       at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAssetViaCache(BuildItem item, String importerName)
       at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAsset(BuildItem item)
       at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAssetWorker(BuildItem item)
       at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAsset(BuildItem item)
       at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.RunTheBuild()
       at Microsoft.Xna.Framework.Content.Pipeline.Tasks.BuildContent.RemoteProxy.RunTheBuild(BuildCoordinatorSettings settings, ITaskItem[] sourceAssets, TaskLoggingHelper msbuildLog, String[]& outputContent, String[]& rebuiltContent, String[]& intermediates) 

     

    Any help would be appreciated. Is it possible that this is only a problem with the model/export or am I doing something completely wrong?

     

    thank you

    Thursday, December 14, 2006 11:18 PM

Answers

  • Are you using the Skin or the Physique modifier? If so, you have to make sure that each vertex is weighted to at least one bone, and that that bone is actually added to the modifier. Otherwise, the vertex weight may come out below 0, or above 1, neither of which is allowed.

    If you export to text mode, you can open it up and check out the weights, too, to see if they're OK. (I'm assuming it's weight that's wrong, because that's what your error message says).

    Friday, December 15, 2006 3:43 AM

All replies

  • Are you using the Skin or the Physique modifier? If so, you have to make sure that each vertex is weighted to at least one bone, and that that bone is actually added to the modifier. Otherwise, the vertex weight may come out below 0, or above 1, neither of which is allowed.

    If you export to text mode, you can open it up and check out the weights, too, to see if they're OK. (I'm assuming it's weight that's wrong, because that's what your error message says).

    Friday, December 15, 2006 3:43 AM
  • I had the same problem but in my case it was because of  system language options. In my country floats  are  write like this 123,00 not like 123.00. I've changed it in settings and now looks ok.

    Wednesday, May 2, 2007 11:08 AM
  • What exporter were you using when this happened? Sounds like a bug in the exporter - it shouldn't be writing the file in a way that varies depending on your locale settings.
    Wednesday, May 2, 2007 3:01 PM