google / google/bigwheels

[glTF] Use a default material when none is specified

Open
#452 0 comments 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 a material is not provided.

From [3.9.6](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#default-material):

> The default material, used when a mesh does not specify a material, is defined to be a material with no properties specified. All the default values of material apply.

This would allow us to load more models like:

- [AnimatedTriangle](https://github.com/KhronosGroup/glTF-Sample-Assets/tree/main/Models/AnimatedTriangle)
- [BoxVertexColors](https://github.com/KhronosGroup/glTF-Sample-Assets/tree/main/Models/BoxVertexColors)
- [Cameras](https://github.com/KhronosGroup/glTF-Sample-Assets/tree/main/Models/Cameras)

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.