Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Is it possible to use ARFoundation's ImageTracking to display the same object on all the same marker

Discussion in 'AR' started by taeyoungkimbgl, Oct 11, 2023.

  1. taeyoungkimbgl

    taeyoungkimbgl

    Joined:
    Dec 24, 2020
    Posts:
    7
    ※Development Environment
    Windows 10
    Unity 2021.3.23f1
    AR Foundation 4.2.8
    Google ARCore XR Plugin 4.2.8
    ARKit XR Plugin 4.2.8
    XR Plugin Management 4.3.3

    I am using ARTrackedImageManager with android and iOS tablets.

    Is it possible to use ARFoundation's ImageTracking to display the same object on all the same markers on the camera?

    For example, the following asset.
    https://assetstore.unity.com/packages/templates/tutorials/markerbased-ar-example-29678
    スクリーンショット 2023-10-11 100714.jpg

    I have tried, for example, registering the same image in the Reference Image Library as a marker with a unique name and setting Max Number Of Moving Images to 2.
    (I have attached the image I set up.)
    Screenshot 2023-10-11 at 9.53.22.png Screenshot 2023-10-11 at 9.53.49.png

    The result was no recognition whether I put one marker on the camera or two markers on the camera.

    I would like to achieve this functionality with ARFoundation alone, without any other assets if possible,
    I would appreciate any advice on how to do this.
     
  2. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    824
    The images you selected are very difficult for ARCore or ARKit to track. These systems are not designed to track QR codes.

    Note ARCore best practices:

    Apple does not publish a comparable best practices guide but these notes also apply to ARKit in our experience.
     
    KyryloKuzyk likes this.
  3. taeyoungkimbgl

    taeyoungkimbgl

    Joined:
    Dec 24, 2020
    Posts:
    7
    Thanks so much for always replying to me.

    I tried with the Earth image from Example image2 in Note ARCore best practices.

    The result was not recognized.

    I think that if the same image is in the Reference Image Library, the marker cannot be recognized, am I making a mistake?

    As mentioned in the title, I would like to know if there is a way to recognize all markers when there are several that are the same.

    Setting details
    Screenshot 2023-10-12 at 9.08.42.png Screenshot 2023-10-12 at 9.08.57.png
     
  4. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    824
    How would you suggest that the platform distinguish between two identical images? No, to my knowledge there is no way to visually distinguish between two identical images. Using multiple copies of the same image in a reference image library is undefined behavior as far as Unity is concerned.
     
  5. taeyoungkimbgl

    taeyoungkimbgl

    Joined:
    Dec 24, 2020
    Posts:
    7
    I am very grateful for your reply.

    I understood about the following.
    Using multiple copies of the same image in a reference image library is undefined behavior as far as Unity is concerned.

    Now then, I have only added one image of the earth to the reference image library and have confirmed that if there are multiple markers of the earth, only one of them will be recognized.
    Is it impossible for Unity to recognize all of these?
     
  6. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    824
    Unity does not author any image tracking software. We provide a cross-platform C# interface to platform implementations. Refer to your platform's documentation (ARCore, ARKit, etc) for information about the platform capabilities.
     
    taeyoungkimbgl likes this.
  7. taeyoungkimbgl

    taeyoungkimbgl

    Joined:
    Dec 24, 2020
    Posts:
    7
    I appreciate your advice, and I will be sure to keep it in mind as I go through the process.
    You are right I would like to check the functionality of the platform.
     
    andyb-unity likes this.
  8. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    824
    In the future we intend to add more platform documentation links to our package docs to reduce the amount of homework necessary for developers like you to reason about platform API's. Best wishes on your app!
     
    taeyoungkimbgl likes this.