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.
Options

Spatial Mapping From Scratch

fq76fq76
edited August 2016 in Questions And Answers

Firstly, I've gone through all the 101E examples successfully by following the instructions point by point.
I'm now having trouble getting the spatial mapping mesh to render when I try to do it from scratch.

Expected Result
I see rendering of the emulated room

Actual Result:
Nothing renders and I only see black

Here's what I am doing:

Unity Code

  1. Create a GameObject and attached a script with the exact code as the
    Spatial Mapping Example in 101E
  2. Imported the Wireframe file (no extension) and its .shader file
  3. Dragged the .shader file to the no extension Wireframe file in Unity (to associate the two)
  4. Associated the Wireframe as the Material in the script
  5. Checked the "Draw Visual Meshes"
  6. Though unnecessary (since the example didn't need them for rendering), I added the
    "Spatial Mapping Renderer"
    and
    "Spatial Mapping Collider"
    components and set them with the same settings as in 101E.

Unity Config

  1. a) Go to Edit > Project Settings > Player~~~~
    b) Under Publish Settings > Capabilities, check the "SpatialPerception" box
  2. a) Edit > Project Settings > Quality
    b) Set the Windows projects to "Fastest"
  3. a) File > Build Settings
    b) Added Open Scenes and made sure it was checked
    c) Player Settings > Other Settings > Virtual Reality Support is checked and "Windows Holographic" is listed
    d) Highlight Windows Store
    SDK = Windows 10
    UWP Build Type = D3D
    Checked "Unity C# Projects"
    e) Click "Build"

Visual Studio

  1. I opened the App > .sln file
  2. I edited the Package.appxmanifest file to say "Windows.Holographic" vs "Windows.Universal"
  3. Set it to "Release","x86", and the Hololens Emulator
  4. Debug > Start without Debugging

Note:
I've also deployed this to the Hololens hardware with the same results, so it's not an emulator issue.

Hopefully I've done something obviously wrong that you experienced gurus can point out.
I feel like there's some project settings or some prefab generation steps that I'm missing. I'm going to go through the 230 course to see if there's something in there that they glazed over the intro.

Rant

I wish the tutorials would take you step by step from scratch vs just opening their Origami project and copying their prefabs into the project. This is a really good way to get people excited because of how easy it is, but it becomes really frustrating once you run into issues doing something on your own.

Best Answer

Answers

  • Options

    Hey Angela,

    Much appreciated for the detailed response! I didn't know the UWP was also a build folder, so that helped with generating a clean build.
    Great tip to check the Package.appxmanifest to double check the capabilities. It's all working great now!

Sign In or Register to comment.