Search code examples
augmented-realityarkitvirtual-realityrealitykit

Do I need anchors to create an ARKit / RealityKit app?


The ARKit and RealityKit tutorials I have found all deal with anchors. However, there are VR apps that do not place any objects on surfaces. Instead, they just take the location and orientation of the device to display objects that are far away from the phone:

  • Star Chart shows stars, planets and the sun at their apparent location.
  • Peakfinder shows the mountains which are currently visible.

Both these apps do not need any real-world anchors. They just take the camera's location and orientation, and then render a model.

Can I create a similar app with ARKit or RealityKit, or is this a use case beyond these two frameworks?


Solution

  • It depends on what you need – AR or VR app. Generally speaking, you definitely need anchors for AR app, and don't need or do need anchors for VR (RealityKit supports anchoring from scratch, but SceneKit doesn't support anchoring).

    If you need a comprehensive info about ARKit and RealityKit anchors – read this post.

    Using RealityKit framework you can easily create both VR and AR apps (like games, visualisations and scientific apps). In case you place a 3D models in VR scene you tether these models (like mentioned distant stars, or mountains) with AnchorEntity(.world) anchors. In case you place 3D models in AR scene you tether a model with any of the following anchors' types: .world, .image, .face, .plane, .body, etc.

    Using pure SceneKit framework you can create just VR apps. SceneKit doesn't have any anchors under its hood. But if you're using SceneKit with ARKit you have to create AR apps with all the corresponding anchors that ARKit has. This post will tell you about RealityKit/SceneKit differences. In addition to the above I should say that ARKit can't render VR and AR scenes, ARKit's divine purpose is world tracking and scene understanding.