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.
Having a very very very difficult time with spatial mapping (C++)
Okay so I'll have to split up the number of problems I have into multiple posts on here. The first priority is the awful rendering performance I'm getting with spatial mapping (30 FPS).
From what I can tell, all the settings I pass to the spatial SpatialSurfaceObserver are simply being ignored. For starters, the most important setting I pass, maxTrianglesPerCubicMeter seems to have no impact whatsoever on reducing the complexity of the supplied meshes, which are killing my performance because they are too high. Second, I've reduced the bounding volume to just 5, 5, 5 and I'm still getting back 50 surfaces some of which aren't even anywhere near the origin! Both of these problems combined are causing massive performance problems when rendering the spatial surfaces which is a huge concern for me since you don't even see these and the baseline performance of my engine is now garbage.
I know I need to frustum cull, but at this point I want to fix the problems at the root before I start doing CPU-level optimization.
Answers
Perfect example of what I mean. I passed 25.0 for triangles per meter. Here's the meshes I'm getting back (num verts, num inds)
so.. I've tried everything under the sun I can think of. Bottom line, if the hololens SDK doesn't honor the mesh complexity setting, my entire project is at risk. I can't speed up Angle any more than I already have, its generating shaders that are 2-4x as slow as directx equivalents, so I have to get the polycounts down. MS API people, if you read these forums, please make the maxTrianglesPerCubicMeter setting more accurate.
Did you try the async code? I have been using it and it seems to overall respond to the parameter - at least the surfaces look noticeably different at two very different values. I mostly use the default options as well.
The pSurface is Windows::Perception::Spatial::Surfaces::SpatialSurfaceInfo^
The bounding box is another story. I think the orientation and its placement is not obvious, as in my case it was cutting too much - but it also seemed to work as when I expanded it, it was cutting less (nothing).
Yep. My code equivalent of what you did is the same. (async). Honestly, I think I just hit the LOD floor for the meshes. My concern now is to figure out how to get ANGLE's OpenGL to render 100,000 faces as fast as DirectX11 can which is a tall order without the use of min16float or multiple constant buffers. That or I'm gonna have to drop into DX11 directly and bypass angle just to render the spatial meshes, which isn't that great.
I also recognized this behavior. Also TryComputeLatestMeshAsync seems to completely ignore the maxTrianglesPerCubicMeter setting. However the Volumes out of your desired bounds can easily be ignored by the bounding volume given per mesh. To generate different amount of triangles within the Volume seems much more complex.
Are you using TryComputeLatestMeshAsync with or without SpatialSurfaceMeshOptions (I am using the one with SpatialSurfaceMeshOptions, had no time to try without SpatialSurfaceMeshOptions yet)