Plane detection is the capability of an augmented or mixed reality system to identify flat surfaces in the physical environment, such as floors, tabletops, walls and ceilings, and to report each one as a plane with a position, orientation and boundary. In XR development, it is one of the basic building blocks that lets an application place virtual content on real surfaces so that it appears to rest on them.
Plane detection is exposed by platform frameworks including ARKit, ARCore and OpenXR extensions, and cross-platform layers such as AR Foundation wrap it in a common API. Developers rarely implement the underlying algorithms; instead, they configure detection, subscribe to plane updates and use the results for placement, physics and occlusion.
How plane detection finds surfaces
Plane detection works by fitting geometric planes to 3D points that the tracking system reconstructs from camera images or depth sensors. As the device moves, visual-inertial odometry triangulates distinctive image features into a sparse point cloud, and the plane estimator searches that cloud for clusters of points that lie on a common flat surface.
A common approach uses RANSAC-style plane fitting: the algorithm repeatedly selects small groups of points, proposes a plane, and keeps the proposal supported by the most points within a distance tolerance. Gravity from the inertial measurement unit helps classify planes as horizontal or vertical and stabilizes their orientation.
Devices with depth sensors such as LiDAR or time-of-flight cameras produce dense depth data, which makes detection faster and more reliable on surfaces with little visual texture. The table below compares the main input sources.
| Input source | How planes are found | Strength | Weakness |
|---|---|---|---|
| Monocular camera with IMU | Feature points from motion | Works on almost any phone | Struggles with blank surfaces |
| LiDAR or time-of-flight | Dense depth measurements | Fast, works on low texture | Extra hardware and power |
| Stereo cameras | Disparity between two views | Good depth without lasers | Needs calibration and light |
| Prebuilt room scan | Surfaces from a saved scene model | Instant, stable results | Requires a setup step |
Plane properties and lifecycle
Each detected plane is represented as a trackable object with a pose, extent and boundary polygon. The pose gives the center and orientation, the extent gives an approximate rectangle, and the boundary polygon traces the irregular outline of the area actually observed.
| Property | Meaning | Typical use |
|---|---|---|
| Alignment | Horizontal up, horizontal down or vertical | Filtering floors from walls |
| Pose | Center position and orientation | Placing and orienting content |
| Boundary polygon | Outline of the observed surface | Keeping objects within bounds |
| Classification | Label such as floor, table, wall or seat | Context-aware placement |
| Tracking state | Tracking, limited or paused | Hiding content when unreliable |
Planes have a dynamic lifecycle. They are added when first detected, updated as the system sees more of the surface, and often merged when two partial planes turn out to belong to the same tabletop. One plane can also be subsumed by another, so applications must handle removal events gracefully instead of assuming a plane persists forever.
Plane detection compared with related scene features
Plane detection is the simplest form of environment understanding, and modern platforms offer richer alternatives. Choosing among them depends on how much geometric detail the application needs and which devices it must support.
| Feature | What it provides | Best suited for |
|---|---|---|
| Plane detection | Flat surfaces with outlines | Placing objects on floors and tables |
| Scene understanding | Labeled rooms, furniture, meshes | Rich mixed reality interaction |
| Meshing | Triangle mesh of all geometry | Physics and occlusion on uneven shapes |
| Depth API | Per-pixel depth images | Realistic occlusion of virtual objects |
| Spatial anchor | A fixed pose kept over time | Persisting content at one location |
Plane detection and spatial anchors often work together: the plane tells the application where a surface is, and an anchor created at the hit point keeps the placed content stable as the tracking map is refined.
Using plane detection in applications
The typical pattern is tap-to-place via a raycast: the application casts a ray from the screen point or controller into the scene, intersects it with detected planes, and places content at the hit pose. Several practices make this pattern robust.
- Enable only the alignments you need, for example horizontal planes for a furniture app, to save processing and reduce clutter.
- Guide the user to scan, with an onboarding animation asking them to move the device slowly over the surface for a few seconds.
- Visualize planes subtly during placement and hide them afterward, so the overlay does not distract from content.
- Attach content to an anchor rather than to the plane itself, since plane poses shift as the estimate improves.
- Check the boundary polygon before placing large objects so they do not hang over the edge of a table.
On headsets, many runtimes supply planes from a room setup or scene model rather than from live detection, so a mixed reality app can know walls and tables immediately. Web developers can access similar data in some browsers through the WebXR plane detection module, although support remains uneven across browsers.
Limitations and common problems
Plane detection depends heavily on lighting, texture and motion, and its failures are predictable. Experienced developers design onboarding and fallbacks around these known weaknesses.
| Problem | Cause | Remedy |
|---|---|---|
| No planes found | Blank, glossy or dark surfaces | Improve lighting, use depth hardware |
| Planes drift or jump | Early estimate refined over time | Use anchors, wait for stable tracking |
| Floor height wrong | Partial view of the floor | Ask users to scan a wider area |
| Glass tables missed | Transparent surfaces lack features | Offer manual height placement |
Plane detection also has a privacy dimension, because surface layouts reveal room dimensions and furniture placement. Platforms therefore often require user permission before an application can access plane or scene data.
In everyday language
Plane detection is how an AR app figures out where the flat surfaces are around you. When you point a phone or wear a headset, the device looks at the room and notices the floor, the top of your table and the walls.
Once it knows those surfaces, the app can set a virtual lamp on your real desk or hang a virtual picture on your real wall, and it stays there as you walk around. Without it, virtual objects would just float in the air.
Seen in the real world
A home furnishing retailer builds a mobile AR app that lets customers preview a sofa in their living room. The app enables horizontal plane detection only, shows an animated prompt asking the user to sweep the phone across the floor, and displays a faint grid once the floor plane appears, usually within two to five seconds on devices with LiDAR.
The customer taps the grid, the app raycasts to the floor plane, creates an anchor at the hit point and places a true-scale sofa model there. Because the app also checks vertical planes once the sofa is placed, it warns when the model intersects a wall. As a result, customers can judge fit and proportion directly in their own room, and the retailer sees fewer returns caused by wrong sizing.