Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bad Tracking on iPad

Discussion in 'AR' started by blanx, May 13, 2019.

  1. blanx

    blanx

    Joined:
    Feb 26, 2016
    Posts:
    73
    Hi,

    Currently we encounter some weird bad tracking on our iPad Pros.
    We try to match a 3d object on a real world object but moving around the placed object it starts to drift.

    I already tried to parent it under a reference object but it does not help that much.

    Trying the same with an iPhone works much better. Even when it loses the tracking, it immediately jumps back when finding it again due to the reference point.

    I tried it with a current beta of iOS and a standard version.

    Anyone else who experienced this?

    Thanks
     
  2. MarcoElz

    MarcoElz

    Joined:
    Jan 28, 2017
    Posts:
    17
    Did you notice the problem only on Landscape Orientation?
    I have the same problem but only happens on iPads on Landscape, Portrait always works.

    The only "solution" I have for the moment is decreasing the camera field of view (try and test until it works better), but then the ar object looks bigger than should be... I hope someone gives us the best solution.
     
  3. blanx

    blanx

    Joined:
    Feb 26, 2016
    Posts:
    73
    It was in portrait mode so it might not be the same problem.
    How did you change the field of view? Might try this anyway.
     
  4. MarcoElz

    MarcoElz

    Joined:
    Jan 28, 2017
    Posts:
    17
    Oh... In that case I don't think that the field of view will help, but it's ok to try it.

    Unexpectedly I changed the field of view by changing the value on the camera in the Unity Editor, I thought arcore/arkit modify the field of view at runtime, but somehow it worked.

    The default Field of View is 60, I changed it to about 40.
     
  5. blanx

    blanx

    Joined:
    Feb 26, 2016
    Posts:
    73
    Yeah that's strange that it has any effect, because as far as I know they overwrite the camera matrix.
    Well anyway I will try it.
     
  6. Fl0oW

    Fl0oW

    Joined:
    Apr 24, 2017
    Posts:
    21
    Can you get the tracking back on the iPad by pointing it at you anchor for a longer period of time? What devices are you using? Depending on the model, the drift might be caused by performance issues. Do you have a lot of things going on at the same time, any post-processing effects?
     
  7. blanx

    blanx

    Joined:
    Feb 26, 2016
    Posts:
    73
    No at that stage nothing fancy is happening so should not be a performance problem. I have 60fps.
    And also no post processing.

    I have set up reference points and on iPhone these work great. The object immediately snaps back, but on iPad it looks like it tries but can't restore the exact position.
     
  8. BuoDev

    BuoDev

    Joined:
    Nov 28, 2018
    Posts:
    45
    Huh. The field of view did seem pretty narrow, but I didn't give it much thought since I use Android primarily for testing.

    The problem is confirmed with these screenshots:
    Left is from iOS camera, right is from one of my apps.

    Camera-screenshot.jpg ARfoundation-screenshot-portrait.jpg

    There seems to be an issue with screen filling/scaling?

    This is interesting.
    In landscape,
    Camera.ScreenPointToRay(new Vector3(Screen.Width / 2, Screen.Height / 2, 0));
    doesn't return a ray starting from the center of the screen.

    The cross here should be in the center.

    ARfoundation-screenshot-landscape-left.jpg
     

    Attached Files:

    Last edited: Jun 3, 2019
  9. BuoDev

    BuoDev

    Joined:
    Nov 28, 2018
    Posts:
    45
    @tdmowrer can you please give input on this issue? Maybe you are able to tell if this is a ARfoundation issue or a Unity engine issue.

    p.s. I have not yet tested with ARF v2.1.