prefrontalcortex / UnityGLTF

Runtime GLTF Loader for Unity3D
MIT License
163 stars 41 forks source link

gltf export produces validator with errors #141

Open write3371 opened 3 months ago

write3371 commented 3 months ago

I tried to record a gltf animation from unity but KhronosGroup/glTF-Validator shows a lot of error of ACCESSOR_ANIMATION_INPUT_NON_INCREASING

It means there was a Time value in an animationclip that is equal or less than the previous time value.

Is it possible to clean up export so that has correct gltf format like in https://github.com/mrdoob/three.js/pull/27529/files ?

here is my file output.zip

hybridherbst commented 3 months ago

Hey @write3371 please list more information, like which version of UnityGltf, Unity, ... you're using. This error should not happen on recent versions.

write3371 commented 3 months ago

it's the latest master installed on unity 22.3.5f1

hybridherbst commented 3 months ago

@write3371 can you please provide version information? "latest master" can mean any version depending on when you installed it, especially since there is no "master" branch at all.

  1. Please follow the installation steps here (https://github.com/khronosgroup/UnityGLTF?tab=readme-ov-file#installation) and then if the issue reproduces please provide the exact version (you can see it in Package Manager) of UnityGLTF.
  2. Please provide the input files that reproduce your issue (e.g. a unitypackage and steps on how to reproduce). Only looking at the output does not allow us to reproce the actual issue.

Thanks!

write3371 commented 3 months ago

Sorry, it was the main branch.

 "org.khronos.unitygltf": {
      "version": "https://github.com/prefrontalcortex/UnityGLTF.git",
      "depth": 0,
      "source": "git",
      "dependencies": {
        "com.unity.nuget.newtonsoft-json": "2.0.0",
        "com.unity.modules.imageconversion": "1.0.0",
        "com.unity.shadergraph": "10.0.0",
        "com.unity.mathematics": "1.0.0"
      },
      "hash": "dbd863412a2807fea00b4433d28ec3682eac6bda"
    },

I was trying to export a https://github.com/vrm-c/UniVRM with animation. I set Time.captureDeltaTime = 1.0f / 30; and then do StartRecording(); in Update(). I don't think there is anything else special