google / filament

Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2
https://google.github.io/filament/
Apache License 2.0
17.75k stars 1.88k forks source link

Issue with glb model rendering in Android with filament and gltfio #3948

Closed udayk07 closed 3 years ago

udayk07 commented 3 years ago

Tried to load a glb ( model attached ) model using sceneform with filament. While trying to render app got crashed. I am using latest version ( v1.9.24) of filament and gltf loader.

Same model works fine in online gltf-viewer.

Screenshot 2021-05-12 at 7 38 29 PM

crash log: java.lang.IllegalStateException: Failed to load gltf at com.google.ar.sceneform.rendering.RenderableInstance.createFilamentAssetModelInstance(RenderableInstance.java:133) at com.google.ar.sceneform.rendering.RenderableInstance.<init>(RenderableInstance.java:108) at com.google.ar.sceneform.rendering.Renderable.createInstance(Renderable.java:219) at com.google.ar.sceneform.Node.setRenderable(Node.java:864)

filament logs:

2021-05-12 19:47:32.171 3724-3724/com.example.augmentedreality E/Filament: Empty vertex buffer in Magazine_Spring 2021-05-12 19:47:32.171 3724-3724/com.example.augmentedreality E/Filament: Empty vertex buffer in Magazine_Bottom_Plate 2021-05-12 19:47:32.171 3724-3724/com.example.augmentedreality E/Filament: Empty vertex buffer in Magazine_Catch_Plate 2021-05-12 19:47:32.171 3724-3724/com.example.augmentedreality E/Filament: Empty vertex buffer in Magazine_Catch_Shaft 2021-05-12 19:47:32.171 3724-3724/com.example.augmentedreality E/Filament: Empty vertex buffer in Trigger_Guard_Spring_Pin 2021-05-12 19:47:32.171 3724-3724/com.example.augmentedreality E/Filament: Empty vertex buffer in Trigger_Guard_Plunger 2021-05-12 19:47:32.171 3724-3724/com.example.augmentedreality E/Filament: Empty vertex buffer in Trigger_Guard 2021-05-12 19:47:32.171 3724-3724/com.example.augmentedreality E/Filament: Empty vertex buffer in Trigger_Guard_Spring

Could anyone check it and provide solution? Thanks in advance.

gun.zip

romainguy commented 3 years ago

Please provide the full logs and please try the model in our own online viewer: https://google.github.io/filament/viewer

udayk07 commented 3 years ago

@romainguy

Found no specific logs other than above mentioned logs. Attached full console logs for your reference. ar_crash_log.txt

While loading the model in online viewer https://google.github.io/filament/viewer also model is not rendering.

Screenshot 2021-05-12 at 8 53 02 PM

model: https://github.com/google/filament/files/6466880/gun.zip

romainguy commented 3 years ago

I can reproduce with the native gltf-viewer. Besides all the empty vertex buffers, this gets printed as well:

Unable to parse /Users/romainguy/Downloads/scene.glb
prideout commented 3 years ago

This model is non-conformant; every accessor has its count set to 0.

This model seems to be generated by glTF-Transform so you might want to file a bug there. Since this model uses draco compression, the bug in the pipeline might be when compression occurs.