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.
Spawn Holograms in different rooms?
Is it possible to read in the entire spatial map that someone has made of their area (home, office, etc) and spawn a hologram in a room the user is not presently residing in?
For example - the wearer starts in their kitchen and opens the app. They have used the hololens in their bedroom before and the map exists - can I spawn something in that room they are not in so when they walk into the bedroom it's there?
Best Answer
-
ahillier mod
@runamuck, I don't think that Unity's NavMesh will help here, as it does not work with dynamically generated meshes, which is what you'll get from HoloLens.
I think you would need to define the extents of your Spatial Mapping Observer to be large enough to cover the entire home, and after the home has been scanned, you would run some type of processing on the mesh data to find each room in the home. To start, I would run PlaneFinding, which will give you floors/ceilings/walls, and then come up with an algorithm that can group planes together as rooms. There isn't any blob detection on the device, so you won't have a way to tell if a room is a bedroom vs a kitchen, but you'll at least know if the person is currently in the room or not, and can decide to place a hologram in a different room than the one that the person is currently in.
5
Answers
@runamuck I personally have not done this but something that comes to mind is, Unity has a NavMesh concept and perhaps that could be leveraged here to know where the user is.
@runamuck, I don't think that Unity's NavMesh will help here, as it does not work with dynamically generated meshes, which is what you'll get from HoloLens.
I think you would need to define the extents of your Spatial Mapping Observer to be large enough to cover the entire home, and after the home has been scanned, you would run some type of processing on the mesh data to find each room in the home. To start, I would run PlaneFinding, which will give you floors/ceilings/walls, and then come up with an algorithm that can group planes together as rooms. There isn't any blob detection on the device, so you won't have a way to tell if a room is a bedroom vs a kitchen, but you'll at least know if the person is currently in the room or not, and can decide to place a hologram in a different room than the one that the person is currently in.
@ahillier Thank you! I will work with this to see how I get along. Very helpful.
Do you think it's possible to simulate this with the emulator? I know when you load the emulator you need to pick a sample "room". Doesn't seem like it has multiple "rooms"?