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.
Holograms 230 - Spatial mapping - Can't see triangles - Unity 5.5.0f3
Hello Everybody
I tryed now the whole day, to get the tutorial Holograms 230 - Spatial mapping running on my hololens. I done all the steps described in the tutorial but I can not see any Triangles after Chapter 1 - Build and Deploy (part 1). I just see nothing.
I deleted the whole project, redownloaded the sources and restarted several times, no success.
The Log of VS 15 says:
If your machine has multiple graphics adapters, Unity may have created a WindowContext on the wrong adapter. If you experience a black screen when playing, please restart the Editor.
(Filename: C:/buildslave/unity/build/Runtime/VR/VRDevice.cpp Line: 174)
But as I could read, this should not be the problem.
So I wonder, has anybody done this tutorial with Unity 5.5.0f3? Did you had success?
Thanks a lot for every kind of input!
lukas
Best Answers
-
Options
I met the same problem yesterday.
I've followed the course for several times. It just did not work. Then I tried to run the complete project. It did work as @ahillier said.
Then I thought there may be something wrong with the assets in the starting folder. So I delete the SpatialProcessing and SpaceCollection from the hierarchy of the complete project. But it does not show the triangles as well.
Anyway, I continued the course in the starting project. The triangles are shown after finishing Chapter 3-Processing.
So now I'm thinking maybe the course doesn't tell it right, that actually the Chapter 1 only scanning the room but not showing the triangles. I'll see more about the script codes later.5 -
Optionsroelkok ✭
I had the same problem where I didn't see anything in Chapter 1. The problem seems that the SpatialMappingObserver doesn't start observing. In general you wouldn't want to edit the toolkit files, but as a workaround for the first 2 chapters you could add the following to 'SpatialMappingManager.cs':
private void Start() { StartObserver(); }
In Chapter 3 where you update 'PlaySpaceManager.cs' you can remove this workaround.
6
Answers
Hi @lukaswerz,
It sounds like your project might not have the 'Virtual Reality Supported' option turned on. When this step is missed, nothing will be rendered on the HoloLens.
Have you tried to build/run the project in the Completed folder that comes with the class? In the completed project, the triangles will only be rendered for ~10 seconds before planefinding takes over and then the occlusion material is used instead.
If you want to see triangles longer, just increase scan time and/or change the 'Secondary Material' to be 'Wireframe' on the 'Play Space Manager' script component of the 'SpatialProcessing' object in your scene.
I am using Unity 5.50f3 with the latest files downloaded from the link in the course.
I am having the exact same problem. If I follow the steps exactly it wont work. if I just overwrite the assets folder it does.
Hi @ahillier
Thanks for your support. But I'm still not able to see the triangles. The 'Virtual Reality Supported' option was on...
I can run the Completed Project, so I don't try to find the error anymore.
Hi @AtA2k
Thanks for your support too! It did not help either.
Hi,
I am having same problem may like you problem.
In my case, i can see the spatial mapping mesh in Unity and Emulator, but i cannot see in my HoloLens. After i set the main camera in central of the sence (0,0,0), it will be work. So, i think you can try it.
I'm having exactly same problem.
I can't see any triangles when I built 'Build and Deploy (part 1)' of Chapter 1, but when I build completed project, I can see triangles.
I met the same problem yesterday.
I've followed the course for several times. It just did not work. Then I tried to run the complete project. It did work as @ahillier said.
Then I thought there may be something wrong with the assets in the starting folder. So I delete the SpatialProcessing and SpaceCollection from the hierarchy of the complete project. But it does not show the triangles as well.
Anyway, I continued the course in the starting project. The triangles are shown after finishing Chapter 3-Processing.
So now I'm thinking maybe the course doesn't tell it right, that actually the Chapter 1 only scanning the room but not showing the triangles. I'll see more about the script codes later.
According to the doc https://developer.microsoft.com/en-us/windows/holographic/spatial_mapping_in_unity, I added SpatialMappingRenderer and SpatialMappingCollider (if you wish) into MainCamera (Add Component -> AR). Still I could not see anything, but after setting both of Occlusion Material and Visual Material to Wireframe or SpatialMappingWireframe, I could see all triangles on Emulator. I think Occlusion Material is the key material to make the mesh visible.
I got it to work after mirroring the quality settings of the completed project.
I worked on the exercise in a new project and it worked well. When I made alterations to an existing project, I was unable to see the triangles. I had to create a new folder on my desktop to build the Unity solution to get visuals on the HoloLens.
I had the same problem where I didn't see anything in Chapter 1. The problem seems that the SpatialMappingObserver doesn't start observing. In general you wouldn't want to edit the toolkit files, but as a workaround for the first 2 chapters you could add the following to 'SpatialMappingManager.cs':
In Chapter 3 where you update 'PlaySpaceManager.cs' you can remove this workaround.
@roelkok That's the trick.
In the youtube video of the chapter 1, when I looked at the video for about 7 min, I noticed that the Awake() code in the video and my downloaded code is different. And going through the code, I conclude that I have to trigger the observer manually.
Thanks for the sharing!