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

Applying materials to spatial mapping mesh - lag time

Part of the functionality of an app I have been working on requires the Hololens to apply one of several materials to the spatial mapping mesh of a room and change between materials. However, when I cycle between materials, I have noticed that the new material does not get applied to all parts of the spatial mapping mesh. Rather, I have to look at the new mesh and it will eventually change. I am wondering if there is a way to get this change to happen immediately? Ideally, the solution would not involve pre-mapping the environment. If not, any suggestions to improve performance?

Tagged:

Answers

  • Options

    Hi @jgualtieri,
    Are you using any of the prefabs from HoloToolkit or the 230 Spatial Mapping course? If so, SpatialMappingManager.cs allows you to swap out materials, and it's pretty immediate for all meshes. If you're rolling your own solution, then double-check that you are changing the renderer's sharedMaterial, instead of just material (which will make a copy and be slow).

    If you are hitting this issue with the HoloToolkit or 230 course code, then please let us know! We have recently fixed some bugs that could cause issues while swapping materials, so you'll want to pull the latest code.

  • Options

    Thank you for getting back to me @ahillier . I am indeed using the some of the prefabs from HoloToolkit and the 230 Spatial Mapping course. Specifically, I am using the Main Camera, SpatialMappingObserver, and SpatialMappingManager (among others).

    Unfortunately, it seems that my code already follows all of your suggestions to improve performance. I am hitting this issue with the HoloToolkit and the 230 course code, and I have made sure to pull the latest code. Essentially, I use voice and gesture inputs to update the renderer's sharedMaterial, which then causes the material to change. Even after all of this, I am still experiencing significant delay for the spatial mapping to update completely. Do you have any other suggestions?

  • Options

    Hey @jgualtieri ,did you find a solution to covering meshes?

Sign In or Register to comment.