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.

Spatial mapping updates

So I'm noticing something interesting related to the spatial mesh/collider updates. If I leave my spatial observer (or unity built in equivalent) on after some "play" time, the position of the room mesh constantly update, which is normal as more data about the room comes in. My question to this, how should you handle those updates when talking about objects placed in that space before the update. As an example, I place footprints (2d plane with texture) where I'm first detecting a ray hit from camera to the floor mesh. As I walk through my room, the spatial mapping gets better and my next footprint is now placed in a more accurate location related to the floor. As I look back I can see that my previous foot prints are essentially floating while the latest ones are on the floor.

One thought I had was to just do a periodic update of my items and check if they are at the same Y plane as the "current" floor and then lerp the position to sneak it into position smoothly and hopefully the player won't notice that they adjusted. Any ideas on how to deal with this?

http://www.redsprocketstudio.com/
Developer | Check out my new project blog

Tagged:

Answers

  • Hey, @AmerAmer

    You could, as one option, simply redo the process of finding your footsteps using the new spatial mapping and the old origin of the raycast. To preserve the origina of your raycasts you can simply attach a world anchor to each of them. Thus your footsteps will always be on the correct surface.

    You can also let the footsteps very gradually fly from their old position to the newly calculated one.

    Or, alternatively, you just attach a world anchor to each foot step and you're golden. No need to recalculate anything.

    Cheers

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

  • AmerAmerAmerAmer ✭✭✭

    I haven't applied anchors yet but I think my case scenario will probably cause issues. https://docs.microsoft.com/en-us/windows/mixed-reality/spatial-anchors#avoid-creating-a-grid-of-spatial-anchors. Can multiple objects in a nearby voxel use the same anchor?

    http://www.redsprocketstudio.com/
    Developer | Check out my new project blog

  • AmerAmerAmerAmer ✭✭✭

    What is sort of working for now is what I was testing earlier. That is moving the position to the last known floor Y plane. There is some movement in the first 5-10 seconds but afterwards they stabilize

    http://www.redsprocketstudio.com/
    Developer | Check out my new project blog

  • stepan_stulovstepan_stulov ✭✭✭
    edited May 2018

    Hey, @AmerAmer

    I haven't applied anchors yet but I think my case scenario will probably cause issues.


    Can multiple objects in a nearby voxel use the same anchor?


    Indeed it's unnecessary to create too many anchors, especially ones that are crowded in the same location. However, you can still create fewer of them applied to empty game objects and have your footsteps have their own position/rotation relative to those anchors. "Meta-anchors on top of anchors" if you wish. Each meta-anchor can be based on multiple anchors at the same time and average the positions/rotations.

    Cheers

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

Sign In or Register to comment.