Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation
Other
2.98k stars 1.11k forks source link

About Object detection on iOS #1132

Closed micsanbr closed 6 months ago

micsanbr commented 6 months ago

Image Tracking works, Plane Placement works. I'm trying to use Object Tracking with an iPad 9th but had no luck so far.

After building the Apple 3D scanning app from source, generating a few different .arobject scans, replacing the ARTrackedImageManager with the ARTrackedObjectManager and its respective event, it never detects.

I have no idea if I'm doing something wrong but I wonder what kind of restrictions apply to this sort of detection in terms of lighting conditions, background. The object i want to track is a directional valve, size about 25x10x5 cm, quite detailed and containing various metallic / reflective element. https://www.google.com/search?q=directional+valve

One more detail: I've scanned standing on a table and now I'm trying to detect it while it's mounted on a metal grid, connected with hoses and cables to other industrial components.

Unity 2022.3.12f1. AR Foundation 5.11.

I can see in Xcode the following error, not sure if it's related ... "[Subsystems] Failed to initialize subsystem ARKit-Meshing"

andyb-unity commented 6 months ago

Apple's 3D scanning app also allows you to test detection of the object. You should see results in AR Foundation that are consistent with Apple's scanning app. Is the scanning app able to detect the object?

If the scanning app works but AR Foundation does not, ensure that your reference object library is set up correctly: https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@5.1/manual/features/object-tracking.html#create-a-reference-object-library

micsanbr commented 6 months ago

Apple's 3D scanning app also allows you to test detection of the object. You should see results in AR Foundation that are consistent with Apple's scanning app. Is the scanning app able to detect the object? Yes it was able to detect it.

If the scanning app works but AR Foundation does not, ensure that your reference object library is set up correctly: https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@5.1/manual/features/object-tracking.html#create-a-reference-object-library Yea it's pretty straightforward, same as in my project. I'm using the onTrackedObjectChanged event to set the prefab position and rotation. It works the same as ARTrackedImageManager, I guess.

micsanbr commented 6 months ago

Ok so apparently it almost works but only in the simplest scenarios possible. For my use-cases this is basically useless / unusable. Closing this.