google / google/bigwheels

[glTF] Load embedded textures with data URI scheme

Open
#454 1 comment 0 reactions 1 assignee Claimed by @footballhead View on GitHub
enhancement
Dominant language
C++
Stars
107
Forks
42
PR merge metrics
No merged PRs in 30d

Description

Using `scene::GltfLoader`, some models in [glTF-Sample-Assets](https://github.com/KhronosGroup/glTF-Sample-Assets) fail to load because the texture is embedded with the [data URI scheme](https://en.wikipedia.org/wiki/Data_URI_scheme).

From the spec [5.18.1](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#_image_uri):

> Instead of referencing an external file, [image.uri] MAY contain a data:-URI

This would allow us to load more models like:

- [DamagedHelmet (glTF-Embedded variant)](https://github.com/KhronosGroup/glTF-Sample-Assets/tree/main/Models/DamagedHelmet)
- [Duck (glTF-Embedded variant)](https://github.com/KhronosGroup/glTF-Sample-Assets/tree/main/Models/Duck)
- [BoxTextured (glTF-Embedded variant)](https://github.com/KhronosGroup/glTF-Sample-Assets/tree/main/Models/BoxTextured)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.