PBR Reflectivity Texture not showing

I’m seeing an issue with reflectivity textures not showing up when loading a model from the GLB. I thought the issue was that I wasn’t including the PBR SpecGloss extension, but I added that and I’m still not seeing the texture. I could use another set of eyes to see what I am missing.

I don’t have a PG because I can’t reproduce the issue in a PG, but I do have a public reproduction if you follow these steps:

  1. Go to The Amazing EBow :: The EBow Story
  2. Click the launch button
  3. When the model loads, note the uniform gray material. It should have some speckling.

You can see the glb it is loading here, and if you load it in sandbox you can see the speckled texture.

if you need to get to the scene, you can do it by entering document.querySelector("ebow-viewer").scene._scene
You can then save that as a global, e.g. temp1, and get to one of the gray meshes using temp1.getMeshById("Body - Part 3")
I can see that the material attached to the mesh has a reflectivity texture that seems to be pointing to the correct texture, so I have no idea why it doesn’t show up. I would be grateful for any assistance in identifying the issue.

I think having access to the inspector would help.

Also, you have some errors in the console:


I don’t know if it’s related, but you should try to look for the reason for these errors, as they are probably not expected.

Those issues show up in the source GLB if you open it in sandbox and look at the GLTF validation. However, the GLB validates successfully.

As far as inspector, having some trouble getting all the imports needed when using the es6 modules. I got the debugLayer imported, but when I call show I get these errors

universalModuleDefinition:9 Uncaught TypeError: Cannot read properties of undefined (reading 'Debug')
    at universalModuleDefinition:9:88
    at universalModuleDefinition:1:1
(anonymous) @ universalModuleDefinition:9
(anonymous) @ universalModuleDefinition:1
index.js:6434 Uncaught TypeError: Cannot read properties of undefined (reading 'Inspector')
    at ar._createInspector (index.js:6434:178750)
    at index.js:6434:179605
    at LoadScript.n.onload (index.js:40:83492)

I thought the inspector is downloaded from CDN when called, but apparently there are some imports required.

Okay, I got the inspector on that site (imported “@babylonjs/inspector”). Following the steps above to get the scene assigned to a temp var, you can then call temp.debugLayer.show() to show the inspector. When you do this, it will come in huge. You will be able to hit the undock for the inspector which will undock it and make it normal size. For the scene explorer you will have to zoom your browser out to see the undock button and then you can undock it.

Looking at the texture in the inspector, I noticed that the RGB values look correct, but the alpha channel is all black, which makes the entire texture transparent. But then I’m seeing the exact same thing in sandbox, so maybe that isn’t an issue.

The problem is the contrast value of the image processing. You use a value of 3: if you set a value of 1, you will see that the meshes render as in the sandbox.

Thanks. The dangers of giving the client too many options to play with. :wink: