Can ARKit 2 Track Multiple 3D Objects in iOS 12?

This article examines whether Apple's ARKit 2 framework in iOS 12 supports the simultaneous tracking of multiple 3D reference objects. It breaks down the technical distinction between object detection and continuous dynamic tracking, explains how the ARWorldTrackingConfiguration handles reference objects, and outlines the system limitations developers encounter when working with 3D anchors.

Detection vs. Dynamic Tracking

To answer the question accurately, it is essential to distinguish between detection and continuous tracking:

  • Static Detection (Supported): ARKit 2 can detect multiple 3D reference objects (ARReferenceObject) within the same session. Once detected, ARKit places an ARObjectAnchor in the coordinate space to mark the object's position and orientation.
  • Continuous Dynamic Tracking (Not Supported): ARKit 2 does not dynamically track moving 3D objects in real time. The framework operates under the assumption that recognized 3D objects remain stationary in the physical environment. If a detected physical object moves, its corresponding ARObjectAnchor remains fixed at the original world coordinates and does not follow the object.

How ARKit 2 Handles Multiple Reference Objects

Developers can pass a set of reference objects to the active session using the detectionObjects property on ARWorldTrackingConfiguration:

guard let referenceObjects = ARReferenceObject.referenceObjects(inGroupNamed: "AR Objects", bundle: nil) else { return }
let configuration = ARWorldTrackingConfiguration()
configuration.detectionObjects = referenceObjects
sceneView.session.run(configuration)

When configured this way:

  1. Simultaneous Recognition: ARKit 2 searches the environment for any of the objects provided in the detectionObjects set. If several distinct reference objects appear in the camera's field of view, the system can identify them and add separate ARObjectAnchor instances to the scene.
  2. Anchor Management: Once an anchor is added, ARKit’s world tracking system maintains the anchor’s position relative to the surrounding environment, not the physical object itself.
  3. Identical Instances: ARKit 2 struggles to reliably differentiate between multiple identical copies of the same 3D reference object placed near one another, often leading to ambiguous or overlapping anchors.

Performance Limitations

While you can include multiple 3D objects in your reference set, resource constraints exist:

  • Processing Overhead: Searching for 3D feature point clouds is significantly more computationally demanding than 2D image detection.
  • Recommended Set Size: Apple advises keeping the number of active reference objects limited (typically to a small collection of distinct objects) to preserve a stable 60 frames per second and prevent thermal throttling on iOS 12 devices.

Summary

ARKit 2 in iOS 12 can concurrently detect multiple different static 3D reference objects and map their initial locations in the AR scene. However, it cannot continuously track multiple moving 3D objects in real time.