How to interact with the Drawing Sample Scene

The following is a walk through for playing the Drawing Sample scene on a compatible device.

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 Drawing Sample scene


The scene presents itself as a camera viewport with two cloud buttons and a color picker.

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.

The color picker changes the selected brush color.

Pick a color and start dragging your finger across the screen. You're now drawing in the air!

You'll notice that the line exists in 3D space at a fixed distance to your phone. To change depth, move your device closer or further.

While you're drawing, the SDK scans the area and builds a "location map" of the environment, that can be saved using the Save To AR Cloud API.

After you've drawn and scanned around a bit, hit the top button cloud_upload to save your map to the AR Cloud.
Messages at the top will appear and tell you that the map is saving

Messages will tell you when the map is successfully saved, indicating a location ID (or display errors if applicable).

In this scene, we've made the drawing data persistent by serializing the data and saving to our AR Cloud automatically when the map saves. You could easily modify this to use your own content and servers for storage.

Persistence and relocalization

The first time you run the scene, scan the area to capture as much of the environment around you as possible. Best results are obtained with SLAM friendly textures.

From that point, you can exit the Sample App and open it again, or open it from a different device.

Then you can hit the Load from AR Cloud button cloud_download to download the previously saved location.

Once the location data is downloaded, relocalization is attempted continuously, until the system successfully recognizes where it is in the saved location map data's coordinate system.

After a successful relocalization, the app will download the location's saved drawing data and render it where it was painted. This is persistence.


Additionally, when two devices relocalize against the same scene and share the same wifi network, they communicate their location to each other & drawing info.

This is symbolized by a movie camera floating in real time at the location of the device. The color of that camera reflects the selected brush color of that player.

The distance between the physical device and the floating camera will vary somewhat and is indicative of the precision of that device's last successful relocalization attempt. If it's off significantly, click the Load from AR Cloud button again on the remote device and it will attempt to relocalize again.