zirman / arcore-filament-example-app

ARCore Filament Example App
MIT License
97 stars 15 forks source link

openning a gltf file #7

Closed bitamirshafiee closed 3 years ago

bitamirshafiee commented 3 years ago

I want to open a GLTF file instead of glb which you have use here in this repo. but doesn't work I just replaced the model with a gltf model an I think this could be ok as I search in the internet. but here what it gave me: 2021-04-20 06:27:21.287 11456-11456/com.example.app E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.app, PID: 11456 java.lang.NullPointerException at com.example.app.renderer.ModelRenderer$1$filamentAsset$1.invokeSuspend(ModelRenderer.kt:48) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

zirman commented 3 years ago

I haven't tried loading GLTF models. GLTF is a directory full of assets which makes things more complex. I recommend looking at the filament example projects on getting them loaded here: https://github.com/google/filament/blob/main/android/samples/sample-gltf-viewer/src/main/java/com/google/android/filament/gltf/MainActivity.kt