The model with texture in the gltf exporter is still a white model

The steps for reproducing the operation are as follows:

This is my sandbox address:sandboxModel

I put the model into the sandbox and display it

I will upload a local texture on my computer for the material named ‘T_General’. At this point, the effect of the model has changed:

Then I exported the model:


I will drag the exported model back into the sandbox and see that the texture I just set has not taken effect, still displaying a white model:

I think this is a bug in the exporter

1 Like

This specific case is undefined behavior. The model’s meshes don’t have UVs.

In Babylon, the shader arbitrarily falls back to using the (0,0) UV coordinate for the entire mesh, which is why the meshes have a solid color after you assign the albedo texture.

To keep the exported glTF small and compatible with other viewers, the exporter omits textures when it is not used with UVs.

Do you maybe have a different repro?

Thank you for the investigation. I have found the corresponding PR modification record.

It is indeed due to Babylon’s model optimization, but for Three.js and Blender, I’ve tested them and they haven’t implemented this optimization—they still retain the textures.