Comments (5)
There's a few different cases in cgltf
library that is used for parsing that emit this error code. I think I'd need the file to debug this.
from meshoptimizer.
I have shared the GLB on your email's ([email protected]
) drive: https://drive.google.com/file/d/1xXvBiHaGHztdKxcp7HWQ7TzLxVNAZPkq/view?usp=sharing
Thank you
from meshoptimizer.
Thanks! I've debugged this and this is coming from this line that validates animation input/output count:
https://github.com/jkuhlmann/cgltf/blob/master/cgltf.h#L1741
The file has one animation with 6382 key frames that is targeting a mesh with 6218 morph weights. As a result, the expected number of output values in the animation track is 39683276, but the actual value in the file is 40723542. The mismatch causes a validation error that is making the file not load (the error should probably have been invalid glTF here).
You can use Khronos glTF Validator on the file in question (https://github.com/KhronosGroup/glTF-Validator/releases) and it will also produce the validation error:
{
"code": "ANIMATION_SAMPLER_OUTPUT_ACCESSOR_INVALID_COUNT",
"message": "Animation sampler output accessor of count 39683276 expected. Found 40723542.",
"severity": 0,
"pointer": "/animations/0/channels/0/sampler"
}
So I think gltfpack is correct here. Moreover, 40723542 when divided by 6382 is 6381 which makes more sense in this style of animation where every keyframe is a single pose. It looks like some morph targets got dropped during export - I don't know if it's a Houdini bug (which is listed as an export tool on the metadata) or if the file was tweaked in some way after that. Notably I tried just commenting out the assert/validation and the animation ends up being incorrect after all - as in, I think the animation track data does expect 6381 key frames, and so using something like Babylon JS viewer I get some frames where two weights that add up to one are not consecutive, causing weird interpolation artifacts between two blend shapes that are too far away.
I'll submit a small change to cgltf to change the error code here to invalid glTF to make things like this easier to debug in the future, I should have suggested glTF Validator from the beginning but the error code misled me into thinking it's an overflow error or something like this.
from meshoptimizer.
cgltf change that will adjust the error code: jkuhlmann/cgltf#242 - after this gets merged and gltfpack copy gets updated, this file will get "invalid glTF" error on load instead. Nothing more can be done here without fixing the file / export process I think.
from meshoptimizer.
Thank you for detailed analysis ❤️ ! Yes, a better error message will definitely help for future users.
from meshoptimizer.
Related Issues (20)
- gltfpack: Material Kd is not making it into baseColorFactor HOT 6
- Point cloud meshlet generation HOT 2
- Assertions in meshletization when using uncommon `meshlet_triangles` values HOT 2
- Add soversion to shared library HOT 1
- gltfpack: Objects with large scales distort other objects' geometry HOT 3
- ADD Merge Materials HOT 2
- gltfpack: Simplification take in account the vertex color HOT 2
- Verify the triangles are not intersecting each others when simplifying HOT 1
- Avoid hole creation HOT 4
- Simplify error calculation question / issue HOT 5
- GltfPack isnt preserving identical node hierarchy with -kn -km flags activated HOT 1
- Simplification should prefer more uniformly tessellated meshes HOT 6
- Custom attributes ( for example IDs) HOT 1
- Documentation direction Encoder User Guide HOT 3
- gltfpack: Tangent quantization is capped at 8 bits HOT 1
- gltfpack: Output GLTF is invalid if input scene has missing image files HOT 5
- gltfpack: Keep image names and unused named images HOT 1
- gltfpack: Keep `EXT_mesh_gpu_instancing`
- Simplification produces reversed faces HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meshoptimizer.