Navigation Menu

Skip to content
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

Load standalone materials from GLTF #6818

Closed
CadsoftBrianW opened this issue Sep 6, 2019 · 3 comments · Fixed by #8680
Closed

Load standalone materials from GLTF #6818

CadsoftBrianW opened this issue Sep 6, 2019 · 3 comments · Fixed by #8680
Assignees
Labels
enhancement glTF help wanted in progress Someone is currently working on this issue
Milestone

Comments

@CadsoftBrianW
Copy link

CadsoftBrianW commented Sep 6, 2019

Feature request

Forum Link: https://forum.babylonjs.com/t/standalone-gltf-materials/5481/2

  • Load standalone materials from a gltf file.

Example GLTF file:
{
“asset”: {
“generator”: “COLLADA2GLTF”,
“version”: “2.0”
},
“materials”: [
{
“pbrMetallicRoughness”: {
“baseColorFactor”: [
0.800000011920929,
0.0,
0.0,
1.0
],
“metallicFactor”: 0.0
},
“name”: “Red”
}
]
}

@JoshKlint
Copy link

FYI: According to the GLTF spec, a GLTF file may contain collections of materials or other items.

I have suggested that a "material" tag be added to the root scene structure, analogous to the "scene" value that specifies which scene is the "main" one:
KhronosGroup/glTF#1420

@Popov72 Popov72 self-assigned this Jul 10, 2020
@Popov72 Popov72 added the in progress Someone is currently working on this issue label Jul 10, 2020
@Popov72
Copy link
Contributor

Popov72 commented Aug 3, 2020

Should we add a flag in the GLTF loader to force loading materials that are not used by meshes or should the loader always load all materials from the GLTF file unconditionally?

@Popov72
Copy link
Contributor

Popov72 commented Aug 3, 2020

So we decided with @sebavan to load materials only if a given flag is true and we will only create an instance of a material if not already used by a mesh of the GLTF file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement glTF help wanted in progress Someone is currently working on this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants