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.
Sample location for Spatial Mapping in Direct X?
Does anyone know where to find the sample mentioned in the article about Spatial Mapping in Direct X? I've searched high and low but it seems it does not exist. It constantly refers to files that don't exist in any MS owned GitHub repository or SDK.
This is the article I'm referring to:
https://developer.microsoft.com/en-us/windows/holographic/spatial_mapping_in_directx
Any help will be greatly appreciated!
Thank you,
Bret
Best Answers
-
Options
We are currently working to get the HolographicSpatialMapping sample published; I'll make sure to provide another update with links to the sample when it is available.
Until that time, it should be possible to use the article as a walkthrough for modifying a Windows Holographic app project to support Spatial Mapping. To do so, follow the steps to create a new holographic DirectX project (as per @Jimbohalo10's comment), then copy and paste code from the article to create your own spatial mapping project. Note that in this case, you will have to fill in some gaps such as adding namespace declarations and header imports - and creating new files for classes that handle Spatial Mapping.
5 -
Options
The Holographic spatial mapping sample is now available on GitHub. For more info see the README at https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/HolographicSpatialMapping.
To build the sample, you'll want to clone the Universal Windows app samples git repo, then build the solution in Samples/HolographicSpatialMapping/cpp. If you have already cloned this repo, it should be sufficient to pull the latest from it.
6
Answers
Sounds like it was supposed to be included as a sample in the SDK. I couldn't find it either though. Perhaps they forgot to ship it?
Yeah, that's what I figured as well. It mentions it should be part of the Windows SDK but in searching their repository for that, I couldn't find it. Hoping somebody from MS sees this and can fix it or point me in the right direction. Might just be scheduled for the next SDK update since the HoloLens has barely started shipping.
@InterestingHandle @Bryan Sample here is a mis-nomer. The docs are referring to the D3D template that you can install along with the emulator.
@CoreyGoff Thank you for your response. Unfortunately that article explicitly states that it is intended to accompany a sample that should be included in the SDK as shown from the quote below:
Also, in numerous locations throughout the article, it refers back to that sample:
I assume they just haven't published that sample yet.
Thanks,
Bret
@CoreyGoff to add to what @InterestingHandle said, the docs reference a number of files that aren't included in that D3D template.
In the meantime until the SDK is updated, there is a useful article Creating a holographic DirectX project
We are currently working to get the HolographicSpatialMapping sample published; I'll make sure to provide another update with links to the sample when it is available.
Until that time, it should be possible to use the article as a walkthrough for modifying a Windows Holographic app project to support Spatial Mapping. To do so, follow the steps to create a new holographic DirectX project (as per @Jimbohalo10's comment), then copy and paste code from the article to create your own spatial mapping project. Note that in this case, you will have to fill in some gaps such as adding namespace declarations and header imports - and creating new files for classes that handle Spatial Mapping.
``I just went through the journey of getting spatial mapping to work in the C++ template myself.
Here's some of the missing code.
Creating a buffer, I don't have the helper function referenced from the article, but this snippit is what you need to create the vertex buffer, the index buffer follows the same pattern:
And here's GetDataFromiBuffer (I put this in pch.h):
and finally the default format of the positions is DXGI_FORMAT_R16G16B16A16_SNORM, so you'll need to make your InputLayout and VertexShader match this.
the input layout
and in my shader:
I hard coded the output of the vertex shader to white, and I set my rasterizer state to draw wire frame.
===
This post provided as-is with no warranties and confers no rights. Using information provided is done at own risk.
(Daddy, what does 'now formatting drive C:' mean?)
The Holographic spatial mapping sample is now available on GitHub. For more info see the README at https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/HolographicSpatialMapping.
To build the sample, you'll want to clone the Universal Windows app samples git repo, then build the solution in Samples/HolographicSpatialMapping/cpp. If you have already cloned this repo, it should be sufficient to pull the latest from it.
Hi Can you tell me where is the processing of the Mesh, why there are many source inside the ground layer mesh? Thank you.