Validation and .glb export fail for files with multiple buffers
D
Don McCurdy
The viewer struggles with files containing multiple buffers. It cannot run them through the validator, and fails to export them to
.glb
(which would require consolidating the buffers). These files are pretty rare, but all the same – validation should work. And either export to
.glb
should handle the buffers automatically, or be disabled in the UI.Sample model:
D
Don McCurdy
Merged in a post:
fails to export glb
makc
so I load this gltf+bin model in, and then try to export glb, but it says Error: GLB must have 0–1 buffers. is there really a valid gltf that cannot be converted to glb?
D
Don McCurdy
Could you post the GLB? Since it can't be attached here, an issue at https://github.com/donmccurdy/glTF-Transform would do. Some glTF files might have multiple buffers, which would need to be consolidated before exporting to GLB. That
should
happen automatically, but apparently isn't in this case.Or it might be that the entire buffer is empty (unusual if so... entire scene has no geometry?) but that still shouldn't break export...
makc
Don McCurdy: done, https://github.com/donmccurdy/glTF-Transform/issues/1024 (2^10)
makc
if I run following transform
(d) => {
const p = prune();
for(let i = 0; i < 10; i++) p(d);
}
it always says "Removed types... Buffer (1)" only once followed by 9 "No unused properties found", but as soon as I run it again - there goes another Buffer (1) lol
makc