Open hman-coder opened 2 years ago
can you share the exact code you are using to pass the path to the plugin?
can you share the exact code you are using to pass the path to the plugin?
I've updated the question with the relevant code.
you should definitely use Models/Chicken_01/Chicken_01.gltf
(the version you commented out), does this give the same error? and is the Models
folder in the actual app folder (make sure it's not accidentally in the plugin's parent folder)?
If it still doesn't work, you should set some debug points and examine the device's storage to see if the files are actually compiled into the app
I tried both uri
s and they are giving the same Exception. Regarding whether Models
is in the app folder or not, I linked an image in the OP showing the project file structure. It is in the app folder. The weird thing is, when I use "images/triangle.png" for marking planes it is not producing that import exception - so I don't think it's a problem of the assets not compiling into the device storage.
I will do those debug points, however, and get back to you
i can use the model,but i use the File widget and get the path from my modal's,then it did appear
Same for me, when I try to load custom .glb or .gftl objects Arkit won't show them and just place the node. No error seems to be thrown neither in dart code or native swift code. Managed to render an arrow glb model, but nothing else, meanwhile Arcore renders all the models without any problem.
P.s. the arrow loads but the lighting looks very dark, practically obscuring the model's color.
can you check the models that don't load with the glTF Validator or try them in a pure ARKit app? The native frameworks often struggle to load models that are not up to the standard which is a likely cause that it loads in ARCore but not ARKit
can you check the models that don't load with the glTF Validator or try them in a pure ARKit app? The native frameworks often struggle to load models that are not up to the standard which is a likely cause that it loads in ARCore but not ARKit
Strange thing is that the Validator gives me green light with the models I struggle to load. I'm currently trying to load them on a pure ARKit app and will tell you how it goes. Still it would be great to tell beforehand if the selected model can be loaded by arkit to avoid the final user this kind of experiences
can you check the models that don't load with the glTF Validator or try them in a pure ARKit app? The native frameworks often struggle to load models that are not up to the standard which is a likely cause that it loads in ARCore but not ARKit
It looks like a lot of the models I'm failing to load are shown in a native 3d models app like they are totally white/colourless, and the flutter app loads them but they just seems to be transparent. Do you know any native AR app with which I can test the models? I found some but most are not free.
I've used an adaption of this ARKit sample app before and I've modified it so it can load glb models, if you send me an email at lars@carius.io I can send you the modified project as a zip file :)
I've used an adaption of this ARKit sample app before and I've modified it so it can load glb models, if you send me an email at lars@carius.io I can send you the modified project as a zip file :)
Hey Lars, first thing first let me thank you for the support and the dedication you are showing for the project. I tried the sample native app you passed me and I managed loading all models I passed it that I failed loading in its flutter counter part. While the lightining seemed a bit off too in the sample app, the models shows correctly. If you want I can pass you more files to test for yourself :)
hm that's really annoying that it doesn't work in this package! Can you send me the models so I can try it myself?
hm that's really annoying that it doesn't work in this package! Can you send me the models so I can try it myself?
I've sent you the models with WeTransfer, you'll notice that I put in some working models along with the non working ones! The arrow, in particular, is loading, but the ligthing seems quite off (the model is green).
I am also facing the exact same issue in android @lore-co @CariusLars should i add or update some permission for android? what was the fix/workaround you found for this?
This problem is still there, did anyone managed to solve it?
I was able to copy the file but not display it, at least on my Android 14. I/flutter ( 6000): Copied assets/animation.glb to /data/user/0/com.example.test/app_flutter/animation.glb I/flutter ( 6000): Finished copying files to app's documents directory
While trying to load my own
gtlf
model, an "Unable to load renderable [assetLocation]" snackbar pops up, and an exception is printed into the console. I thought maybe it was the model itself, so I substituted it for theChicken
model in one of the example projects only to get the same exception. I double checkedpubspec.yaml
for correct asset path declaration.It is working swimmingly when using web models.
Code is identical to the one in
LocalAndWebObjectsWidget
in the example project (after fixing null safety issues).No issues with flutter doctor.
Exception
pubspec.yaml
Project file structure, just to make sure.
EDIT:
Code