Closed chun-baoluo closed 2 years ago
Will you please try @babylonjs/react-native@0.4.0-alpha.43 with @babylonjs/core@5.0.0-alpha.60 and @babylonjs/loaders@5.0.0-alpha.60?
Will you please try @babylonjs/react-native@0.4.0-alpha.43 with @babylonjs/core@5.0.0-alpha.60 and @babylonjs/loaders@5.0.0-alpha.60?
No, the app still doesn't render anything. However, the behaviour is somewhat different. If alpha.37
just rendered black screen, alpha.43
renders standard babylonjs-playground background . It seems like the app just froze at some point, FPS is stuck at 11 on my phone, but nothing is rendering and the app does not seem to respond (or at least babylonjs part doesn't respond). Also, no other meshes are being rendered as well, not just new character model. And there is no error message of any kind in the terminal window.
adb logcat
also doesn't show anything interesting.
This is due to the model having morph targets which tries to create a 2d texture array. This isn't hooked up. This is tracked by https://github.com/BabylonJS/BabylonNative/issues/923. There is however a workaround as noted in the issue. Put this somewhere before you load the model and it will disable texture arrays.
BABYLON.MorphTargetManager.EnableTextureStorage = false;
There is something else that is wrong though. The JavaScript should be throwing an error like:
Uncaught Error: Unable to get property 'TEXTURE_2D_ARRAY' of undefined or null reference
This is what happens in the Babylon Native Playground when loading this model. Something in Babylon React Native is eating this error. @ryantrem Any thoughts?
@bghgary Thanks, it solved my problem.
Describe the bug Managed to find another bug (for both iOS and Android) with new versions of
@babylonjs/react-native
. If I try to open certain model with@babylonjs/react-native@0.4.0-alpha.37
or newer, the app won't render anything. It just shows black screen. I tested@babylonjs/react-native@0.4.0-alpha.29
out of curiosity and everything worked. It seems like something broke in newer versions. The only error I see in terminal window of my test app is "TypeError: undefined is not an object (evaluating '_native.NativeDataStream.VALIDATION_ENABLED')
".The only difference between my old models and new model is that later was exported using
Cinema 4D glTF Exporter
instead ofKhronos glTF Blender
plugin. However, both models display correctly on https://sandbox.babylonjs.com.To Reproduce Steps to reproduce the behavior:
TypeError: undefined is not an object (evaluating '_native.NativeDataStream.VALIDATION_ENABLED')
appears in the terminal window@babylonjs/react-native@0.4.0-alpha.29
inpackage.json
fileExpected behavior Everything renders correctly
Screenshots How app looks like with
@babylonjs/react-native@0.4.0-alpha.29
:How app looks like with
@babylonjs/react-native@0.4.0-alpha.37
or older:Other