sceneform-android-sdk icon indicating copy to clipboard operation
sceneform-android-sdk copied to clipboard

glTF assets loading issue

Open terezo opened this issue 8 years ago • 3 comments

Hi,

I am trying to load .glTF assets defined with relative paths and getting these exceptions:

java.io.FileNotFoundException: /data/user/0/com.arapp.factory/cache/1540463947423-0/../shared/lolipop.bin

CompletionException: java.io.FileNotFoundException: /data/user/0/com.arapp.factory/cache/1540466822606-0/0/glass1_transparent.png

Here is an .glTF fragment:

"buffers" : [
        {
            "byteLength" : 2433560,
            "uri" : "../shared/lolipop.bin"
        }
    ],
    "images" : [
        {
            "name" : "glass1_transparent",
            "uri" : "/0/glass1_transparent.png"
        },
        {
            "name" : "glass2_transparent",
            "uri" : "../shared/glass2_transparent.png"
        }
]

Would help with organizing shared assets such as .bin and some textures. E.g. multiple furniture variations. Currently everything has to be placed in the same folder.

I tried many variations and It does fail even in cases when you go only "deep" in folder structure. Am I doing something wrong or it is by design? Would be great adding that feature. Thanks

terezo avatar Oct 25 '18 11:10 terezo

The issue is that RenderableSource call method doesn't download correctly the files that are in a subfolder, compared to the location of the gltf file.

guerwan avatar Nov 21 '18 17:11 guerwan

I have the same problem. Is there a workaround or somewhere a fix?

WilliamBrain avatar Jun 06 '19 20:06 WilliamBrain

I have the same problem. Is there a workaround or somewhere a fix?

18778694656 avatar Jun 11 '19 10:06 18778694656