microsoft / MixedReality-WorldLockingTools-Unity

Unity tools to provide a stable coordinate system anchored to the physical world.
https://microsoft.github.io/MixedReality-WorldLockingTools-Unity/README.html
MIT License
188 stars 45 forks source link

Update XR SDK docs #230

Closed fast-slow-still closed 2 years ago

fast-slow-still commented 2 years ago

This page is old, from before OpenXR existed: https://microsoft.github.io/MixedReality-WorldLockingTools-Unity/DocGen/Documentation/HowTos/XRSDK.html

See especially the section on setup for HoloLens.

Also, update the names of the MRTK profiles to use (HoloLens & Android).

FelixWeichselgartner commented 2 years ago

An example how to setup OpenXR respectively AR Foundation for Unity 2020 with WLT would also be nice. XR SDK is basically selecting XR SDK as subsystem (which I got working), but for AR Foundation one has to setup the session origin, session source and anchor manager etc.

E.g. I'm currently trying to switch from my App for HL2, which uses OpenXR Anchor Manager (similar to https://github.com/microsoft/OpenXR-Unity-MixedReality-Samples/tree/main/BasicSample), to using World Locking Tools for improving my hologram stability and precision. At the moment I'm a but clueless how to setup the scene. In my example I had to handle the anchor setting, loading and saving on my own, so I'm unsure about the API between WLT and OpenXR Anchors and the basic setup of OpenXR for WLT.

fast-slow-still commented 2 years ago

@FelixWeichselgartner the WLT with ASA samples are setup for AR Foundation with Unity 2020. That's because AR Foundation and Unity 2020 are ASA requirements. On HoloLens, they support either the Windows MR Plugin, or the MR OpenXR Plugin, whichever your project is setup to target.

I, too, have found the documentation unclear on distinguishing between AR Foundation, XRSDK, OpenXR, etc.

In my example I had to handle the anchor setting, loading and saving on my own, so I'm unsure about the API between WLT and OpenXR Anchors and the basic setup of OpenXR for WLT.

With WLT, you shouldn't be creating or maintaining spatial anchors. WLT creates and maintains a spatial anchor graph, which it uses to stabilize the entire Unity global coordinate space. So you no longer need to anchor objects, you just place them, and they stay where you put them with respect to the physical environment. Here's a pretty good place to start to get an idea of what WLT offers.

But basically, you get your application project setup for using the platform of your choice (e.g. XRSDK+WRMPlugin or ARFoundation+OpenXRPlugin), install WLT, and forget about anchors. Here are more details on setup, including links to the technology owners (e.g. AR Foundation or MRTK).