Spatial anchor
A spatial anchor is a persistent reference point that fixes virtual content to a position and orientation in the physical world, so the content stays in place as the user moves, across separate sessions, and in many systems across multiple devices. It is a core building block of augmented reality and mixed reality, where digital objects have to appear locked to real surfaces and locations rather than drifting as the device's understanding of the room is refined.
Every frame, an AR system updates its estimate of the device's pose and of the surrounding environment. Without anchoring, a virtual object placed at fixed world coordinates would visibly slide once that estimate changed. An anchor instead holds a pose relative to the tracked environment, and the system continually corrects the anchor (and any content attached to it) as its mapping improves, which is what keeps the content visually pinned in place.[1][2]
Most of the major AR and MR platforms expose a spatial-anchor concept, including Apple's ARKit (the Template:Code class), Google's ARCore (local, cloud, and geospatial anchors), and Meta's Spatial Anchors on Meta Quest headsets. Microsoft also operated a cloud anchor service, Azure Spatial Anchors, which it retired on 20 November 2024.[3][1][2][4]
How it works
A spatial anchor stores a pose, that is a position and an orientation, expressed relative to the AR system's running map of the environment. In ARKit, an Template:Code carries a 4x4 transform matrix that encodes both the position and the orientation of a real-world location, and developers attach virtual content to the anchor rather than placing it at raw world coordinates. Apple's guidance is to add content through anchors precisely because doing so tells the tracker which locations matter, letting it concentrate accuracy there.[3]
The reason anchoring is necessary is that an AR session's notion of "where things are" is not fixed. Systems built on SLAM (Simultaneous Localization and Mapping) continuously refine both the device's trajectory and the geometry of the surroundings as more of the scene is observed. ARCore's documentation frames an anchor as a pose that the runtime keeps adjusting so that objects "appear to stay in place" despite these updates to the environment understanding; several objects can share one anchor and then move together when that anchor's pose is corrected.[1] Meta describes a spatial anchor in the same terms, as a "world-locked frame of reference" that gives a position and orientation to a virtual object in the real world.[2]
Because an anchor is tied to a feature-based map of a specific place, recovering it later requires the device to recognize that place again, a process called relocalization. Cloud-backed anchor systems store visual feature data for the area around the anchor alongside the pose; a device resolves the anchor by matching what its camera sees against that stored data to recover the original coordinate frame.[5][6]
Persistence and sharing
Two capabilities are usually built on top of anchors: persistence, where content reappears in the same physical spot across separate runs of an app, and sharing (colocation), where several devices in the same space align to one common reference so each user sees the content in the same real-world position.[5][7]
Persistence can be handled on the device or in the cloud. ARKit serializes the session's map and its anchors into an Template:Code, which can be saved to disk and reloaded to restore content from an earlier session, or transferred to another nearby device for a shared experience.[3][8] Cloud approaches instead upload the anchor and its environment data to a server and hand back an identifier, so any device with that identifier (and a view of the same place) can resolve the anchor; Google's documentation notes that both Android and iOS users can join the same Cloud Anchor experience.[6]
Platform implementations
| Platform | Anchor mechanism | Persistence / sharing | Notes |
|---|---|---|---|
| ARKit (Apple) | Template:Code; world map via Template:Code | Local persistence by saving and reloading the world map; sharing by transferring a world map between devices | Anchors are recommended over fixed world coordinates so the tracker optimizes accuracy near them[3][8] |
| ARCore (Google) | Local anchors, Cloud Anchors, and Geospatial Anchors | Persistent Cloud Anchors are resolvable from 1 to 365 days after creation; cross-platform across Android and iOS | Geospatial Anchors place content by latitude, longitude, and altitude using Google's Visual Positioning System[1][6][9][10] |
| Meta Spatial Anchors (Meta Quest) | Spatial Anchors; Shared Spatial Anchors | On-device persistence across sessions; Shared Spatial Anchors save anchor and point-cloud data to Meta servers for colocated multiplayer | Introduced experimentally in the v35 SDK (December 2021); Shared Spatial Anchors launched December 2022[2][11][7] |
| Azure Spatial Anchors (Microsoft) | Cloud-stored anchors across HoloLens, iOS, and Android | Cross-device sharing and persistence via a cloud service | Announced February 2019; retired 20 November 2024[12][4] |
Apple ARKit
In ARKit, the Template:Code class represents a real-world position and orientation that can be used for placing objects in an AR scene. A user-created anchor marks a location of interest, and ARKit then optimizes world-tracking accuracy around it so attached virtual objects appear to hold their place. Anchors are stored as part of an Template:Code, which captures the state of a world-tracking session; saving a world map archives all of its anchors, and running a new session from that saved map restores them, allowing content from a previous session to be brought back.[3][8]
Google ARCore
ARCore distinguishes three anchor types. Local anchors live only within a single app session and require the user to be physically present where the anchor was placed. Cloud Anchors are hosted on Google's servers and can be shared between app instances and across Android and iOS, enabling multi-user and persistent experiences. Geospatial Anchors are defined by geodetic latitude, longitude, and altitude together with Google's Visual Positioning System (VPS), which lets content be placed at real-world locations without the author being on site.[1] Cloud Anchors were introduced in 2018 for shared sessions, and persistent Cloud Anchors followed in 2020 with ARCore 1.20, which made the capability available to Android, iOS, and Unity developers; persistent Cloud Anchors can be configured to resolve for a period ranging from one day to 365 days after creation, where before ARCore 1.20 a Cloud Anchor could only be resolved for up to 24 hours.[10][9][13]
Meta Quest
Meta introduced Spatial Anchors for Meta Quest headsets as an experimental feature in the v35 SDK on 7 December 2021, available first to OpenXR and Unity developers. Meta defines them as world-locked frames of reference that let an app place virtual content in a physical space and have it persist across sessions, so the content reappears in the same real spot the next time the user returns.[11][2] Shared Spatial Anchors, an extension that lets an anchor created by one user be shared with others in the same room, launched on 15 December 2022, initially on Meta Quest Pro; a February 2023 update extended support to Meta Quest 2 and PC Link. The shared flow saves the anchor and its point-cloud data to Meta's servers, grants other users access, and lets their headsets download and locate the anchor's 6DoF pose, giving colocated users a common frame of reference for the same virtual content.[7]
Microsoft Azure Spatial Anchors
Azure Spatial Anchors was a Microsoft cloud service for mixed reality that gave applications a common coordinate frame so virtual content could persist and be shared across Microsoft HoloLens, iOS devices running ARKit, and Android devices running ARCore. Microsoft announced it in February 2019 as a collaborative, cross-platform service for placing and recalling points of interest across those device families.[12] Microsoft later set the service to retire on 20 November 2024, advising existing subscribers to stop using it and delete their accounts by that date, and did not publicly name a direct replacement service.[4][14]
Relationship to spatial mapping
Spatial anchors are distinct from, but depend on, spatial mapping, the process by which a headset builds a 3D model of the surrounding surfaces. Mapping (and the underlying SLAM tracking) produces the environment representation that an anchor's pose is expressed against and that a device matches when relocalizing to recover an anchor. An anchor is a single fixed point of reference within that map, whereas spatial mapping is the broader reconstruction of room geometry used for placement, physics, and occlusion. Where mapping recovers the shape of a space, anchoring keeps specific content pinned to a chosen spot within it.[1][5]
Uses
Spatial anchors are used wherever AR content must stay tied to a real location. Persistent single-user cases include leaving a virtual note, screen, or 3D model on a wall or desk and finding it in the same place on the next launch, an example Meta gives for its anchors.[11] Shared anchors support colocated multiplayer and collaboration, where several people in one room see and interact with the same virtual objects from their own viewpoints.[7] Cloud and geospatial anchors extend this to public spaces and outdoor environments, supporting location-based AR such as content placed at a landmark or navigation cues anchored to streets, with multiple visitors able to discover the same content over time.[6][13]
References
- ↑ 1.0 1.1 1.2 1.3 1.4 1.5 "Working with anchors". https://developers.google.com/ar/develop/anchors.
- ↑ 2.0 2.1 2.2 2.3 2.4 "Spatial Anchors Overview". https://developers.meta.com/horizon/documentation/unity/unity-spatial-anchors-overview/.
- ↑ 3.0 3.1 3.2 3.3 3.4 "ARAnchor". https://developer.apple.com/documentation/arkit/aranchor.
- ↑ 4.0 4.1 4.2 "Azure Spatial Anchors retirement, recommended replacement?". 2024. https://learn.microsoft.com/en-us/answers/questions/1433376/azure-spatial-anchors-retirement-recommended-repla.
- ↑ 5.0 5.1 5.2 "What Are Spatial Anchors and Why They Matter". https://www.qualium-systems.com/blog/what-are-spatial-anchors-and-why-they-matter/.
- ↑ 6.0 6.1 6.2 6.3 "Cloud Anchors allow different users to share AR experiences". https://developers.google.com/ar/develop/cloud-anchors.
- ↑ 8.0 8.1 8.2 "ARWorldMap". https://developer.apple.com/documentation/arkit/arworldmap.
- ↑ 9.0 9.1 "Cloud Anchors developer guide for Android". https://developers.google.com/ar/develop/java/cloud-anchors/developer-guide.
- ↑ 10.0 10.1 "Improving shared AR experiences with Cloud Anchors in ARCore 1.20". 2020-10-06. https://developers.googleblog.com/2020/10/improving-shared-ar-experiences-with.html.
- ↑ 11.0 11.1 11.2 "Presence Platform Spatial Anchors Experimental and Voice SDK Now Available". 2021-12-07. https://developers.meta.com/horizon/blog/presence-platform-spatial-anchors-experimental-and-voice-sdk-now-available/.
- ↑ 12.0 12.1 "Announcing Azure Spatial Anchors for collaborative, cross-platform mixed reality apps". 2019-02. https://azure.microsoft.com/en-us/blog/announcing-azure-spatial-anchors-for-collaborative-cross-platform-mixed-reality-apps/.
- ↑ 13.0 13.1 "Google launches persistent Cloud Anchors for creating AR layers over the real world". 2020-10-06. https://9to5google.com/2020/10/06/google-persistent-cloud-anchors/.
- ↑ "Microsoft is set to retire Azure Spatial Anchors". 2023. https://mixed-news.com/en/microsoft-is-set-to-retire-azure-spatial-anchors/.