Skip to content
This repository has been archived by the owner on Jul 28, 2020. It is now read-only.

Load 3d models at runtime #531

Open
codewithlester opened this issue Feb 13, 2019 · 12 comments
Open

Load 3d models at runtime #531

codewithlester opened this issue Feb 13, 2019 · 12 comments
Labels
bug Something isn't working

Comments

@codewithlester
Copy link

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

@khonakr
Copy link

khonakr commented Feb 15, 2019

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) 

@codewithlester
Copy link
Author

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

@khonakr
Copy link

khonakr commented Feb 15, 2019

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.

@tpsiaki
Copy link
Contributor

tpsiaki commented Feb 19, 2019

Thanks for the report. We will look into this.

@RichardSantillan
Copy link

Any update on this issue?

@sandeep415
Copy link

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)

@FazalJarral
Copy link

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

@RichardSantillan
Copy link

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

@FazalJarral
Copy link

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.

@1AhsanSyed
Copy link

**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

@tpsiaki
Copy link
Contributor

tpsiaki commented Mar 28, 2020

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.

@1AhsanSyed
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants