Unsupported texture format or type: format 5, type 2

Hello everyone!
I am trying to load GLB files to a scene. It works perfectly for some files, but some other files it returns this Unsupported texture format or type: format 5, type 2. error:

RuntimeError: Unable to load from https://ipfs.io/ipfs/QmeciRLhTmE7bw5r5h76kqrftuQasXMgnFikx4KmrdGNEm: Unsupported texture format or type: format 5, type 2.
BaseError@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:115780:45
RuntimeError@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:115807:30
errorHandler@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:161368:109
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:161412:25
tryCallOne@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:28931:16
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:29032:27
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:30196:26
_callTimer@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:30096:17
_callReactNativeMicrotasksPass@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:30131:17
callReactNativeMicrotasks@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:30339:44
__callReactNativeMicrotasks@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:3025:46
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:2803:45
__guard@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:3008:15
flushedQueue@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:2802:21
flushedQueue@[native code]

The GLB file in this error is downloaded from FREE 1975 Porsche 911 (930) Turbo - Download Free 3D model by Karol Miklas (@karolmiklas) [8568d9d] - Sketchfab with GLB format and Texture size: 1k. Then uploaded to IPFS.
Code:

useEffect(() => {
    if (engine) {
      const url =
        'https://ipfs.io/ipfs/QmeciRLhTmE7bw5r5h76kqrftuQasXMgnFikx4KmrdGNEm';
      SceneLoader.LoadAsync(url, undefined, engine, undefined, ".glb").then(loadScene => {
        setScene(loadScene);
        loadScene.createDefaultCameraOrLight(true, undefined, true);
        (loadScene.activeCamera as ArcRotateCamera).alpha += Math.PI;
        (loadScene.activeCamera as ArcRotateCamera).radius = 10;
        setCamera(loadScene.activeCamera!);
      });
    }
  }, [engine]);

Demo repo: BabylonReactNativeSample/App.tsx at react-native-0-69 · thangld322/BabylonReactNativeSample · GitHub

I tried to look at all the textures through this link and could not see any special format…

There’s a transmission extension used for Object_95 / material “930_lights_refraction”, maybe it’s related…

@Cedric should know what the format 5 / type 2 is.

I’m taking a look

2 Likes

I did my investigations.
RGBA16F is not supported by native engine (can be fixed easily)
a depth16 render target is use (for the ground shadow I guess) and it’s not supporter either. This one can be more difficult to fix. I’m opening a Github issue but I have no ETA yet.

4 Likes