Users learn how a device perceives and understands the physical environment through spatial mesh visualization. Proper spatial mesh visualization can create a delightful and magical experience while providing spatial context.
It’s important to allow the user to focus and interact with content. Continuous visualization of the spatial mesh in the background can be distracting. We recommend visualizing the environment sparingly, either only once in the initial launch or when the user clearly shows they want to see the environmental mesh by targeting and air-tapping space. You can observe this behavior in the Mixed Reality Portal.
MRTK provides several materials for the spatial mesh visualization.
MRTK_Wireframe.mat, MRTK_Wireframe.mat: Default static spatial mesh material, which shows the mesh outlines without animation. This material is useful for debugging purposes since it shows the entire spatial mesh geometries. However, it isn’t recommended for production.
MRTK_SurfaceReconstruction.mat: This material gives you an animated pulse effect on the spatial mesh. You can use this material to visualize the environment at a specific moment or on the user’s air-tap input. See PulseShaderExamples.unity scene for the examples.
For more information, see MRTK - Spatial Awareness and MRTK - Pulse Shader.