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).

Geospatial Browser Private Scans

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.

../../_images/portal_download_mesh_2.4.png

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.

../../_images/fbx_baked_axis.png

Use the following steps to restore the origin anchor when running on the device.

  1. Open the .b64 file in a text editor and copy the anchor string to your clipboard.

  2. 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);
    
  3. 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.

  4. 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 a WayspotAnchorTracker 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 using WayspotAnchorTracker.