Search Unity

Question AR target object flickering

Discussion in 'AR' started by Saltakatt, Sep 8, 2022.

  1. Saltakatt

    Saltakatt

    Joined:
    May 25, 2013
    Posts:
    2
    Hi, I'm struggling to get my prefab visible when viewing the target image.
    Right now it flickers or doesn't show up at all.

    I have changed both the target image and the device but with the same result.
    I'm using Unity 2022.1.15f1 Silicon and iPhone XS.

    Anyone have an idea how to fix this?
    ar_flicker.gif
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,063
    Is depth occlusion enabled?
    If so, disable it.
    And start with huge objects maybe, maybe without image tracking to see where it starts to break
     
  3. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
  4. Saltakatt

    Saltakatt

    Joined:
    May 25, 2013
    Posts:
    2
    Thank you for the feedback.
    I have updated to iOS 16 and Unity 2022.6 but that made the camera freeze.
    I am now using Unity 2022.2.0b8, so now the camera works again.

    I have disabled “Occlusion Culling” (I guess that what you ment by “depth occlusion”)
    Also I have put in 2 green objects without image tracking.
    And I am using the recommend test purposes images.

    The result is still similar


    target_003.gif
     
  5. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    makaka-org likes this.
  6. RakanAD

    RakanAD

    Joined:
    Sep 21, 2020
    Posts:
    2
    i have exactly the same issue
     
  7. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    If you are experiencing camera freeze issues on iOS, ensure that your device is updated to iOS 16.3 or newer, and AR Foundation is updated to 4.2.7 or newer (for 4.2) or 5.0.3 or newer (for 5.0). There were bugs in older versions of iOS and AR Foundation that could cause the camera to freeze.
     
    DevDunk likes this.
  8. RakanAD

    RakanAD

    Joined:
    Sep 21, 2020
    Posts:
    2
    Hello again, apparently you just need to indicate the max number of moving images to 1 or above, it was at 0 by default. It works for me, hope this will help you
     

    Attached Files:

    makaka-org, brett15 and DevDunk like this.
  9. brett15

    brett15

    Joined:
    Nov 19, 2019
    Posts:
    1
    Want to confirm that this worked for me too. Using Unity 2023.2.0f1, ARKit, Xcode 15.0.1, and iOS 17.0.3.
     
    makaka-org likes this.
  10. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,026
    In which case can 0 value be useful? @andyb-unity

    Maybe her you need to integrate Range Attribute?
     
  11. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
  12. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,026
    "The default value is 0, which disables image tracking. If you add reference images to detectionImages with this property set to 0, ARKit creates image anchors for observed reference images but their positions only update infrequently, such as once every couple of seconds."

    So with this description, I guess, 3D objects must stay on the screen, "floating" in the space, but in this post they are disappeared