arcore_flutter_plugin
arcore_flutter_plugin copied to clipboard
Remote .gltf/ .glb not working properly
I have a very important project and I'm trying to integrate this package. Not everything in the example project is working.
The feature I want the most is showing a remote object and .gltf/.glb.
The example duck shows, but our custom blender models are not working, I am not sure if I am doing something wrong, please help
Also, is this project under active development? I request the PR's be merged and some development be taken care of, since this is the only native AR core support library for flutter and all of flutter AR is dependent on this.
@giandifra 🙏🏻 🙏🏻🙏🏻
Hi @Sameerkash, could you show your code?
@eduardoGo I'm just using the example project and replacing the remoteUrl in remote_object.dart with this
I solved it using controller.AddCoreNode.
ArCoreReferenceNode don't work fine with controller.AddCoreNodeWithAnchor. This is a bug.
@giandifra
@eduardoGo Thank you, this is life saving! can you post the code snippet? and does it work with complex textures too? I was not able to get it working using this model when i used it locally. the model just appeared black
This issue report that we need to use RAW file like in duck remote url.
So you need to replace blob with raw in your path.
Unfortunately there is another error, I'm investigating!
java.util.concurrent.CompletionException: java.util.concurrent.CompletionException: java.net.SocketException: Broken pipe
E/ModelRenderable( 7881): at com.google.ar.sceneform.utilities.SceneformBufferUtils.inputStreamToByteBuffer(SourceFile:48)
E/ModelRenderable( 7881): at com.google.ar.sceneform.rendering.LoadRenderableFromSfbTask.lambda$downloadAndProcessRenderable$0$LoadRenderableFromSfbTask(LoadRenderableFromSfbTask.java:118)
E/ModelRenderable( 7881): at com.google.ar.sceneform.rendering.-$$Lambda$LoadRenderableFromSfbTask$0DkaOpfpmr8DYlbaxWogZtUpKTw.get(Unknown Source:4)
E/ModelRenderable( 7881): at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1627)
E/ModelRenderable( 7881): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/ModelRenderable( 7881): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/ModelRenderable( 7881): at java.lang.Thread.run(Thread.java:923)
E/ModelRenderable( 7881): Caused by: java.util.concurrent.CompletionException: java.net.SocketException: Broken pipe
E/ModelRenderable( 7881): at com.google.ar.sceneform.assets.RenderableSource.downloadUri(Unknown Source:26)
E/ModelRenderable( 7881): at com.google.ar.sceneform.assets.RenderableSource.call(Unknown Source:169)
E/ModelRenderable( 7881): at com.google.ar.sceneform.assets.RenderableSource.call(Unknown Source:0)
E/ModelRenderable( 7881): at com.google.ar.sceneform.utilities.SceneformBufferUtils.inputStreamToByteBuffer(SourceFile:42)
E/ModelRenderable( 7881): ... 6 more
E/ModelRenderable( 7881): Caused by: java.net.SocketException: Broken pipe
E/ModelRenderable( 7881): at java.net.SocketOutputStream.socketWrite0(Native Method)
E/ModelRenderable( 7881): at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:117)
E/ModelRenderable( 7881): at java.net.SocketOutputStream.write(SocketOutputStream.java:161)
E/ModelRenderable( 7881): at com.android.org.conscrypt.ConscryptEngineSocket$SSLOutputStream.writeToSocket(ConscryptEngineSocket.java:715)
E/ModelRenderable( 7881): at com.android.org.conscrypt.ConscryptEngineSocket$SSLOutputStream.writeInternal(ConscryptEngineSocket.java:689)
E/ModelRenderable( 7881): at com.android.org.conscrypt.ConscryptEngineSocket$SSLOutputStream.write(ConscryptEngineSocket.java:652)
E/ModelRenderable( 7881): at com.android.okhttp.okio.Okio$1.write(Okio.java:78)
E/ModelRenderable( 7881): at com.android.okhttp.okio.AsyncTimeout$1.write(AsyncTimeout.java:157)
E/ModelRenderable( 7881): at com.android.okhttp.okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:177)
E/ModelRenderable( 7881): at com.android.okhttp.okio.RealBufferedSink.writeUtf8(RealBufferedSink.java:59)
E/ModelRenderable( 7881): at com.android.okhttp.internal.http.Http1xStream.writeRequest(Http1xStream.java:169)
E/ModelRenderable( 7881): at com.android.okhttp.internal.http.Http1xStream.writeRequestHeaders(Http1xStream.java:125)
E/ModelRenderable( 7881): at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:606)
E/ModelRenderable( 7881): at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:475)
E/ModelRenderable( 7881): at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:411)
E/ModelRenderable( 7881): at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:248)
E/ModelRenderable( 7881): at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:211)
E/ModelRenderable( 7881): at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:30)
E/ModelRenderable( 7881): at com.google.ar.sceneform.utilities.LoadHelper.lambda$remoteUriToInputStreamCreator$3$LoadHelper(SourceFile:94)
E/ModelRenderable( 7881): at com.google.ar.sceneform.utilities.d.call(Unknown Source:2)
E/ModelRenderable( 7881): at com.google.ar.sceneform.assets.RenderableSource.downloadUri(Unknown Source:13)
E/ModelRenderable( 7881): ... 9 more
I tried this remote object and it works also with addArCoreNodeWithAnchor
@giandifra , this remote URL is not working, even after using raw URL format from Github, any idea?
Hey @Sameerkash , I was comparing the duck raw file with the one you're trying and looks like it was generated differently...
Look at the "generator", the duck file is "COLLADA2GLTF" and the one you're trying is "Khronos glTF Blender... ", and I also noticed that it has many characters at the end, which probably are not parsed (the duck file ends "clean" without these many characters).
Maybe it would work if you try converting your .dae file using COLLADA2GLTF tool?
Edit: I've tried with a couple remote files as well and none of them worked :(
Is there any update on a fix for this?