AR Image Tracking - Scale issue

Hello,

I’m trying your sample scene and I have an issue on the Image Tracking Scene when running live on iOS.
The tracker seems to work in one way, but not the one it was supposed to.

I’ve made a little experience with scaling and here is what I’ve found:

  • The current scenary is displayed in very little (like, very!)
  • I tried to add the Needle 3D logo present in the scene with various scales (1, 10, 50, 100) and here are the results

In Unity Editor:
The current scenary from your sample scene is in Scale 1


In iOS viewer:

Obervations:

  • the AR scale doesn’t match with the Image target scale in Unity Editor
  • the objects hide themselves after few seconds, as they are occluded by a detected surface (which doesn’t exist)

I might need the AR tracking for my future project.
Do you see what can be wrong?

I’ve pushed this scene on

Cheers

Hello Corentin,

The scaling issue you’re facing with AR image tracking on iOS can stem from a few factors in the setup of your scene and how the AR session scales elements. Here are some potential causes and solutions:

  1. Scale Configuration: Make sure to set the arScale property correctly in the WebARSessionRoot component. A larger arScale value makes objects appear smaller in AR, which could explain why your scene appears very small. Adjust it based on your requirements.

  2. Image Size in Meters: Ensure that the width of the tracked image (widthInMeters) is correctly set for each image in your WebXRImageTracking component. This value directly affects how the AR elements are scaled when tracking.

  3. Model Scaling: According to the code in the WebXRImageTracking class, scaling is applied based on the values set via the getARScaleAndTarget() method. The following code snippet showcases how the scale is derived:

    const scale = 1 / arScale;
    
  4. Nested Objects: Be aware that nesting tracked objects can lead to issues, as mentioned in the code comments. Ensure that the objects you wish to track are not nested under other scaled objects that could skew their perceived size in AR.

  5. Invert Forward: Check the invertForward setting, as this can affect the orientation of tracked objects. The default setting may need to be adjusted based on your project’s needs.

  6. Debugging Visibility: The observation that objects become invisible after a few seconds could relate to their tracking state. You can set hideWhenTrackingIsLost to false to keep the objects visible even if tracking is lost for debugging purposes.

  7. Testing Different Scales: You mentioned testing different scales. Ensure that you test these directly in the build, as settings may behave differently in the Unity editor vs. on the device.

To proceed effectively, please confirm your scaling settings and check the AR scale in the WebARSessionRoot and the widthInMeters values on your tracked images.

If you’re still experiencing issues, providing your Unity and Needle Engine versions can help in identifying specific changes or bugs that may affect the performance.

Let me know if you need further assistance!

1 replies left - Get a PRO license for more AI replies.
thread_vojCZRdIbaCY3AW7HRQS8qRT
Reply to this message to continue the conversation

Hey, we have a pending bug report with Apple regarding this problem, as it’s a regression on their end: Feedback Item FB16119331.

If you could also report an issue with Apple and submit just the USDZ file that would be great (you can generate the USDZ file with ?debugusdz on desktop) and might accelerate them fixing the issue.

1 Like

Hello @hybridherbst,

Thanks for the answer, and sorry for the delay on my side.
I’m at the beginning of an exploration project and I try to have an overview of the Needle possibility to know how to orient the next content creation.

I have never done any report to Apple for AR issues yet, I’ll be able to do it this afternoon.
Hope this will help to fix this regression :slight_smile:

Hello @hybridherbst

I’m writing the report on Apple Feedback assistant and it’s almost ready to go

Problem:
When I try to use ?debugusdz at the end of the URL, there’s no button to download the usdz file

Do you know how can I display the Usdz dowload button?

You may need to click the view in AR button (debugusdz basically forces this button to be visible but when quicklook is not actually available instead of opening quicklook the usdz will be downloaded)

I can see that there is a loading in the background but it opens Quicklook after

I will create another version of the scene without the Quicklook activation.
It might unlock the usdz download

For downloading the USDZ, open the page on the local server on your desktop (not on iOS), and use the ?debugusdz flag, then click “View in AR”. That button will download the USDZ.

1 Like

It worked, Thanks !

The bug report is commited to Apple :
Feedback Item FB16461571