Hi,
I’m having issues with the GLB Exporter, if KTX2 compressed textures are involved in the model.
Open this playground example of a model with KTX2 compressed textures only and trigger the GLB export using the built in inspector.
When opening the exported GLB in the sandbox, you’ll see that the model is black and all textures are empty/transparent.
However if the textures are additionally provided as png in the very same model, the export seems to work fine.
In this playground example the model is created with standard (png) textures and KTX2 compressed textures.
In this case the export works and also the KTX model is shown correctly in the sandbox.
I know why this is now. The exporter doesn’t handle compressed textures at all right now. It happens to work for the second playground example to due an incorrect assumption in the exporter which causes the exporter to dedupe the ktx2 textures as the png textures from the other mesh.
This will likely take some time to fix all the places in the exporter. Can it wait until after the 5.0 release?
I’ve ran into a similar issue, and the problem is that reading compressed textures is not supported in hardware, so there needs to be workaround. I’ve live-patched the Engine._readTexturePixelsSync method with something like this patch-gettexture.js · GitHub and it seems to work well. Caveat: this version tested on WebGL 2 only.