Closed Joen-UnLogick closed 9 years ago
I'm receiving this error when trying to create the slot via the MaterialBuilder with blender exported fbx.
I'm using Blender v2.73 and Unity v4.6.3f1
Some additional information.... I have been tracking the logic through the code and found that the logic was unable to find the "Hips" bone on the SkinnedMeshRender of the data parameter in the AlignBindPose method on the SkinnedMeshAligner class. I checked the skinned mesh render of my imported fbx and it appears to be selecting the "Global" bone as the root bone. I checked the other assets and they appear to have their root bone set to "Hips". I am now investigating if it is a problem with importing to Unity or if it is a problem with exporting from Belender. Either way the problem seems to be that it can't find the "Hips" bone. The bone is actually present in the bones of the SMR but it is below the Global bone and not a parent bone thus the existing code/logic can't find it as it always looks up to the parent and attempts to find the child bone. In this case the "Hips" bone is 2 levels down so it is never found.
Imported FBX Skinned Mesh Render
UMA_Human_Male Skinned Mesh Renderer
2 Levels Down from assigned Root Bone
I believe the issue with root bones above "hips" has been corrected in UMA2 via the null check in commit 59f8f98 in DeathToScriptableObjects.
Thanks for the feedback. I did find that there is a know issue with Blender v2.73a exporting FBX version 7.4 Binary. The following settings resolved the issue with the Global bone being assigned as the Root Bone.
Blender v2.73a Settings (These settings worked for me)
The fast way to solve this is to bind the skeleton using "bind to: selected joints" and only include bones starting at Hips bone hierarchy. This prevents Maya from including UMA_Male_Rig, Global and Position on the vertex weight group and add skin influence to those. That´s what was generating the errors I´ve received so far. This also solves the error RhodeRash posted (https://github.com/huika/UMA/issues/14) concerning Material Builder not finding "Hips" bone on the SkinnedMeshRender.
There seems to be one or more problems when creating slots from fbx files exported from maya.
Callstacks may look likt his:
ArgumentNullException: Argument cannot be null. Parameter name: key System.Collections.Generic.Dictionary
2[UnityEngine.Transform,UnityEngine.Transform].TryGetValue (UnityEngine.Transform key, UnityEngine.Transform& value) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:58 UMA.SkinnedMeshCombiner.RecursivelyMapToNewRoot (UnityEngine.Transform bone, UnityEngine.Transform hierarchyRoot, System.Collections.Generic.Dictionary
2 boneMap) UMA.SkinnedMeshCombiner.RecursivelyMapToNewRoot (UnityEngine.Transform bone, UnityEngine.Transform hierarchyRoot, System.Collections.Generic.Dictionary2 boneMap) UMA.SkinnedMeshCombiner.RecursivelyMapToNewRoot (UnityEngine.Transform bone, UnityEngine.Transform hierarchyRoot, System.Collections.Generic.Dictionary
2 boneMap) UMA.SkinnedMeshCombiner.CloneBoneListInNewHierarch y (UnityEngine.Transform rootBone, UnityEngine.Transform[] bones, System.Collections.Generic.Dictionary2 boneMap) UMA.SkinnedMeshCombiner.CombineMeshes (UMA.CombineInstance& target, .CombineInstance[] sources, UnityEngine.Transform rootBone, System.Collections.Generic.Dictionary
2 boneMap) UMA.SkinnedMeshCombiner.CombineMeshes (UnityEngine.SkinnedMeshRenderer target, .CombineInstance[] sources, System.Collections.Generic.Dictionary`2 boneMap) UMA.UMADefaultMeshCombiner.UpdateUMAMesh (Boolean updatedAtlas, UMA.UMAData umaData, System.String[] textureNameList, Int32 atlasResolution) UMA.UMAGeneratorBuiltin.UpdateUMAMesh (Boolean updatedAtlas) UMA.UMAGeneratorBuiltin.HandleDirtyUpdate (UMA.UMAData data) UMA.UMAGeneratorBuiltin.OnDirtyUpdate () UMA.UMAGeneratorBuiltin.Update ()I've already spent a few hours without locating the problem.