The following is a walk through for playing the Ball Pit Sample scene on a compatible device. The purpose of this sample is to demonstrate real time mesh generation along with object occlusion and physics interaction with the mesh.
Open 6DSDKSampleApp. The app will have the 6D 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.
Immediately after the scene starts, a colored tint starts spreading over objects: that's the real time world mesh.
Toss balls by tapping the screen anywhere. The ball will be instantiated at that position, and a force in the z direction will be added. We didn't add force customization but feel free to experiment.
You can also toggle the mesh filter_hdr to make the mesh rendering disappear to get a more lifelike feel to the pseudo-game.
This scene also supports occlusion (a real life object blocking the digital objects).
The balls also cast shadows on the surface they are on.
There is a limit of thirty balls that can be instantiated before they start getting recycled (older ones get deleted). You can up this limit through Unity. The purpose of this example is to show physics and interactions with the real world, have fun!
Starting with SDK version 0.17.0, relocalization and loading of previously saved meshes is now possible. A few notes about how this system currently works so that developers understand how to use it. We still have many improvements to come around mesh merging, and will update this page and release notes as functionality is updated.
SixDegreesSDK_LoadFromARCloud()). The app will automatically attempt to relocalize across all saved maps that exist for your current location. This process will timeout after 30 secs, but you can stop it early with
SixDegreesSDK_SaveToARCloud()) to add your newly collected mesh to the stored maps in the 6D Reality Platform. Note that map data size increases linearly with usage, making file transfer more significant when calling
SixDegreesSDK_SaveToARCloud()- essentially each map you upload is saved, and the database of all saved maps is transferred back and forth with each upload/download action.
warning During an app session, if you upload before you have downloaded or relocalized, your upload will be used to replace any existing stored maps for your location. This functionality is added to enable developers to easily clean out old saved maps during testing and will not function this way once we get to a general release candidate.