-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple buffers, duplicate URIs? #2446
Comments
I think that there are no constraints that disallow this, so would agree that this is technically valid. I just created a Just for the heck of it, I did two further tests: I declared them once with I also thought that it could be difficult to clearly define when two buffer declarations are actually equal. So (locally) I also tried using So ... when this is allowed, it might raise some questions for implementors. Consider an example like the (This is probably beyond what the glTF spec can cover. But for things like glTF-Transform, there will be an answer to this question, and regardless what the answer is: It might be different from what someone expects...) |
The Thes spec says:
so it's valid to declare a buffer's byte length less than the actual file. |
Yes, but I considered it to be a corner case for establishing any concept of "equality" between buffers: If two buffers with the same Even before that, the concept of "equality" can already be difficult for the When buffers with duplicate URIs are valid, some questions about what "duplicate" means don't even come up. Other details (e.g. whether clients SHOULD or MAY read these |
Planned fix in glTF Transform: No plans to round-trip such files as-is — with multiple buffers pointing to overlapping ranges of the same underlying file — but reading and writing should at least handle the files gracefully. |
I came across a file recently containing three buffers, all sharing the same URI:
No validation errors were found, and viewers I tested (three.js, babylon.js, playcanvas) seemed fine, but it did break processing in glTF Transform, which tried to overwrite the buffer repeatedly. The file also contained valid buffer views pointing to each buffer.
My impression is that this is suboptimal, but technically valid, does that seem correct?
The text was updated successfully, but these errors were encountered: