Sceneform-android-sdk: Load 3d models at runtime

Created on 13 Feb 2019  路  12Comments  路  Source: google-ar/sceneform-android-sdk

Seems like the example of the loading 3d models at runtime is not working.
example
Can provide a working sample for it ? Thank you.

bug

All 12 comments

Even I cannot seem to get it working. (v1.7.0)

Here is the stack trace:
2019-02-15 11:33:16.566 14456-14533/com.google.ar.sceneform.samples.hellosceneform E/ModelRenderable: Unable to load Renderable registryId='https://github.com/KhronosGroup/glTF-Sample-Models/raw/master/2.0/Duck/glTF/Duck.gltf' java.util.concurrent.CompletionException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/common/io/Files; at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:276) at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:282) at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1627) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:764) Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/common/io/Files; at com.google.ar.sceneform.assets.RenderableSource.call(SourceFile:15) at com.google.ar.sceneform.assets.RenderableSource.call(SourceFile:73) at com.google.ar.sceneform.rendering.LoadRenderableFromSfbTask.inputStreamToByteBuffer(LoadRenderableFromSfbTask.java:178) at com.google.ar.sceneform.rendering.LoadRenderableFromSfbTask.lambda$downloadAndProcessRenderable$0(LoadRenderableFromSfbTask.java:113) at com.google.ar.sceneform.rendering.-$$Lambda$LoadRenderableFromSfbTask$0DkaOpfpmr8DYlbaxWogZtUpKTw.get(Unknown Source:4) at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1625) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)聽 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)聽 at java.lang.Thread.run(Thread.java:764)聽 Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.common.io.Files" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.google.ar.sceneform.samples.hellosceneform-UXiS6VTurYH-WktM9IePwg==/base.apk"],nativeLibraryDirectories=[/data/app/com.google.ar.sceneform.samples.hellosceneform-UXiS6VTurYH-WktM9IePwg==/lib/arm64, /data/app/com.google.ar.sceneform.samples.hellosceneform-UXiS6VTurYH-WktM9IePwg==/base.apk!/lib/arm64-v8a, /system/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at com.google.ar.sceneform.assets.RenderableSource.call(SourceFile:15)聽 at com.google.ar.sceneform.assets.RenderableSource.call(SourceFile:73)聽 at com.google.ar.sceneform.rendering.LoadRenderableFromSfbTask.inputStreamToByteBuffer(LoadRenderableFromSfbTask.java:178)聽 at com.google.ar.sceneform.rendering.LoadRenderableFromSfbTask.lambda$downloadAndProcessRenderable$0(LoadRenderableFromSfbTask.java:113)聽 at com.google.ar.sceneform.rendering.-$$Lambda$LoadRenderableFromSfbTask$0DkaOpfpmr8DYlbaxWogZtUpKTw.get(Unknown Source:4)聽 at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1625)聽 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)聽 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)聽 at java.lang.Thread.run(Thread.java:764)聽

@khonakr Yes exactly. They always say that we refer to the example but it鈥檚 not working. Cannot go forward for the issue.

Until then you can still use 'com.google.ar.sceneform:assets:1.6.0' with 'com.google.ar.sceneform:core:1.7.0' unless you specifically need something from 1.7.0 assets.

Thanks for the report. We will look into this.

Any update on this issue?

I'm facing same issue. Not able to load the 3D model from server. Getting following error

java.util.concurrent.CompletionException: java.lang.RuntimeException: Failed to import '/data/user/0/com.viveksb007.arhr/cache/1557239306422-0/model_source.gltf' at com.google.ar.sceneform.rendering.LoadRenderableFromSfbTask.inputStreamToByteBuffer(LoadRenderableFromSfbTask.java:181) at com.google.ar.sceneform.rendering.LoadRenderableFromSfbTask.lambda$downloadAndProcessRenderable$0(LoadRenderableFromSfbTask.java:113) at com.google.ar.sceneform.rendering.-$$Lambda$LoadRenderableFromSfbTask$0DkaOpfpmr8DYlbaxWogZtUpKTw.get(Unknown Source:4) at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1625) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at java.lang.Thread.run(Thread.java:764)

Poly Runtime Api only works with "GLTF" format. Anyother format will return error
Unable to load Renderable registryId

I was using GLTF back then, seems this was resolved with the sceneform update that happened after my post

I was using GLTF back then, seems this was resolved with the sceneform update that happened after my post

Nope , For me , If i use formattype of GLTF2 , runtime api works fine. Any other format throws error.

*i'm not able to load my 3D model runtime, my model is GLTF type model. kindly help me ASAP it's not crashing my app but still not able to load the 3D model *

some of the errors are:

Caused by: java.io.FileNotFoundException: http://abc.example.pk/CONTENT/PRODUCT/MODELS/model23329.gltf

E/ModelRenderable: Unable to load Renderable registryId='/CONTENT/PRODUCT/MODELS/model23329.gltf'

java.util.concurrent.CompletionException: java.util.concurrent.CompletionException: java.io.FileNotFoundException: http://abc.example.pk/CONTENT/PRODUCT/MODELS/model23329.gltf

The error indicates that your url isn't accessible. Have you double-checked that you can access that link from inside your app? When I click it it fails dns lookup.

i posted my problem on stackoverflow if your can solved my problem so here it is :
https://stackoverflow.com/questions/60901493/not-able-to-load-my-3d-objectgltf-at-run-time

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Brian-Kwon picture Brian-Kwon  路  3Comments

dementia2029 picture dementia2029  路  3Comments

tigran-babajanyan picture tigran-babajanyan  路  3Comments

JessHolle picture JessHolle  路  3Comments

kunal-wayfair picture kunal-wayfair  路  3Comments