Mixed Reality Utility Kit - Space Map.
Updated: Mar 13, 2025
After completing this section, the developer should understand the basics of the SpaceMap feature.
SpaceMap is a tool that generates a top-down 2D texture of your scene. Each pixel represents its distance to the nearest wall or scene anchor.
There are 2 implementations for this feature.
SpaceMap and
SpaceMapGPU. SpaceMap is targeted for deprecation as it is an earlier implementation of this feature and is slower than SpaceMapGPU. We recommend using SpaceMapGPU.
To add this functionality to your MRUK scene, simply add the SpaceMapGPU component into your scene.
A few notable fields in this component:
- SpaceMapCreatedEvent() - This event fires when the SpaceMap is done generating. You can assign listeners to this field.
- Scene And Room Settings - Choose when the space map should generate. Selecting ‘None’ will not run the space map unless called by API.
- Create Output Texture - if set, this property will write the spacemap into the ‘Output Texture’ Texture2D field, making it available to scripts and not just to shaders. Be mindful if you run the space map in Update with this enabled as it adds overhead.
Using SpaceMap with custom shaders
By writing your own custom shaders, you can use it to achieve various visual effects like a primitive form of ambient occlusion, blending between different floor textures inside outside of the room.
Ambient occlusion

Blending grass/dirt textures

The texture is provided as input for you to create your own unique shaders and interesting effects with it. Here are a few other examples of things it could be used for:
- Spawning moss/rocks at the edges of your room
- Finding free space large enough for placing content
- Generating procedural levels
Note There are two implementations of SpaceMap. We are deprecating the original SpaceMap implementation in favour of SpaceMapGPU as it is much more efficient using the
Jump flooding algorithm and can support larger texture sizes and dynamic updates.