Now that you know all about AR Quick Look, it’s time to dip your toes a little deeper into the shallow end of Augmented Reality (AR). In this chapter, you’ll learn about Reality Composer and Reality Files.
Until recently, creating immersive AR experiences was a somewhat difficult task. AR developers required a vast amount of skill, as well as knowledge of a wide variety of technologies, just to make a little cube appear in AR. That all changed when Apple announced Reality Composer.
What is Reality Composer?
Reality Composer is an AR authoring tool that lets you create interactive AR-based experiences with an intuitive WYSIWYG (What You See Is What You Get) design. It’s self-explanatory and super easy to use. You don’t need any prior coding or 3D development experience to use it.
Any AR Quick Look-compatible app, including iMessage, Safari, Files and even apps you build yourself, can then view the AR experiences you create.
Reality Composer is fully integrated into Xcode, which allows you to easily extend and customize your app’s AR experiences with the power of Xcode and Swift.
If you’re using an iPhone or iPad, you can download and install Reality Composer directly from the App Store using this link: https://apple.co/2RfDvt3
Reality Composer on an iPhone:
Although the interface is extremely compact, the app itself is fully functional, keeping you productive while you’re on the go. The best part of using an iPhone is that it allows you to edit your 3D scenes directly in AR space. You experience the end result first hand – no more playing in the dark!
Reality Composer on an iPad:
The iPad’s interface is similar to the iPhone’s interface, but with a little more breathing room.
There’s also a macOS version that installs automatically with the latest versions of Xcode.
Reality Composer on macOS:
You’ll notice subtle interface differences between the iPhone, iPad and macOS versions, but rest assured that the underlying functionality is exactly the same. However, the macOS version doesn’t allow editing in AR space, mainly due to the lack of a rear-facing camera on most Macs.
Overall, Apple did a fantastic job at delivering an experience across multiple platforms that is consistent and pleasant.
Note: At the time of writing, you can only install Reality Composer for macOS through Xcode. There’s no App Store version available for download yet.
Reality Composer features
Out of the box, Reality Composer is quite impressive and includes the following features:
Reality Composer’s limitations
Reality Composer is not perfect, and there are some limitations you need to understand before you make it your first choice for creating AR experiences. Here are a few important things to keep in mind:
Creating Reality Composer projects
With the basics out of the way, it’s time to get those hands dirty and create your first AR experience with Reality Composer. To create a new project, all you need to do is start Reality Composer.
Exploring the UI
With the HelloRealityKit project open, you’re ready to explore the User Interface (UI).
Your project can contain more than one scene. Adding a new scene is as easy as clicking the + button in the top-right corner of the Scenes panel on the left. You could also use the Main menu by going to Scene ▸ Add Scene….
To navigate around the scene, you can manipulate the view in three ways: Zoom, Pan and Rotate.
An empty scene isn’t that exciting, so your next step is to spruce things up a bit by adding some objects to it.
Adjusting object transforms
With the 3D cube still selected, adjust its transform, which consists of three components: position, rotation and scale.
Adjusting object properties
With the cube still selected, open the Properties panel by clicking the Properties button in the toolbar.
Adjusting parametric properties
The cube you’ve added to the scene is a special object known as a parametric-shaped object. This means you can change the look of the object by adjusting its parameters.
Reality Composer comes with an easy-to-use but powerful built-in physics simulator. Adding basic animation to your virtual objects elevates the believability of any AR scene.
There are two options for Motion Type, which determines how the object will participate in the physics simulation:
Your next step is to set up the Physics Material of the object. Reality Composer provides a few pre-configured material types.
Physics Collision Shape
Up next is setting the object’s Physics Collision Shape, which defines a rough shape for the object using the least amount of geometry possible. This reduces the overhead the physics engine has to deal with when computing collisions between multiple objects.
Reality Composer has the ability to play the AR scene so that you can test it to find and debug any possible issues.
What are Reality files?
Reality Files contain an AR experience created with Reality Composer. They’re archives that contain all of the required graphics, animations, textures and sounds that the AR scene requires. You can share the file and play it back on any app that supports AR Quick Look.
Exporting and sharing Reality files
To share your AR experience, you first have to export it.
Congratulations! You’ve reached the end of this chapter. Consider yourself now one full toe deep into the fantastic world of augmented reality. :]