CariusLars / ar_flutter_plugin

Flutter Plugin for AR (Augmented Reality) - Supports ARKit on iOS and ARCore on Android devices
MIT License
322 stars 233 forks source link

Most of my 3D models does not appear in view #66

Closed svyazist2005 closed 2 years ago

svyazist2005 commented 2 years ago

Most of my 3D models does not appear in the view widget For unknown reasons, only 1 of 10 models appears in the ARView(gltf)

I use type: NodeType.webGLB and type: NodeType.localGLTF2 models (.glb , .gltf appropriately)

No errors no warnings

For gltf [ +142 ms] flutter: iOS platform view created! [ +174 ms] flutter: [ObjectTEST from iOS]

For glb [ +153 ms] flutter: iOS platform view created! [ +49 ms] flutter: [ObjectTEST from iOS] [ +131 ms] Async Model Downloading Task completed: finished

client: IOS 14.7.1 IPHONE SE(old model) environment: ar_flutter_plugin: ^0.6.1 Flutter (Channel master, 2.6.0-12.0.pre.675, on Mac OS X 10.15.7 19H524 darwin-x64, locale en-UA) Xcode - develop for iOS and macOS (Xcode 12.4) VS Code (version 1.48.2)

Please help to solve the issue, my project strongly relies on the AR objects displayed

CariusLars commented 2 years ago

that's really strange, especially if there are no errors... can you send me a link to the webGLB model that you use so I can have a look at the problem?

svyazist2005 commented 2 years ago

that's really strange, especially if there are no errors... can you send me a link to the webGLB model that you use so I can have a look at the problem?

Yes of course

The models that are not displayed at all neither with type: NodeType.webGLB, nor type: NodeType.localGLTF2 https://firebasestorage.googleapis.com/v0/b/stridenseek.appspot.com/o/files%2FAR_Models%2Fpteranodon.glb?alt=media&token=f34c1730-6f77-4903-94da-f0aeebb66bbf https://firebasestorage.googleapis.com/v0/b/stridenseek.appspot.com/o/files%2FAR_Models%2Ft_rex.glb?alt=media&token=168ddba9-5902-47f1-a127-4e0ef803bcea

The model that is displayed succesfully using type: NodeType.webGLB, or type: NodeType.localGLTF2 https://firebasestorage.googleapis.com/v0/b/stridenseek.appspot.com/o/files%2FAR_Models%2Fbrachiosaurus.glb?alt=media&token=f8f9b491-7441-4641-ad7f-d47e15d03180

nauval123 commented 2 years ago

i have the same issue too, i use a 3d model from blender with glb format, use Node Type.localGLTF2 but it unnable to load the assets, i have check the pubspec.yaml.it appears on 3d model viewer though

CariusLars commented 2 years ago

that's really strange, especially if there are no errors... can you send me a link to the webGLB model that you use so I can have a look at the problem?

Yes of course

The models that are not displayed at all neither with type: NodeType.webGLB, nor type: NodeType.localGLTF2 https://firebasestorage.googleapis.com/v0/b/stridenseek.appspot.com/o/files%2FAR_Models%2Fpteranodon.glb?alt=media&token=f34c1730-6f77-4903-94da-f0aeebb66bbf https://firebasestorage.googleapis.com/v0/b/stridenseek.appspot.com/o/files%2FAR_Models%2Ft_rex.glb?alt=media&token=168ddba9-5902-47f1-a127-4e0ef803bcea

The model that is displayed succesfully using type: NodeType.webGLB, or type: NodeType.localGLTF2 https://firebasestorage.googleapis.com/v0/b/stridenseek.appspot.com/o/files%2FAR_Models%2Fbrachiosaurus.glb?alt=media&token=f8f9b491-7441-4641-ad7f-d47e15d03180

hey @svyazist2005 , I justed wanted to have a look at your problem but unfortunately I get "Error 403: permission denied" on the links to your models, could you make them public please?

svyazist2005 commented 2 years ago

that's really strange, especially if there are no errors... can you send me a link to the webGLB model that you use so I can have a look at the problem?

Yes of course The models that are not displayed at all neither with type: NodeType.webGLB, nor type: NodeType.localGLTF2 https://firebasestorage.googleapis.com/v0/b/stridenseek.appspot.com/o/files%2FAR_Models%2Fpteranodon.glb?alt=media&token=f34c1730-6f77-4903-94da-f0aeebb66bbf https://firebasestorage.googleapis.com/v0/b/stridenseek.appspot.com/o/files%2FAR_Models%2Ft_rex.glb?alt=media&token=168ddba9-5902-47f1-a127-4e0ef803bcea The model that is displayed succesfully using type: NodeType.webGLB, or type: NodeType.localGLTF2 https://firebasestorage.googleapis.com/v0/b/stridenseek.appspot.com/o/files%2FAR_Models%2Fbrachiosaurus.glb?alt=media&token=f8f9b491-7441-4641-ad7f-d47e15d03180

hey @svyazist2005 , I justed wanted to have a look at your problem but unfortunately I get "Error 403: permission denied" on the links to your models, could you make them public please?

Should work now

https://firebasestorage.googleapis.com/v0/b/stridenseek.appspot.com/o/files%2FAR_Models%2Fpteranodon.glb?alt=media&token=9a553d30-ffda-4588-81c9-2412d2b7172c https://firebasestorage.googleapis.com/v0/b/stridenseek.appspot.com/o/files%2FAR_Models%2Ft_rex.glb?alt=media&token=177b7085-13f4-4870-97fd-38a52973921a https://firebasestorage.googleapis.com/v0/b/stridenseek.appspot.com/o/files%2FAR_Models%2Fbrachiosaurus.glb?alt=media&token=9f0f3650-456c-42ad-b2ed-4c1249512d61

CariusLars commented 2 years ago

Just tested this with your first model (https://firebasestorage.googleapis.com/v0/b/stridenseek.appspot.com/o/files%2FAR_Models%2Fpteranodon.glb?alt=media&token=9a553d30-ffda-4588-81c9-2412d2b7172c). It downloads just fine, but during runtime I get the following error:

F/libc    (15851): Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x78f2f7bfe4 in tid 16459 (AsyncTask #5), pid 15851 (_plugin_example)

According to this ARCore SDK issue, this hints towards a broken 3D model (please note that being able to open a model with 3D viewers like Blender does not mean they are error-free, many of the viewers can handle minor errors that ARCore or ARKit cannot handle). I suspect that when you test on iOS, you don't get any errors because they are more secretive in terms of memory corruption errors, but it should still be the same cause.

I checked your model with the official glTF Validator and there are several errors, so this seems to be a problem with the models you use (or the missing error-tolerance of ARCore and ARKit), but not with this plugin.

roberto-donext commented 2 years ago

Try to add your model in blender into a empty object first.