Hello everyone.

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.
Options

ARKit's Conceptual Equivalents for Anchor Persistence

stepan_stulovstepan_stulov ✭✭✭
edited July 2017 in Questions And Answers

Hello, everybody.

I know, this question belongs maybe 60% to Apple forums and 40% here, but I dare ask.

As far as I understood ARKit will have some kind of equivalents of WorldAnchors, called, well, Anchors. I haven't tried the ARKit myself yet, but from the listed API methods I don't see any persistence of anchors.

Have you guys, those who tried ARKit, found any conceptual equivalents of WorldAnchorStore or even better WorldAnchorTransferBatch?

Shot!

Building the future of holographic navigation. We're hiring.

Tagged:

Best Answers

  • Options
    stepan_stulovstepan_stulov ✭✭✭
    Answer ✓

    I have received a reply from a Unity employee that there are no anchor persistence APIs on the ARKit's side yet. Neither equivalent to WorldAnchorStore nor to the WorldAnchorTransferBatch. Fingers crossed they'll add it.

    Building the future of holographic navigation. We're hiring.

  • Options
    stepan_stulovstepan_stulov ✭✭✭
    Answer ✓

    Building the future of holographic navigation. We're hiring.

Answers

  • Options
    stepan_stulovstepan_stulov ✭✭✭
    Answer ✓

    I have received a reply from a Unity employee that there are no anchor persistence APIs on the ARKit's side yet. Neither equivalent to WorldAnchorStore nor to the WorldAnchorTransferBatch. Fingers crossed they'll add it.

    Building the future of holographic navigation. We're hiring.

  • Options
    stepan_stulovstepan_stulov ✭✭✭
    Answer ✓

    Building the future of holographic navigation. We're hiring.

  • Options

    @stepan_stulov
    That is a great news. Can I assume that ARKit/Unity includes the Scene Anchor Management across the scenes. I think that the existing scene management system in Unity is not exactly addresses this hololens requirement. You really need to customize a lot to get it to work across scenes that need to go across devices coherently.

  • Options

    Hey, @Karthik

    I'm not entirely sure what you mean by having to customise a lot to get it to work across scenes. On HoloLens Unity almost entirely just mirrors HoloLens's own API for anchoring. Would you like to elaborate?

    Building the future of holographic navigation. We're hiring.

  • Options

    @stepan_stulov ,

    Thanks for the follow up.

    Let us assume scene one has 4 game objects with each one has its own transforms. and animations. In Scene 2 we have some other 3 game objects with each one has its own transforms. and animations. Say now when scene two gets loaded from scene one, Unity will clear all scene objects entirely and load scene 2 objects. When we need to keep the second scene objects at the same location of Scene 1, we had to persist the scene 1 object transform across both the scenes and at the same time we need to maintain the rotation and scale differently in the second scene. Then we need to ensure the instances of these scenes are synchronized across lenses while switching the scenes. I had to custom code to capture the scene one transform and persist across scenes while loading the scene and maintain each scene's rotation and scale values. Then we had to ensure the synchronization of transform and animations across lenses can be done using world anchors. I understand ARKit does the anchor persistence across lenses , I wish it can persist scene anchors.

    I did try to explain as much as I could and hope I did not add more confusion.

    Please see this which may be helpful
    https://forums.hololens.com/discussion/3374/keeping-objects-anchored-while-changing-scenes-hololens

  • Options
    stepan_stulovstepan_stulov ✭✭✭
    edited July 2017

    Hey, @Karthik

    I think we are talking about completely different things. I was talking about the new ARKit on iOS. Nothing to do with HoloLens except parallel concepts. HoloLens indeed does have anchor persistence.

    As to your:

    I wish it can persist scene anchors.

    I actually think anchors API on HoloLens is simple and genius. First of all, this API comes from a third party vendor (Microsoft) so it's not originally obliged to know, care or be consistent with whatever it's integrated into (Unity scene API). Secondly I think anchors' purpose is to do one job and one job only: to maintain location and rotation of a game object most visually stable to its nearest environment. And anchors excel at that. How you wire that with other APIs (scenes, animations, network) is a concern for higher level APIs, such as sharing from the HoloToolkit and hand crafted solutions such as yours. Finally, Unity doesn't really persist game objects across scenes even if you use the infamous DontDestroyOnLoad. It actually recreates the object. So there isn't really any Unity-specific content that truly survives scene reloading, only your own back-end C# stuff. Let alone anchors.

    It seems to me the problem you're trying to solve involves multiple paradigms that are interwoven in a rather complicated fashion. Complexity is to be expected. There is network synchronization, scene management and world anchors. I would recommend to decouple those as much as you can. For example don't apply world anchors to the actual game objects you're trying to sync over network. Simply, on scene load, create empty invisible containers that are localized by the anchors. Then, nested in them, manage your game/app specific content which is animations ,transformations etc. Finally sync the states over network.

    Anchors don't persist across scenes because they shouldn't.

    Building the future of holographic navigation. We're hiring.

  • Options

    @stepan_stulov
    Thanks for the clear explanation as this is a parallel concept and iOS specific. I was wrong in my understanding. I got this scene position management working across scenes through customization. Network synch done with the world anchors.
    Thanks again for this input.

Sign In or Register to comment.