You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I found a problem, the same glb, previewed in edit mode, and dragged into the scene, the model behaves normally, but the dynamically loaded glb behaves abnormally. Through tracking, I found that the boneWeights of the two are slightly different, so far it seems that the difference is in precision.
Files
Below is a comparison of boneWeights between the two glb loads.
asyncvoidUpdate(){if(Input.GetKeyDown(KeyCode.A)){stringpath= HaiSdkManager.GetPersistentPath();path= Path.Combine(path,"uplimbs001.glb");
Dowork(Path.GetFullPath(path));}}asyncvoidDowork(stringfilePath){vardownloadProvider=new GLTFast.Loading.DefaultDownloadProvider();varm_Gltf=new GltfImport(
downloadProvider,new UninterruptedDeferAgent(),null,null);varimportSettings=new ImportSettings
{// Avoid naming conflicts by defaultNodeNameMethod= NameImportMethod.OriginalUnique,GenerateMipMaps=true,AnimationMethod= AnimationMethod.Mecanim,};varinstantiationSettings=new InstantiationSettings();boolsuccess=await m_Gltf.Load(filePath, importSettings);if(success){if(instantiationSettings.SceneObjectCreation == SceneObjectCreation.Never){// There *has* to be a common parent GameObject that gets// added to the ScriptedImporter, so we overrule this// setting.
instantiationSettings.SceneObjectCreation = SceneObjectCreation.WhenMultipleRootNodes;
Debug.LogWarning("SceneObjectCreation setting \"Never\" is not available for Editor (design-time) imports. Falling back to WhenMultipleRootNodes.",this);}for(varsceneIndex=0;sceneIndex< m_Gltf.SceneCount;sceneIndex++){varscene= m_Gltf.GetSourceScene(sceneIndex);varsceneName= m_Gltf.GetSceneName(sceneIndex);vargo=new GameObject(sceneName);varinstantiator=new GameObjectInstantiator(m_Gltf, go.transform,null, instantiationSettings);varindex= sceneIndex;success=await m_Gltf.InstantiateSceneAsync(instantiator, index);}}}
Looking forward to your reply!
The text was updated successfully, but these errors were encountered:
Describe the bug
I found a problem, the same glb, previewed in edit mode, and dragged into the scene, the model behaves normally, but the dynamically loaded glb behaves abnormally. Through tracking, I found that the boneWeights of the two are slightly different, so far it seems that the difference is in precision.
Files
Below is a comparison of boneWeights between the two glb loads.
And you can try this by use this glb file.
uplimbs001.glb.zip
Code
Looking forward to your reply!
The text was updated successfully, but these errors were encountered: