glTF serializer has removed the extensions and extensionsUsed?

Hi, BabylonJs Forum.

When I Updated the babylon to the latest version of 7.48.0, the gltf exported data has removed the extensions and extensionsUsed. With the version of 7.37.0, the data includes the extensions and extensionsUsed.

Using the babylonjs of the 7.37.0. The gltf exported data includes the extensions and extensionsUsed.

Is this a bug or a feature?

1 Like

cc @alexchuber

1 Like

The issue is related to material.subSurface.isRefractionEnabled being set to false instead of true somewhere. You can see this yourself if you zoom in close enough to the model and compare between versions.

Latest:


6.49:

Do you know of any recent changes surrounding materials in the glTF loader? @ryantrem

Ah, this is related to recent glTF loader improvements!

The original glTF from your playground is technically invalid, as it does not define “extensionsUsed”. The loader is now optimized to dynamically import extension handlers based on whether they exist in the extensionsUsed object.

So this is expected behavior, but I suppose it might be considered a breaking change?

EDIT: To clarify, what I’m trying to say is that this isn’t related to the exporter at all. If the extensions are not defined in extensionsUsed, then they are not imported, so thus they are also not exported.

1 Like

Thanks a lot for your explanation. And the glTF loader improvements is so great!!!

I’m not looking to discuss the glTF loader behaviors.

My confusion is about the glTF serializer, not the glTF loader. The data exported by glTF serializer doesn’t include extensions or extensionsUsed of the latest version.

1 Like

I dropped your original file into https://gltf.report/ and there are no extensions there at all.

Meanwhile, when I export from the Sandbox a valid GLB file I can see all extensions as it should be.

@alexchuber @labris Sorry for taking up your time. The issue was with my code, the API itself is fine.

3 Likes