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.
Applying a texture to a room in the Emulator?
Does anyone know how you can apply a 3d texture to the spatial mapping graph in the emulator? I have a wireframe applied from Unity right now and it doesn't look great.
Basically, if I could get the room in the emulator looking like an actual room or something close to it, that would be great.
Best Answers
-
OptionsLeweyGeselowitz mod
You can use the color camera on the HoloLens to project a locatable photo onto the 3d surface reconstruction mesh. The code to do this using a single image is given below (for more images you'll need a custom texture atlasing system):
5 -
OptionsDeckTwelve ✭✭
RE: Texturing
Today I found a TriPlanar shader which helped solve my texturing problem, your mileage may vary, but its worth a look.
https://gist.github.com/radiatoryang/4725041RE: RecalculateNormals
sharedMesh works for me in the Unity editor but results in a NullReferenceException in the emulator. MeshFilter.mesh.RecalculateNormals() works.Here's an video of it in action with a simple checkerboard texture.
https://www.youtube.com/watch?v=igdrNpeS1dQ6
Answers
I've been playing with this also, although I'm not going for realism, and am struggling with UVs for the spatial mapping mesh, which causes textures to look terrible. I'll update the thread with more info this evening, hopefully a UV expert can help us out.
A texture might be tricky, but a shader that respects lights in the scenes could be used. The default diffuse shader in Unity will do this, and there are similar, but more performant, shaders in the HoloToolkit, such as 'StandardFast'. One note is that the normals in the spatial mapping mesh will need to be recalculated in the OnDataReady callback.
IE, from the HoloToolkit:
You'll need to add:
surface.GetComponent<MeshFilter>().sharedMesh.RecalculateNormals();
===
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?)
You can use the color camera on the HoloLens to project a locatable photo onto the 3d surface reconstruction mesh. The code to do this using a single image is given below (for more images you'll need a custom texture atlasing system):
https://developer.microsoft.com/en-US/windows/holographic/locatable_camera#Painting_the_world_using_a_camera_shader
What class is this in? Where exactly in the HoloToolkit?
I should have said, it's HoloToolkit-Unity\Assets\HoloToolkit\SpatialMapping\SpatialMappingObserver.cs
===
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?)
RE: Texturing
Today I found a TriPlanar shader which helped solve my texturing problem, your mileage may vary, but its worth a look.
https://gist.github.com/radiatoryang/4725041
RE: RecalculateNormals
sharedMesh works for me in the Unity editor but results in a NullReferenceException in the emulator. MeshFilter.mesh.RecalculateNormals() works.
Here's an video of it in action with a simple checkerboard texture.
https://www.youtube.com/watch?v=igdrNpeS1dQThat's awesome.
===
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?)
Exactly what we needed! Thank you!
Sorry we are absolute beginners.
How do we achieve this exactly?
This is what we have right now
and this
Right now we can't see anything in the emulator
Don't know if you managed or not, but all I did was make a new
(with black and white at 100x100 pixels) and choose that for each side, results look good to me (you could make the black more gray if you want to look smoother but I prefer the black)