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.
Minimal Implementation of Surface Mesh To Planes?
I'm still trying to learn all the components in the HoloToolKit. The last major piece that I have not gotten working is surface meshes to planes. I've gone through "Holograms 230" but I want to do this from scratch in my own app.
I've dragged in a SpatialMapping prefab (and it comes with a spatial mapping observer and manager), and then I dragged SurfaceMeshesToPlanes onto my main camera. I create another script that instantiates a SurfaceMeshesToPlanes object and I call .MakePlanes() on that object. I'm running this in the emulator with a room loaded and I do see the spatial mapping but I never get any .ActivePlanes. I know it's not a good idea to call this from a foreground thread but I was hoping I'd be able to do that in a simple app.
Which prefabs and scripts do I need to get an absolute minimal app to detect planes?
Best Answer
-
OptionsSimusid ✭
For the coders here (most of us), that awesome incredible feeling when you get something working! My working trivial implementation is a new project, drag in Spatial Mapping component, plus I copied the PlaySpaceManager.cs script from Holograms 230 and attached it to my camera. The only mod I made was to remove the line:
SpaceCollectionManager.Instance.GenerateItemsInWorld(horizontal, vertical);
because it is specific to that project. While I didn't get it working in the emulator, my code did work FINE on the device and detected my horizontal and vertical surfaces! Yes, I'm very excited. This is exactly how I want to spend my 4th of July (not joking!)
Cheers!
6
Answers
For the coders here (most of us), that awesome incredible feeling when you get something working! My working trivial implementation is a new project, drag in Spatial Mapping component, plus I copied the PlaySpaceManager.cs script from Holograms 230 and attached it to my camera. The only mod I made was to remove the line:
SpaceCollectionManager.Instance.GenerateItemsInWorld(horizontal, vertical);
because it is specific to that project. While I didn't get it working in the emulator, my code did work FINE on the device and detected my horizontal and vertical surfaces! Yes, I'm very excited. This is exactly how I want to spend my 4th of July (not joking!)
Cheers!