Import GLB export as .babylon and reimport to Sandbox map the materials and textures inside out

I imported a glb model into the Sandbox to convert it to a .babylon file. When I export the file and reimport it again the texture is inside not at the original place where it was in the original model.

The model and the exported model can be found here:

Even when I load through code the texture is mapped inside not on the outside anymore.

Any idea of how to change and fix this behaviour. I would expect that when I import a glb file the will be rendered perfectly in the sandbox and exported to be as babylonjs file no switching of orientation like this happens.

Is it a bug or are there something that can be done do make it work.

Pinging @drigax for help on the serializer

I’m pretty sure we are not exporting the mesh. overrideMaterialSideOrientation or something along that line

Ok I will fix that :slight_smile:

1 Like

Will be in next nightly!

2 Likes

Thank you very much this is awesome!!! I thought I go nuts on my material issue :grinning::+1:

Happy to test.

Issue still exists and it looks more like a magic trick even after clearing the cache.

After GLB import on https://sandbox.babylonjs.com/ the logo is on the outside. The file I used can be found on github

Exporting the scene as scene.babylon and reimport again. The logo is on the inside.

Ok I will have a deeper look:) I’m still convinced we are missing a value to serialize. Will fix that asap

1 Like

OK I HAVE IT FIXED! (and this time for sure;))

Sandbox will be updated in a hour or so (and no need to reexport, the babylon will be loaded correctly this time)

3 Likes

I can confirm that it is now working!!! Thank you very much.

2 Likes

Sorry for the delay!

1 Like