Gltf2 doesn't detect difference between baseColor Texture and Diffuse.

Issue #59 new
Some Guy created an issue

While this is one of the advanced tests here. https://github.com/cx20/gltf-test/tree/master/tutorialModels/SpecGlossVsMetalRough
Using the newer beta version it makes no distinction between the two textures here https://github.com/cx20/gltf-test/tree/master/tutorialModels/SpecGlossVsMetalRough/glTF

The two items are png’s found within a GLB in this case labeled WaterBottle_diffuse.png and WaterBottle_baseColor.png.

The diffuse i believe is used in a specular glossyness workflow while the diffuse is used in both as is metalness.
This particular problem is different from others as they are both detected but the baseColor is labeled Diffuse instead of baseColor.

Which is the term gltf2 uses for its base or classical diffuse texture.

https://github.com/KhronosGroup/glTF-Sample-Models/pull/192

Metal Roughness as well is also always placed in Unknown which is a Required component of a pbr shader. But i can just manually move it over with a bool in the constructor as a hack around.

Not a very good example as my shader is far from done but the further i get with it, the more the problem becomes importing gltf right. Right now im actually only trying to load GLB’s i suppose i could manually load these test pngs but that kinda defeats the purpose if i come across a glb. Wish i had resources to help out with this but im just a hobbyist best i can do is report bugs i find.

Comments (4)

  1. Nicholas Woodfield repo owner

    Unfortunately this is because of the native importers and not something that is controlled at the wrapper level. IMO assimp's pbr materials are inconsistent between formats and downright confusing.

    I was working on some helper methods in the material class to help make it less confusing to extract the types of PBR textures before doing an official 5.0 release. Life hit and had to take a break from my projects for a while.

  2. Log in to comment