Material replaced with "debugMaterial" after GLB-Export via Sandbox

Hi there,

I am not sure if its a bug or feature, but I have following problem:
When i load a GLB into the sandbox, ad textures to the meshs material everything looks fine at the end. Then, when i export it again as GLB, one texture is replaced with a “debugMaterial”. After a longer research i found out, that it is most of the time the first material of the material-list that is replaced.

Does anyone had the same problem or know something about that?
On the first screenshot you see the GLB before exporting and the second right after.

thank you for your help <3

Adding @bghgary for the exporter part, in the meantime @cloud could you share the file you use so it is easier to repro for us ?

model:
Insel-Double_011.zip (114.0 KB)

additional textures:
textures.zip (2.9 MB)

Hope, it helps.
Maybe it is important to say, that there is the same problem with a similar Model (smaller Plattform).

1 Like

Allright, maybe the solution is to not use PBR Materials… after this was changed by a co-worker everything works. But maybe there is someone who can explane that to me. Because for me, it was just try-and-error.

I really think it is a bug on our side as this should work :slight_smile:

I don’t know how to repro. Just loading the glb and reexporting works fine.

Can you explain what this means?

I guess modify the textures in the inspector before exporting ?

I added an albedo texture to cmaterial and it still works fine. :man_shrugging:

1 Like

This will happen if you click the wrench icon next to the texture.
image
I believe this is a debug feature which creates and swaps in an unlit debug material for testing purposes. Clicking the button again will go back to the original material. Source is here:
Babylon.js/textureLinkLineComponent.tsx at master · BabylonJS/Babylon.js (github.com)
Are you clicking this button @cloud?

As far as I can tell, this is the only way to create a material called “debugMaterial”.

3 Likes

@DarraghBurke you rock !!!

2 Likes