KhronosGroup / glTF-Sample-Assets

To store all models and other assets related to glTF
255 stars 30 forks source link

Add ExternalTexture model #111

Open javagl opened 4 months ago

javagl commented 4 months ago

Addresses https://github.com/KhronosGroup/glTF-Sample-Assets/issues/76 , but rather opened for feedback than for merging it immediately, according to the discussion in the issue:

This is a glTF asset that is only offered as glTF-Binary. It is a simple quad with a texture. The texture is referred to from the .glb file as an external resource.

This is not common practice. Usually, GLB files are supposed to be complete and self-contained. However, there are legitimate use-cases where people would like to store textures outside of GLB assets. (Specifically, when there are "large", texture-atlas like textures that are used in multiple small GLB assets).

So this model could serve as a test case for the ability of engines and libraries to handle this.

(And I assume that there are some toolchains and workflows that will choke on this - namely, all tools that just iterate over the glTF-Sample-Assets directory and try to load each .glb file, assuming that it will be self-contained- That could be a reason to not add this, because it can cause an inconvenience for those who created these tools, but ... it might as well just point out a limitation . I actually just stumbled over such a limitation, on a very fundamental level, and now have to find a workaround... 🤞 )