Code Monkey home page Code Monkey logo

Comments (6)

pfcDorn avatar pfcDorn commented on June 15, 2024 1

Ah...i see....not all Targets have a normal blendshape. We currently check only for the first one. Need some more changes i guess. I will take an eye of it next week !

image

from unitygltf.

pfcDorn avatar pfcDorn commented on June 15, 2024

I don't think this is needed, because we already check if there is a attribute for the morphtargetnormals.
Or do you have a gltf file which cause an error there?

from unitygltf.

FujiSunflower avatar FujiSunflower commented on June 15, 2024

Ah, I tried to import ".glb" file changed suffix from ".vrm". It happened this error.
Perhaps, VRM format has any wrong as glTF. VRM is the format based on glTF. So VRM has to change GLB.
GLB : Seed-san.zip

NullReferenceException: Object reference not set to an instance of an object
UnityGLTF.GLTFSceneImporter.ConvertAttributeAccessorsToUnityTypes (UnityGLTF.Cache.MeshCacheData+PrimitiveCacheData primData, UnityGLTF.UnityMeshData unityData, System.UInt32 vertOffset, System.Int32 indexOffset) (at Library/PackageCache/org.khronos.unitygltf@4ebe065f27/Runtime/Scripts/SceneImporter/ImporterMeshes.cs:908)
UnityGLTF.GLTFSceneImporter.ConstructMesh (GLTF.Schema.GLTFMesh mesh, System.Int32 meshIndex, System.Threading.CancellationToken cancellationToken) (at Library/PackageCache/org.khronos.unitygltf@4ebe065f27/Runtime/Scripts/SceneImporter/ImporterMeshes.cs:120)
UnityGLTF.GLTFSceneImporter.ConstructNode (GLTF.Schema.Node node, System.Int32 nodeIndex, System.Threading.CancellationToken cancellationToken) (at Library/PackageCache/org.khronos.unitygltf@4ebe065f27/Runtime/Scripts/GLTFSceneImporter.cs:809)
UnityGLTF.GLTFSceneImporter.GetNode (System.Int32 nodeId, System.Threading.CancellationToken cancellationToken) (at Library/PackageCache/org.khronos.unitygltf@4ebe065f27/Runtime/Scripts/GLTFSceneImporter.cs:771)
UnityGLTF.GLTFSceneImporter.ConstructScene (GLTF.Schema.GLTFScene scene, System.Boolean showSceneObj, System.Threading.CancellationToken cancellationToken) (at Library/PackageCache/org.khronos.unitygltf@4ebe065f27/Runtime/Scripts/GLTFSceneImporter.cs:1087)
UnityGLTF.GLTFSceneImporter._LoadScene (System.Int32 sceneIndex, System.Boolean showSceneObj, System.Threading.CancellationToken cancellationToken) (at Library/PackageCache/org.khronos.unitygltf@4ebe065f27/Runtime/Scripts/GLTFSceneImporter.cs:623)
UnityGLTF.GLTFSceneImporter.LoadSceneAsync (System.Int32 sceneIndex, System.Boolean showSceneObj, System.Action`2[T1,T2] onLoadComplete, System.Threading.CancellationToken cancellationToken, System.IProgress`1[T] progress) (at Library/PackageCache/org.khronos.unitygltf@4ebe065f27/Runtime/Scripts/GLTFSceneImporter.cs:425)
UnityGLTF.AsyncHelpers+<>c__DisplayClass0_0.<RunSync>b__0 (System.Object _) (at Library/PackageCache/org.khronos.unitygltf@4ebe065f27/Editor/Scripts/Internal/AsyncHelpers.cs:30)
Rethrow as AggregateException: AsyncHelpers.Run method threw an exception. (Object reference not set to an instance of an object)
UnityGLTF.AsyncHelpers+ExclusiveSynchronizationContext.BeginMessageLoop () (at Library/PackageCache/org.khronos.unitygltf@4ebe065f27/Editor/Scripts/Internal/AsyncHelpers.cs:130)
UnityGLTF.AsyncHelpers.RunSync (System.Func`1[TResult] task) (at Library/PackageCache/org.khronos.unitygltf@4ebe065f27/Editor/Scripts/Internal/AsyncHelpers.cs:37)
UnityGLTF.GLTFImporter.CreateGLTFScene (UnityGLTF.Plugins.GLTFImportContext context, UnityEngine.GameObject& scene, UnityEngine.AnimationClip[]& animationClips, UnityGLTF.GLTFSceneImporter& importer) (at Library/PackageCache/org.khronos.unitygltf@4ebe065f27/Editor/Scripts/GLTFImporter.cs:867)
UnityGLTF.GLTFImporter.OnImportAsset (UnityEditor.AssetImporters.AssetImportContext ctx) (at Library/PackageCache/org.khronos.unitygltf@4ebe065f27/Editor/Scripts/GLTFImporter.cs:296)
UnityEngine.Debug:LogException(Exception)
UnityGLTF.GLTFImporter:OnImportAsset(AssetImportContext) (at Library/PackageCache/org.khronos.unitygltf@4ebe065f27/Editor/Scripts/GLTFImporter.cs:741)
UnityEditor.AssetImporters.ScriptedImporter:GenerateAssetData(AssetImportContext)
UnityEditorInternal.InternalEditorUtility:ProjectWindowDrag(HierarchyProperty, Boolean)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Refererence

https://github.com/vrm-c/vrm-specification/blob/master/samples/Seed-san/vrm/Seed-san.vrm

from unitygltf.

hybridherbst avatar hybridherbst commented on June 15, 2024

@FujiSunflower out of curiosity, where was that file created / what software was it created with?

from unitygltf.

FujiSunflower avatar FujiSunflower commented on June 15, 2024

Maybe it was made by UniVRM as Refererence's url. I re-tested by UniVRM. I found the file uses Sparse Accessor.
If UniVRM use no Sparse Accessor, the file is success.
If UniVRM use Sparse Accessor, the file is failure.
And the file can import by glTFast.
Perhaps UniVRM has any problem in Sparse Accessor. But I don't know the detail.
UniVRM : https://github.com/vrm-c/UniVRM

from unitygltf.

hybridherbst avatar hybridherbst commented on June 15, 2024

Thank you! I believe the file is perfectly valid, it's just unusual that some blend shapes include normals and others not, so was curious where it comes from / what the reasoning is.

from unitygltf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.