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. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  3. Dismiss Notice
  4. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Help Wanted Hololens 2 Support

Discussion in 'Unity MARS' started by InitusInteractive, Jun 4, 2020.

  1. InitusInteractive

    InitusInteractive

    Joined:
    Aug 16, 2018
    Posts:
    87
    So, there seems to be an issue with HL2 support.

    At this time I am only aware of HL2 using the MixedReality Tool Kit but that needs to be installed on 2018.4, when installing MARS it has a cow and complains/

    Cannot find a compatible package version for this Unity version (2018.4.23f1).
    Removing MARS auto installer...

    How do I develop for HL2 with MARS?
     
  2. RafKie

    RafKie

    Joined:
    Sep 13, 2019
    Posts:
    2
    I'm running MRTK on the latest 2019.3 for HL2 development and it works fine.
     
  3. HolyManoly

    HolyManoly

    Joined:
    May 14, 2014
    Posts:
    7
    Hey, I'm also trying to run the MARS Samples scene in HL2, running 2019.4.0f1. I tried adding the Game_Simple scene to Build settings and making an APPX to deploy. After loading the app, I literally do not see anything, and the UnityPlayer log on the device is completely empty.

    Is there any additional setup after enabling VR for the project and adding WMR as the XR Runtime ?
    Do I need to leverage MRTK for spatial understanding, or just if I need it as an interaction framework ?
     
  4. mtschoen

    mtschoen

    Unity Technologies

    Joined:
    Aug 16, 2016
    Posts:
    135
    Hi there! Thanks for trying MARS.

    MARS requires Unity 2019.3.0f6 and above. Projects with MARS in 2019.3.x and above can build to HoloLens using the Windows Mixed Reality XR plugin (`com.unity.xr.windowsmr@2.1.5`) and AR Foundation (`com.unity.xr.arfoundation@2.1.8`). Platform data (camera tracking, planes, etc.) is exposed to MARS via a package called MARS AR Foundation Providers which depends on AR Foundation. A detailed breakdown of this integration and supported features can be found in the MARS AR Foundation Providers documentation

    Unfortunately, as you can see, the only feature that we currently support on HoloLens is Camera Tracking. You can use MARS, but our providers don't expose any platform level data to MARS, so plane visualizers and proxies looking for planes won't show up. This is likely why you are seeing a black screen for MARS content which looks right in the Editor.

    It may be possible to hack out the references to 2019.3 and get MARS working in 2018, but as @RafKie suggests, it is simpler to update MRTK to 2019. This still doesn't solve the problem of getting mesh segments into MARS, but it should be a path forward for working on a MARS project that also supports HoloLens.

    In our initial public release, we have focused on workflows that use planes and faces. The issue we have when trying to use MARS on HoloLens is that the platform does not expose surfaces as individual planes but as a single continuous mesh. As such, for world understanding, MARS only has one segment of data to "match." We are currently investigating solutions for generating planes on HoloLens, and incorporating mesh data for visualizers and integration with the MARS forces feature, which allows us to define occupied space and forces to push content toward or away from occupied regions. In other words: we're on it; watch this space!

    In the short term, a great way to get MARS content working on HoloLens is synthesized data. If you write a script to listen for the "click" hand gesture and create a synthetic object where the player's head gaze intersects with the mesh, you can spawn proxies that are set up to match to a particular semantic tag. With a little more effort, you can allow the user to mark segments of mesh as "planes" that your MARS proxies for smartphone AR will match with.

    Magic Leap, on the other hand, does provide planes to AR Foundation and MARS. If you have access to a Magic Leap device, you should be able to try MARS a try and see what it can do for head-worn AR workflows. One way or another, we will eventually be able to properly expose HoloLens world-understanding data to MARS and all you should need to worry about is how to define your proxies so that they do what you want them to do on smartphones, HMDs, and anywhere in reality.
     
    HolyManoly and jmunozarUTech like this.
unityunity