I have a problem when I’m exporting a scene with multiple objects into glb using “BABYLON.GLTF2Export.GLBAsync()”. Basically, the downloaded .glb file looks as intended when i view it in babylon sandbox, but something strange happens when i convert to .usdz. I’ve used different usdz converters, and with all of them the meshes look like they have textures/materials on the inside of the mesh.
Should look like this:
But instead looks like this:
I’ve tried changing parameters of the materials and textures in the exported glb e.g. backfaceCulling, twoSidedLighting, mesh.sideOrientation and none seemed to fix the problem.
The only thing that made any difference was if I set scene.useRightHandedSystem to true. In this case, at least the correct side of the mash has textures, but the UV mapping is then messed up:
Yes, for example glTF-Sample-Models/2.0/IridescenceLamp/glTF-Binary/IridescenceLamp.glb
This one converts okay.
A bit more context: Initially, the models I’m trying to export had many different materials, which sometimes had the same name. This meant that when I exported to GLB, some textures would be copied to parts of the model where they shouldn’t be. I then renamed all textures and materials to have unique names. After I did that, textures would no longer be copied to incorrect meshes, but the above described issue appeared.
I used Apple’s reality converter, the automatic conversion in modelviewer (requires usdz, but tries to convert on its own if you pass it only a glb file) and some free online converters.