How to interact the Basic Sample scene

The following is a walk through for playing the Basic Sample scene on a compatible device. The purpose of this sample is to demonstrate a minimal AR setup with persistence. The other samples are more advanced; a good handle of this one is recommended before exploring the others. Don't worry, it's simple!

How to start the Sample App

Open 6DSDKSampleApp. The app will have the logo.

On the first launch, a pop-up will ask you to authorize usage of the phone's camera; another pop-up will also ask you to authorize usage of location data. Every application build on top of the SDK needs user consent to these two things, or the 6D SDK functions will not work properly.

warningPlease make sure that Location Settings aren't disabled under Settings > Privacy.

Open the Basic Sample scene

The scene presents itself as a camera viewport with two cloud buttons, a mesh button, and three rotating 6D logos floating in AR.

The top button cloud_upload performs an API call to Save To AR Cloud.

The bottom button cloud_download performs a call to Load From AR Cloud.

In addition, a colored tint starts spreading over objects: that's the real time world mesh.

As you use the scene and explore the real world with your phone's camera, the 6D SDK scans and maps the area. You can control when to save and load those scans with those two buttons.

When you load, a phase called relocalization allows the 6D SDK to find where it is, relative to a previously saved map of the same location. This allows the coordinate system of the AR experience to be identical between sessions and devices, allowing the persistence of objects (since 3D coordinates of virtual objects map to the same physical location) and multiplayer (since the location map can be used by multiple devices simultaneously).

Walk around your room, move your camera around. Everything that enters your field of view is getting mapped and can be pointed at later for relocalization. You can visually see the map by the colored tint of the mesh.

After a few seconds of scanning, hit the cloud_upload Save to AR Cloud button.

You can now completely close the Sample App.
Open the Sample App again and select the Basic Sample scene again.

You'll find that the logos are now floating at a different fixed arbitrary location. Immediately hit the Load from AR Cloud button cloud_download and the scene will download your previously saved map to relocalize your coordinate set.

When the prompt says "Relocalizing..." make sure that you point your camera at one of the areas you had previously scanned.

After a successful relocalization, you'll notice that the logos teleported back to their original location. This is Persistence.

The 6D logo positions also need to be saved somewhere. In this example, we are saving them to our 6D web service we allow developers to also use for rapid prototyping. Once the map relocalizes, we download the file which contains the positions of the logos, parse it, then move the logos to their respective positions.

In the background, mapping is now resuming, allowing you to save again and make subsequent relocalizations faster and more accurate.

You can also drag the 6D logos around and reposition them.

You'll notice that the logos' rotating yellow star always rests on top of the mesh as you drag them, no matter how irregular the surface is. This is real world interaction.

Use the toggle mesh button to make the mesh rendering disappear and see how the virtual objects still interact and get occluded by, or intersected with, real objects like furniture.

This is occlusion.