Search Unity

  1. Unity wants to learn about your experiences working on a Unity project today. We'd like to hear from you via this survey.
    Dismiss Notice
  2. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice
  3. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Help Wanted Object Markers/Shape Recognition

Discussion in 'Unity MARS' started by masigouin, Mar 29, 2021.

  1. masigouin

    masigouin

    Joined:
    Feb 23, 2021
    Posts:
    6
    Is there a way right now to be able to detect shapes or use a real life 3D object as a proxy?

    Like, for example, if I want to activate some kind of content if I detect a mug and activate something else if I find a pepsi can.

    Thank you very much!
     
  2. jmunozarUTech

    jmunozarUTech

    Unity Technologies

    Joined:
    Jun 1, 2020
    Posts:
    221
    hello @masigouin,

    We dont have object detection in MARS yet, BUT, since MARS works with ARFoundation, you could definitely use object tracking from ARFoundation and run it along with MARS. (https://docs.unity3d.com/Packages/com.unity.xr.arsubsystems@4.2/manual/object-tracking.html)

    To achieve this you can check the ARFoundation samples project (https://github.com/Unity-Technologies/arfoundation-samples) and check the ObjectTracking scene. Bare in mind that this sample requires iOS 12 and is not supported on Android.
     
  3. masigouin

    masigouin

    Joined:
    Feb 23, 2021
    Posts:
    6
    Well that's a shame, I just so happen to only have an Android device! XD

    Is it possible to simulate the object tracking in the simulation view even though it's an AR Foundation thing?
     
  4. CiaranWills

    CiaranWills

    Unity Technologies

    Joined:
    Apr 24, 2020
    Posts:
    47
    To simulate object tracking in the editor you would need to implement an ARSubsystem that simulates it (specifically a XRObjectTrackingSubsystem.Provider) - AR Foundation would talk to this and allow you to use AR Foundation's object tracking API in the editor the same as if you were running on a device that supported object tracking. However implementing something like that is a not inconsiderable amount of work.

    Otherwise ARKit on iOS is the only platform that supports 3D object tracking right now unfortunately.
     
    jmunozarUTech likes this.
unityunity