KhronosGroup / KhronosGroup/glTF
[glTF 2.1] Packaging External Assets
- Dominant language
- HTML
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 17h 26m
- Merged PRs (30d)
- 5
Description
# Packaging External Assets
glTF 2.1's `externalAssets` feature allows a glTF asset to reference other glTF assets, allowing for the composition of complex scenes. The file data sourced from the `files` array may be found externally at a URI, or accessed via a buffer view. In the latter case, there is the matter of how to resolve the URIs found in the nested glTF asset.
glTF 2.1 allows for the `files` array to define an original URI value on file objects. Any other nested glTF assets containing URIs would resolve those URIs by checking these values, as if the host glTF's `files` array was a virtual file system. This mechanic has the effect of allowing a glTF asset to act as a package or container for glTF data and other associated files.
## Use cases
- Sharing buffers, textures, and other resources across multiple nested glTF assets within a complex scene.
- Packaging an existing glTF asset along with its dependencies into a single file without modifying the original data.
## Why this design
Alternative proposals for packaging were considered, such as creating a ZIP-based container format, or modifying the structure of `.glb` to support multiple JSON and binary chunks. Those approaches may be used independently of this mechanic, however they do not have the same flexibility.
Contributor guide
Research direction
No implementation files, tests, or entry points are named. Start by reviewing the glTF 2.1 externalAssets and files requirements, then determine where the URI-resolution and packaging behavior belongs. Done requires an agreed, implementable specification for nested assets and their external resources.
Written by the indexing model from the issue text.
Assessment
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100