|Topic was automatically imported from the old Question2Answer platform.
In recent development, I encountered such a problem.
I refer to the Compiling for Android method and add the gltf module to the Android export template.
On the Android platform, use the GLES3 engine. Use the following code to import the glb file, and the texture in the glb file will be rendered black.
var sceneGltf = PackedSceneGLTF.new()
Spatial spatial = sceneGltf.import_ gltf_ scene(vglbpath)
I guess this problem is caused by the use of different color spaces between GLES3 and GLES2, about sRGB and Linear Space. But I don’t know how to solve this problem.
Do you have the same problem?
Is there any way to solve this problem and let the texture image display normally?
adb logcat to view a log of the running device while the glb is being loaded on Android. There should be an error message created by Godot to tell you why the texture is failing to load (it’s probably not a sRGB → linear issue, but rather something related to a VRAM compression format).
Also, does it work when exporting the project to a desktop platform? I’d ensure it works when exported to desktop first to rule out any issues related to enabling the glTF module in an export template (which is not officially supported in 3.x).
Calinou | 2022-12-20 00:06