OpenXR Spatial Entities
More actions
OpenXR Spatial Entities is a family of OpenXR extensions for representing and querying elements of an XR user's surroundings. It provides a common framework for scene understanding, including tracked surfaces, visual markers and spatial anchors. The base extension, XR_EXT_spatial_entity, organizes information into entities and components; additional extensions define particular tracking and persistence capabilities.[1]
Purpose and history
Spatial Entities gives applications a shared API for obtaining environmental information and associating virtual content with real locations. Khronos announced the initial extension family on 10 June 2025 under the heading "released for developer feedback". The announcement also stated that the extensions had already been ratified and published. Developer feedback did not mean that the published specifications were unratified drafts.[2]
The initial family appeared in specification release 1.1.49, dated 10 June 2025. Later releases expanded it: 1.1.63, dated 1 September 2026, added spatial image tracking; 1.1.65, dated 16 October 2026, added spatial object tracking, environmental mesh tracking, entity archetypes and an additional plane semantic-label set. These are extension publications, rather than a statement that every OpenXR runtime implements them.[3]
Entities, components and spaces
The framework separates an entity from the information available about it. An entity can represent a physical feature, virtual content or something defined by the application. Components describe its properties or behavior. An entity has at most one component of a particular type. A capability supplies a particular kind of functionality, such as plane tracking, and specifies the components that its entities can provide.[1]
| Concept | Role |
|---|---|
| Spatial entity | An item represented in the spatial framework, such as a detected plane or an application-created anchor. |
| Component | A typed part of an entity's data, such as bounds, an anchor pose or a persistence identifier. |
| Capability | A configured source of functionality and associated component types, rather than a guarantee that every device offers the same environmental data. |
An XrSpace is a frame of reference used to express coordinates. For example, a reference space establishes where an origin and axes are located, while a pose-action space can follow a controller. An entity is a representation carrying data, so it is not interchangeable with the coordinate frame used to express that data.[4][1]
An XrSpatialEntityIdEXT identifies an entity within its spatial context. The same physical item discovered through another context does not therefore provide a reusable cross-context ID. Applications can also obtain XrSpatialEntityEXT handles to indicate an ongoing interest in particular entities and request updates for them.[5][1]
Capability discovery and context setup
Applications enumerate the capabilities, component types and capability features supported by the selected OpenXR system. They configure the capabilities and components they intend to use when creating an XrSpatialContextEXT. The context manages the resources needed to discover and update entities. A context must enable at least one capability, with a nonempty component configuration; requesting an unsupported capability or component produces an error.[6]
Context creation is asynchronous. The framework uses XR_EXT_future: an operation returns a future, the application polls it, and a corresponding completion function retrieves its result when ready. Acceptance of the initial request is not confirmation that the underlying operation succeeded.[7]
A runtime may require permission to access environmental capabilities. Its tracking pipeline may also need time to start, so an early discovery request can return no entities. The specification provides a discovery-recommended event to help applications schedule requests without repeatedly gathering unchanged information.[6][1]
Initial extension family
| Extension | Function and boundaries |
|---|---|
XR_EXT_spatial_entity |
Establishes the context, entity, component, capability and snapshot framework. Concrete tracking capabilities are supplied by other extensions.[1] |
XR_EXT_spatial_plane_tracking |
Supplies plane entities with 2D bounds and alignment information. Polygon boundaries, 2D meshes and semantic labels are optional components, so applications must check for them.[8] |
XR_EXT_spatial_marker_tracking |
Defines capabilities for QR codes, Micro QR codes, ArUco markers and AprilTags. Each supported marker category is advertised separately. Tracked markers provide marker data and 2D bounds.[9] |
XR_EXT_spatial_anchor |
Lets an application create an anchor at a chosen physical location. Its anchor component supplies a pose that the runtime can adjust as its environmental tracking changes.[10] |
XR_EXT_spatial_persistence |
Provides persistence contexts, discovery of stored entities and UUIDs for correlating entities across sessions. Persistence scopes determine which storage an application can access.[11] |
XR_EXT_spatial_persistence_operations |
Adds asynchronous operations to persist and unpersist entities. Its local-anchor scope is limited to anchors on the same device, for the same user and application.[12] |
Discovery, snapshots and tracking
Applications read environmental data through snapshots. An XrSpatialSnapshotEXT holds a coherent, immutable collection of entities and selected component data. It does not continually change as tracking improves. Applications obtain a new snapshot for newer information and release snapshots when finished with them.[13]
A discovery snapshot gathers entities asynchronously. A supplied component filter selects entities having at least one requested component and includes data for the requested component types. An update snapshot instead takes handles for specific known entities and retrieves their latest component information; it does not discover additional entities.[14][15]
The subsequent component-data query has a different rule: when several component types are requested, returned entities must have all of them. Query results include entity IDs and tracking states alongside requested data. A tracking state of PAUSED can resume; STOPPED means that the runtime will not resume tracking that entity. Applications must check the state before treating pose data as valid. The persistence component has a separate rule allowing its data to be returned regardless of tracking state.[16][11]
Anchoring and persistence
An anchor gives the runtime a location to track while it refines its understanding of the physical environment. Anchors are unaffected by system recentering, but independently tracked anchors can move relative to one another as their poses are corrected. The specification therefore recommends reusing one anchor for virtual objects that must retain a fixed relationship. Creating an anchor does not itself make it persistent: its normal lifetime ends with its spatial context or the destruction of its entity handle.[10]
Persistence uses UUIDs rather than context-local entity IDs. The system-managed scope gives applications read-only access to system-persisted entities. The local-anchor scope supports storage and retrieval for the same device, user and application. It does not establish a cross-device or cross-application anchor-sharing service.[11][12]
A persisted anchor also does not contain an application's complete scene. The application must retain its own association between the anchor UUID and content to reconstruct. Godot's developer documentation illustrates this by pairing an anchor UUID with an application-managed scene path.[17]
Application integration and limitations
Godot exposes built-in tracking logic for anchors, planes and markers, along with lower-level context and snapshot APIs. Its documentation distinguishes enabling a capability from the additional application logic needed to use its data, and notes that device-specific export permissions can be required.[17] Bastiaan Olij's demonstration project illustrates anchored objects, plane visualization and marker tracking. Its README identifies it as a reference implementation that is not fully tested, and marks the manual discovery examples as untested.[18]
The shared API does not impose identical sensing hardware, component availability or tracking behavior. Godot's documentation notes that plane data can come from a previous room capture or live optical detection. Applications still need to handle unavailable features, permissions and tracking changes on the selected runtime.[17][6][16]
OpenXR Spatial Containers addresses a different task: presenting application content in spaces managed by a spatial windowing system. Spatial Entities describes and tracks environmental information; the similarly named container extensions manage application presentation. Neither name makes the two extension families interchangeable.[19][1]
References
- ↑ 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 "OpenXR 1.1 specification: XR_EXT_spatial_entity". Khronos Group. https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XR_EXT_spatial_entity. Retrieved 2026-10-21.
- ↑ "OpenXR Spatial Entities Extensions Released for Developer Feedback". Khronos Group. 2025-06-10. https://www.khronos.org/blog/openxr-spatial-entities-extensions-released-for-developer-feedback. Retrieved 2026-10-21.
- ↑ "OpenXR specification changelog". Khronos Group. https://github.com/KhronosGroup/OpenXR-Docs/blob/main/CHANGELOG.Docs.md. Retrieved 2026-10-21.
- ↑ "XrSpace manual page". Khronos Group. https://registry.khronos.org/OpenXR/specs/1.1/man/html/XrSpace.html. Retrieved 2026-10-21.
- ↑ "XrSpatialEntityIdEXT manual page". Khronos Group. https://registry.khronos.org/OpenXR/specs/1.1/man/html/XrSpatialEntityIdEXT.html. Retrieved 2026-10-21.
- ↑ 6.0 6.1 6.2 "xrCreateSpatialContextAsyncEXT manual page". Khronos Group. https://registry.khronos.org/OpenXR/specs/1.1/man/html/xrCreateSpatialContextAsyncEXT.html. Retrieved 2026-10-21.
- ↑ "OpenXR 1.1 specification: XR_EXT_future". Khronos Group. https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XR_EXT_future. Retrieved 2026-10-21.
- ↑ "OpenXR 1.1 specification: XR_EXT_spatial_plane_tracking". Khronos Group. https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XR_EXT_spatial_plane_tracking. Retrieved 2026-10-21.
- ↑ "OpenXR 1.1 specification: XR_EXT_spatial_marker_tracking". Khronos Group. https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XR_EXT_spatial_marker_tracking. Retrieved 2026-10-21.
- ↑ 10.0 10.1 "OpenXR 1.1 specification: XR_EXT_spatial_anchor". Khronos Group. https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XR_EXT_spatial_anchor. Retrieved 2026-10-21.
- ↑ 11.0 11.1 11.2 "OpenXR 1.1 specification: XR_EXT_spatial_persistence". Khronos Group. https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XR_EXT_spatial_persistence. Retrieved 2026-10-21.
- ↑ 12.0 12.1 "OpenXR 1.1 specification: XR_EXT_spatial_persistence_operations". Khronos Group. https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XR_EXT_spatial_persistence_operations. Retrieved 2026-10-21.
- ↑ "XrSpatialSnapshotEXT manual page". Khronos Group. https://registry.khronos.org/OpenXR/specs/1.1/man/html/XrSpatialSnapshotEXT.html. Retrieved 2026-10-21.
- ↑ "xrCreateSpatialDiscoverySnapshotAsyncEXT manual page". Khronos Group. https://registry.khronos.org/OpenXR/specs/1.1/man/html/xrCreateSpatialDiscoverySnapshotAsyncEXT.html. Retrieved 2026-10-21.
- ↑ "xrCreateSpatialUpdateSnapshotEXT manual page". Khronos Group. https://registry.khronos.org/OpenXR/specs/1.1/man/html/xrCreateSpatialUpdateSnapshotEXT.html. Retrieved 2026-10-21.
- ↑ 16.0 16.1 "xrQuerySpatialComponentDataEXT manual page". Khronos Group. https://registry.khronos.org/OpenXR/specs/1.1/man/html/xrQuerySpatialComponentDataEXT.html. Retrieved 2026-10-21.
- ↑ 17.0 17.1 17.2 "OpenXR spatial entities". Godot Engine documentation. https://docs.godotengine.org/en/stable/tutorials/xr/openxr_spatial_entities.html. Retrieved 2026-10-21.
- ↑ "Spatial Entities Demo". Bastiaan Olij. https://github.com/BastiaanOlij/spatial-entities-demo. Retrieved 2026-10-21.
- ↑ "OpenXR 1.1 specification: XR_EXT_spatial_container". Khronos Group. https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XR_EXT_spatial_container. Retrieved 2026-10-21.