The Mixed Reality Forums here are no longer being used or maintained.
There are a few other places we would like to direct you to for support, both from Microsoft and from the community.
The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.
For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.
If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.
And always feel free to hit us up on Twitter @MxdRealityDev.
Dump and load SpatialAnchorStore
Hey,
Persisting spatial anchors and sharing Holograms with the sharing service is pretty clear to me. What I'd like to achieve now is a combination of both.
Is it possible to dump the spatial anchor data somewhere (file, ftp ...) and then load it from a different HoloLens? I don't need any realtime sync and don't want to have a computer involved for the sharing service. It's a one time setup Szenario and after that another HoloLens should be able to retrieve the Holograms I placed.
Would be nice if someone could push me in the right direction!
I'm working with Unity.
Best, Jan
Best Answer
-
stepan_stulov ✭✭✭
Hello, @DonPepe
It is possible. You need to look into the WorldAnchorTransferBatch. It works as follows. You add all the anchors into the batch and serialize it into a byte array. You can then transfer that byte array onto another HoloLens by any means of your choice: download/upload via Device Portal, save to a server, send peer-to-peer (this one may take a lot of time though). Once another HoloLens obtains the bytes, it can deserialize them back into its own batch, get anchors from it and apply them onto its own holograms.
There are a bunch of problems with this solution, some of which have been discussed on this forum. Namely serialization and deserialization may not always finish successfully so you have to do retries. Another being locatability of the anchors when the spatial perceptions of the source and the destination HoloLenses differer. And another being the size of the batch where you're talking tens of megabytes.
I have used this solution and it worked for me very well on fresh pristine Spaces.
Building the future of holographic navigation. We're hiring.
5
Answers
Hello, @DonPepe
It is possible. You need to look into the WorldAnchorTransferBatch. It works as follows. You add all the anchors into the batch and serialize it into a byte array. You can then transfer that byte array onto another HoloLens by any means of your choice: download/upload via Device Portal, save to a server, send peer-to-peer (this one may take a lot of time though). Once another HoloLens obtains the bytes, it can deserialize them back into its own batch, get anchors from it and apply them onto its own holograms.
There are a bunch of problems with this solution, some of which have been discussed on this forum. Namely serialization and deserialization may not always finish successfully so you have to do retries. Another being locatability of the anchors when the spatial perceptions of the source and the destination HoloLenses differer. And another being the size of the batch where you're talking tens of megabytes.
I have used this solution and it worked for me very well on fresh pristine Spaces.
Building the future of holographic navigation. We're hiring.
Looks like exactly what I need, thank you!