-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to load glb model in Android with sceneform using filament #3986
Comments
I cannot repro the issue with the first model in the Web viewer. There are no warnings in the console. The second model seems invalid and fails to load in both our Web and native viewers. |
Tried once again the first model in Android device ( SAMSUNG S9 device ) ( https://github.com/google/filament/files/6502198/castle.zip ) and another model ( size 60MB ) (https://www.dropbox.com/s/z5q4twlfjwqf96o/kirala.zip?dl=0). Both models failed to load. In both cases found no specific filament related logs in Android Studio console with filament. Attached error logs from console.
|
In a debug build on Desktop, the |
@udayk07 which tool did you use to generate this glTF? It might be interesting to see what would happen if you were to combine the meshes to reduce the number of renderables. |
@prideout The model generated by three.js exporter ( to load as .glb file in Android ). Will look into combine meshes in this model. Do we have any maximum mesh count in filament ? |
Our internal handle arena is limited to 2 MB which should be plenty. To be honest my mesh reduction idea is just an experiment to see what will happen, since I don't understand this bug yet. (note however that your model will be more optimal if you reduce the mesh count) |
@prideout Tried to combine meshes for car.zip model. Found below results,
Even though above one with 258 meshes loads fine, the model https://github.com/google/filament/files/6502198/castle.zip with only 5 meshes not loading in Android ( found no filament logs in console also ) |
Thanks, that is interesting. I haven't had time to investigate yet, so I'm not sure if this is an actual bug or if a resource limit has been exceeded, either way we should probably try to emit better error messages. @pixelflinger these models might be good stress tests, not sure how they compare to bistro and sponza |
So The model also uses more memory than we set by default, thankfully, we have compile time configuration flags you can set. It seems that you need to:
Finally there is another problem where we're running out of jobs, I have a PR that fixes that. Because of the 1st problem, I wasn't able to load this model. |
I am using filament in Android app through maven dependency ( implementation 'com.google.android.filament:filament-android:1.10.0' ). Is it possible to set above mentioned flags in Android build ? |
Ah no not yet. It's on my to-do list to make them settable at runtime. I'm also working on some changes that will make this car work better. So that said, such a model won't run well, due to the overhead of referring very small geometry with a lot of calls. On my desktop computer, I can't even get good performance. It's important to group meshes together that are close from each other and of similar size and of same material. |
Yes, thanks for the reminder: I think @pixelflinger and I have discussed increasing this constant for the WebGL build only, because the WebGL build is more likely to be used as a generic viewer. For Android builds, we probably want to avoid increasing this limit. |
The handle limit has been increased via #4201. |
Thanks for the help. It seems the changes available in version 1.10.5. But, the android version 1.10.5 not available ( Could not find com.google.android.filament:filament-android:1.10.5 ) |
Hi team,
Unable to load below attached models in android with filament v1.9.24.
Model 1:
I tried to load using https://google.github.io/filament/viewer/ and it is loading fine ( But, console showing warning ). Also, materials are missing in viewer.
expected output:
** In Android studio console found no specific filament logs for this case.
castle.zip
Model2:
While loading below model, it is not displaying in both filament-viewer and Android.
car.zip
The text was updated successfully, but these errors were encountered: