Creating an iOS AR App to walk around the International Space Station (ISS)

Yasuhito Nagatomo
Level Up Coding
Published in
4 min readJan 23, 2022

--

Using Augmented Reality (AR) to provide the experience of walking around a structure in an enclosed space can be accomplished with a few lines of code using the iOS SDK - ARKit and RealityKit. This article explains how to create an app that allows users to freely walk around the International Space Station (ISS).

Mechanism

A realistic scale 3D model of the ISS (a part of units) is prepared, and a virtual space is created by aligning the position of the user's device that initiates the AR experience with the corridor of the ISS model. In this way, adults and children of different heights can walk in the corridor in a natural posture, thanks to the virtual space created according to the position of the device that starts the AR experience.

The ISS is surrounded by a sphere with an image of outer space pasted on its inner surface so that it can be viewed from the ISS window. The Earth model is created by pasting an image of the Earth’s surface onto another spherical model.In the AR experience, users can freely move around in the virtual space, so that they can view space and the earth when they go out of the ISS.

Create a 3D scene

The 3D model data of the ISS is provided by NASA. The texture images of space and the earth are provided by Solar System Scope. Other equivalent images are also acceptable.

Create a 3D scene using a Digital Content Creation (DCC) tool such as Blender, adjust some of the ISS units to be realistic scale (about 30 x 30 x 12 m), and align the center of the walkway with the origin, so that the user can start the AR experience from an appropriate position.
The Earth is created by stretching the Earth’s surface texture on a sphere with a radius of about 50 m. It is placed at (0.0, 0.0, -60.0) [meters]. You will see the Earth under your feet.
Space is created by stretching the space texture on the inner surface of a sphere with a radius of about 110 m, and placing it at (0.0, 0.0, 0.0) [meter]. The ISS and the Earth will be surrounded.

Export the created 3D model and convert it to USDZ with Reality Converter. In the case of Blender, export it as glTF format and convert it to USDZ.

Create an AR iOS app

Create an AR app that provides AR experience using the 3D model you created.

  • iOS Deployment Target: 14.0
  • Xcode 13.2

Add the USDZ file to your Xcode project, use UIViewRepresentable for SwiftUI. Create an AR Anchor at the origin, load the model data from the USDZ file to create a virtual scene, and add it to the Anchor. Run the AR session to start the AR experience.

Conclusion

The Swift Code described in this article is available on GitHub, including the USDZ file, so you can try it out right away.

It would be fun to add USDZ models of the moon, sun, spaceships, etc., and add sounds and animations to make it your own AR app.

Swift Code for an AR app to view the exterior of the International Space Station from outside in real scale is also available on GitHub. If you want to try it, please refer to the page.

--

--