GLTF material extension attribute loading texture twice

I found through the source code that gltf has some extended attributes that load textures twice.

gltf json:

sandbox load:
image

cc @bghgary

@brightMoon Can you provide a repro so I can investigate?

see:
https://sandbox.babylonjs.com/?assetUrl=https://raw.githubusercontent.com/Jeggery/storageResources/master/models/glb/car/carTransmission.glb

In addition, exporting a glb file from the sandbox and importing the new glb file into the sandbox will result in four normal maps

Each extended property will call loadMaterialBasePropertiesAsync again

Wow, nice find. A whole bunch of loader extensions are calling an extra loadMaterialBasePropertiesAsync. I can’t believe no one has noticed until now. :slight_smile:

I will fix them. Thanks for reporting this!

Fixed here: Remove extraneous load of material base properties in some glTF loader extensions by bghgary · Pull Request #15555 · BabylonJS/Babylon.js (github.com)

3 Likes

Not bad, as long as it’s discovered and repaired, it’s never too late :grin:

1 Like