Essentially I’m trying to reload a serialized scene or rather the content of the scene (the scene itself is NOT serialized), which works perfectly fine regarding anything Meshbuilder created.
There’s also glb models that are imported via LoadAssetContainerAsync which also works perfectly fine the first time, but as soon as I’m deserializing the scene the models become invisible and may only be seen if a glow layer is active as a faint figure.
I tried not serializing these models and adding them again like the first time, but it also results in invisible models.
When I toggle reflections in the inspector the models appear normally again.
Also I tried converting the PBR materials to Standard which makes the models show up but with crushed colors.
Now in my particular case it’s not really feasible to recreate the problem in a playground as I’m working with a Construct 2 plugin.
To try to fix the crushed colors I attemped something like
standard.diffuseTexture.onInternalTextureReadyObservable.add((internalTexture) =>{
internalTexture._isRGBE = false;
internalTexture.gammaSpace = true;
internalTexture.getEngine().updateTextureSampling(internalTexture);
}
Which indeed fixes the colors but apparently breaks the hierachy as moving the root mesh doesn’t move the actual model anymore after that.
Consulting AI comes up with the following conclusion:
Hard conclusion
There is no public API or small code snippet in Babylon that will let you:
-
Fix the gamma/visuals on StandardMaterial
-
Preserve the root mesh hierarchy
-
During a GLB → Standard conversion
…without either:
-
Breaking the hierarchy (early fix), or
-
Losing color fidelity (late fix).
This is why all the approaches you’ve tried—manually toggling reflection in the inspector works, but programmatic equivalents do not—fail in the same way. There is no “hidden trick” left.
So I thought I should maybe ask around here instead for any further insight.