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

Persistent Spatial Anchors and or Space Pins Between Builds and Headsets? #312

Open atx-barnes opened 1 year ago

atx-barnes commented 1 year ago

Hello,

I've been taking a look at using the World Locking Tools for a project that involves viewing and interacting with persistent Holograms through a large office space. I'm still working my way through the documentation and have found a lot of great examples and information about using Space Pins and QR codes to align Unity coordinates to the physical world to make Holograms appear in the correct locations relative to physical infrastructure.

My question is related to my interest in authoring Holograms using a LiDAR mesh in Unity before its built meaning I'd love to export the mesh that the HoloLens 2 generates as well as the spatial anchor data from walking around the space and visualize both of them in Unity to place Holograms pre-build so I can easily deploy to multiple headsets without having to initialize each headset to the space.

Is something like this possible with the current version of WLT? There is documentation describing how once you align/anchor Holograms to a physical space they will persistent between sessions but where can I find information how on to potentially serialize/export spatial anchor and mesh data from a HoloLens to include into Unity and then be built to a device without having to pin everything again? Is there a file that can be exported from one HoloLens that I can include in a Unity build to another HoloLens? Hopefully, that makes sense.

Thanks

XRWebland commented 1 year ago

Out of curiosity, did you ever find a workable solution to this?

gmilovanovic commented 1 year ago

I am not sure if this helps but you can do this from the Hololens device itself. The maps from WLT will apear in Map manager section on Hololens page, as soon as you start the APP. Hololens Map Manager you you can acess it by typing the Hololens IP adress in your browser. From there you can then export those anchor points and map files to your local drive. I am now looking for a way to load those maps (and if someone knows how, please help) As for 3D map as 3D object you can get it by going to the 3D view again on the hololens page in browser and click on Update. than walk around room and after that you can export the map as fbx data. I hope I understood your question and if not I apologize.