Managing Private Scans
Private scans are a single mesh, available only to your developer account, to develop and test VPS experiences. While private scans are a great solution for developing and testing VPS experiences while a public wayspot is being nominated or activated, they are not authorized for use in published projects.
Private scans are created using the Niantic Wayfarer app. Ensure you’re logged in to Wayfarer using your Lightship credentials. For more information about using the Wayfarer app, see the Niantic Wayfarer App documentation.
In the Wayfarer app, select Scan and take a scan of the area. Private scans should be 60 seconds or less; a new mesh is generated every 60 seconds – so scanning for 120 seconds will result in 2 private scans. All private scans are unaligned.
Once processed, you can preview the mesh and add it to your project from the Geospatial Browser Private Scans tab (located in the Wayspot Anchors section at the bottom).
If your private scan fails processing, you may need to rescan. Reach out to support@lightship.dev
for more information.
Downloading Meshes
You can download a mesh for your Private VPS Location that you can use for development purposes in your Unity project.
Meshes are only available for successfully Processed Private VPS Locations. To download a mesh, click the download arrow in the Private VPS Location row.
When you download a mesh, you’ll get a zipfile that contains mesh data in FBX format, and a .b64
file that contains the origin anchor for the mesh. You can use this file for previewing anchored content in Unity and it can be used with the VPS Authoring Assistant. See How to add a downloaded mesh to your Unity project for more information.
Note
If you intend to use the VPS Authoring Assistant in Unity, there is no need to unzip the file.
Note
The origin anchor is generated each time you download the private mesh zipfile, however previously downloaded anchors for the same mesh are still valid and can still be used as long as the private scan is still valid.
When placing your virtual content in Unity, you can import the zip file to help you position your virtual content relative to the mesh. When running on your device, you’ll localize to your Private VPS Location, restore the origin anchor, and position your virtual content relative to the origin anchor.
Note
When importing the FBX mesh in Unity, check Bake Axis Conversion in the Model section of the import settings in the Unity inspector. Baking the transform into the mesh ensures the mesh transform won’t get overwritten on the GameObject when the anchor position is updated.
Use the following steps to restore the origin anchor when running on the device.
Open the
.b64
file in a text editor and copy the anchor string to your clipboard.In your scene script, first deserialize the anchor string into a Wayspot Anchor payload.
using Niantic.ARDK.AR.WayspotAnchors; payload = WayspotAnchorPayload.Deserialize(your_origin_anchor_b64String);
Treat the deserialized payload as an existing
WayspotAnchorPayload
and use it to restore the Wayspot Anchor. See Using the Wayspot Anchor API and the WayspotAnchors example scene in ARDK-examples for more details.Once the anchor has been successfully restored, you can use the anchor position and orientation to place a
GameObject
that tracks the anchor’s position via aWayspotAnchorTracker
component, and add your virtual content as child GameObjects with positions relative to the origin anchor. When the origin anchor gets position updates, update your GameObjects as needed. See Handle Anchor Tracking Updates for more details on usingWayspotAnchorTracker
.