PacktPublishing / Enterprise-Augmented-Reality-Projects

Enterprise Augmented Reality Projects, published by Packt
Other
20 stars 10 forks source link

Sceneform 1.16 rendering not working #5

Closed newmluser closed 4 years ago

newmluser commented 4 years ago

I am using Sceneform 1.16, followed all the steps but rendering is not happening

I have the lion.gld file in assets folder


      ModelRenderable.builder()
                .setSource(this, Uri.parse("lion.gld"))

I am getting the Error:


2020-10-02 22:59:10.924 3051-3051/com.examples.myapplication I/native: config_helpers.cc:396 Legacy IMU sigma values are used
2020-10-02 22:59:10.925 3051-3051/com.examples.myapplication I/native: feature_matcher_and_filter.cc:91 Enabled the robustification to large-sized and fast-moving objects on this mono-camera device.
2020-10-02 22:59:10.927 3051-3051/com.examples.myapplication I/native: pose_confidence_estimator.cc:220 Pose confidence model loaded successfully
2020-10-02 22:59:10.932 2165-2165/? I/WallpaperService: engine paused
2020-10-02 22:59:10.959 3051-3133/com.examples.myapplication E/ModelRenderable: Unable to load Renderable registryId='lion.gld'
    java.util.concurrent.CompletionException: java.io.FileNotFoundException: lion.gld
        at com.google.ar.sceneform.utilities.SceneformBufferUtils.inputStreamToByteBuffer(SceneformBufferUtils.java:108)
        at com.google.ar.sceneform.rendering.LoadRenderableFromSfbTask.lambda$downloadAndProcessRenderable$0$LoadRenderableFromSfbTask(LoadRenderableFromSfbTask.java:118)
        at com.google.ar.sceneform.rendering.-$$Lambda$LoadRenderableFromSfbTask$0DkaOpfpmr8DYlbaxWogZtUpKTw.get(Unknown Source:4)
        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:919)
     Caused by: java.io.FileNotFoundException: lion.gld
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:255)
        at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:211)
        at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:30)
newmluser commented 4 years ago

@devbridie can you please help with your comment

devbridie commented 4 years ago

I don't know too much about Sceneform, but I'd start here: java.io.FileNotFoundException: lion.gld. It seems lion.gld can't be found.

newmluser commented 4 years ago

Thanks for the reply I have it in Assets folder yet I am seeing the Error. not sure what I am missing .

newmluser commented 4 years ago

@shubham763 can you help me in looking into this. As suggested I am having the gld in assets folder yet I am seeing issue when using sceneform 1.16

shubham763 commented 4 years ago

Hi @newmluser

Google has archived (aka abandoned) Sceneform 1.16 code, due to which you're getting an error. Try using an alternative Sceneform version, as this book requirement says Sceneform 1.13.

Regards, Shubham