Reality Composer (RC) for iOS, iPadOS, and macOS makes it easy to build, test, tune, and simulate AR experiences for iPhone or iPad. With live linking, you can rapidly move between Mac and iPhone or Mac and iPad to create stunning AR experiences, then export them to AR Quick Look or integrate them into apps with Xcode. This tutorial will introduce the basic functionality of the app and review the interface.
Please note that screenshots for this introduction were created using Reality Composer on a MacBook. The screen layout is slightly different when working directly on an iPad, but the steps are the same.
Reality Composer is free to download from the app store for iPad or iPhone, or downloaded as part of the free XCode for Mac iOS (Apple Account Required). Be aware that XCode is quite a larger program for developing applications, so may not be feasible for older MacBooks or those without much storage space. Running Reality Composer on a MacBook also requires you to send your project to an appropriate iPad/iPhone for testing (see below) or open it in an emulator using xCode.
Note that Reality Composer projects (i.e. what opens in Reality Composer) are saved as .rcprojects while sharable experiences that open directly onto an iPhone or iPad with the Quick Look tool are .reality files.
When you first open up a new Reality Composer project, your first decision to make is what kind of anchor you want for the project. The Anchor type will determine what requirements are needed to open your scene in AR.
There are 5 realtively-straightforward anchor types to chose from in Reality Composer:
Horizontal: will look for any horizontal surface (e.g. a table or the floor) to open your experience on
Vertical: will look for any vertical surface (e.g. a wall) to open your experience
Image: will look for a specific defined image that you determine (e.g. a painting or business card) to open your experience around
Face: will look for a person's face (as recognized by Apple's camera) to open your experience around
Object: will look for a previously scanned physical object (see details at the end of this workshop) to open your experience around
Once you have chosen an anchor, the main window of Reality Composer will open, which changes slightly based on the anchor type you have chosen (pictured above is the horizontal anchor view ). You can also change your anchor in the right window Properties pane (as well as change the overall physics of the scene, e.g. to allow things to fall through the floor. This can also be set object-by-object later).
The window opens with two objects already present: a cube and a little placard showing some text. Before checking those out, take moment to familiarize ourselves with the other options on the main toolbar. The most important ones for us will be the Add, the Behaviors, and the Properties buttons, but we can quickly review them all.
The Scenes option opens up a sidebar that allows you to name the "scene," or AR view, you are currently working in, as well as create new scenes that can be linked by certain actions (see below).
The Frame button just lets you navigate more easily around your scene by allowing you to zoom in on certain objects or on the scene as a whole.
The Snap tool will snap objects to other objects or to certain horizontal/vertical lines within the scene (similar to the Photoshop snap tool).
The Modify tool allows you to swap between adjusting an object's position/rotation and adjusting its length/width/size (this can also be done in the properties pane, as we will see).
The Space button swaps between "global" and "object-oriented" coordinates, allowing you to move an object along various axes within your scene.
The Add button adds more models to your scene, of lots of different types.
The Play button (also AR button when working on an iPad/iPhone) allows you to test our your scene on a device.
The Send to button (Mac only) allows you to send your scene directly to a linked iPad for testing.
The Info button checks for updates to your models/scenes.
The Behavior button allows you to assign different behaviors to your object based on specific prompts (e..g. if the object is tapped, it flies in the air).
The Properties button allows you to edit the properties of a specific model or of the scene as a whole.
Exploring and playing around with objects is a good way to learn, starting with what comes in our default scene.
Clicking on the cube will automatically open the Properties pane, allowing you to directly edit its various properties like width, height, color, etc. You can also name the object, transform it in space (if you have exact specs you want), and decide if it will obey the laws of physics (e.g. fall to the surface if it appears up in the air). You can also edit directly in the viewing window once an object is selected: arrows pointing along axes allow you to move an object, while clicking the tip of an arrow will allow you to rotate an object around that axis. Give it a try!
Clicking on the placard will open a similar pane, though this one also allows you to edit the text appearing on the sign. Each object you add will have its own individual properties that you can edit.
If you want to add a new object, just click the + Add button. You have the option of many pre-installed 3D objects to work with, as well as signs that can hold text and "frames" which can hold attached images. You can also introduce your own objects by following our tutorial on the subject.
I can drop a plane into our scene by clicking and dragging it or by double clicking.
You can make your scenes dynamic with actions and reactions by adding behaviors to your objects. I'm going to select the plane, and then click the Behaviors button on the toolbar, and a new pane will open up along the bottom of the page
Clicking the + button will open the new behavior pane, where there are several pre-set behaviors you can choose from; if you scroll down to the bottom, you can create a custom behavior. For now, I will choose Tap and Add Force so we can give our plane some movement.
The behavior pane has its first behavior! You can rename the behavior (currently called Behavior) in the left pane; the Trigger pane allows you to determine what action will make the behavior start (in this case, tapping), as well as which affected objects have the trigger attached (in this case, the plane, but you could add more).
Finally, the action sequence allows you to create a series of effects that happen, either simultaneously or one after another, when the behavior is triggered. In this case, we are going to have the plan start moving forward at a certain velocity
Our plane will move forward along one axis when triggered, but that's not really taking off. Adding a second force in an upward trajectory after a moment will make this takeoff look a bit more realistic. To add further actions to the sequence, simply tap the + button next to the words Action Sequence in the Behaviors window. This will then pop up different pre-coded behaviors you can choose from.
In the image above, I added two new behaviors, a Wait Behavior and a second Add Force behavior in a 45 degree upward angle. Importantly, I directly attached the Wait behavior to the first Add Force behavior (with a drag and drop) which means that these two actions will begin simultaneously, and the second Add Force will not start until the first set is complete. This means our plane will move forward a certain amount before briefly "taking off".
Now that we have an experience, we need to test it out to see if it functions correctly. There are a few ways to do this:
If you are working on an iPad or iPhone, it's easy. Just tap the AR button on the top toolbar to open the experience in AR, and then the Play button to start the experience from the beginning.
If you are working on a Mac, it's a bit more difficult. On the one hand, if you hit the Play button on the top toolbar, the experience will start, but will obviously not be in AR, making testing a little bit difficult (though you could still test the functionality in the building screen, as pictured below).
There are other options for testing from a Mac, however. If you have an iPhone or iPad handy that has Reality Composer installed, you could connect it via a USB/USB-C cable to your computer. If you then open Reality Composer on both devices and hit the Send To button on your Mac, the file will open in Reality Composer and be editable/testable on your iPad!
Note that if you are using specially imported models, they may not be available on your second device, unless they have been imported there as well.
Another option is to export the file and share it as a .reality file. To do this, go to File --> Export, and pick either to export the entire project or just the current scene. After saving it on your computer, you can navigate to that folder, select the .reality file, again go to File --> Share in the Finder menu, and choose how you want to share the file (text, AirDrop, etc) to your iPad or iPhone. Opening it on your iPhone or iPad in this way does not require Reality Composer, as it is using the built-in Apple Quick Look platform (you can also share your experience with other people in this way!).
We are going to add one last behavior that will make our action "replayable": returning the plane to its original location after a certain amount of time. Otherwise, once we tap the plane the first time, it's gone.
This can be done by adding one more action to our action sequence, a Move, Rotate, Scale To action that will move our object back home. Adding this action to the end of our action list, and then selecting the plane as our affected object, will allow you to choose where you want the plane to return to. In this case, I will adjust it so it ends up back where it started (by moving the plane in the image back to the left to the starting place). Also note that I added one more Wait action so that the plane will wait one second after it stops being impacted by the force to return home.
And that's it! Now the plane will return to its original location. Project testing videos and the files created with this tutorial can be found below. There is obviously a ton of other behaviors and models to play with, so give it a try!
As a bonus, you could use the Hide and Show behaviors to make the plane seem to magically "appear" back in its home location at a certain moment. See if you can make it work!