Using Multiple Maps

Overview

You can localize to multiple maps at once. Our SDK maintains very good performance even with multiple maps, but for a large number of maps, it's a good idea to load only maps the maps that are nearby and necessary for localization.

It's often better to divide large locations into multiple smaller maps than trying to map everything in one big map. The smaller maps are easier to create, faster to construct, and allow for more flexible map updates later on.

Immersal Cloud Service and SDK allow you to use multiple maps in a variety of ways. You can

  • Keep them separate, align them in Unity with standard transform tools, and embed them in the AR application

  • Keep them separate, align them in Unity with standard transform tools, and save the alignment metadata to the Cloud Service if you need to load the maps at runtime

  • Automatically align the maps and update the alignment metadata in the Cloud Service. This requires the maps have visual overlap

  • Automatically stitch and merge the maps into one big map in the Cloud Service. This requires the maps have visual overlap

Manual Alignment in Unity

You can use the standard transform tools in Unity to

  • Move the maps

  • Rotate the maps

  • Scale the maps (only uniform scale supported)

You can then use the maps as is by building the application and simply embedding the map data in the build. This happens by default if maps are in the scene.

Five separate maps aligned manually in Unity to cover a large area

Saving and Loading the Alignment Metadata with Unity

You can also Save and Load the alignment as map metadata on the Cloud Service. This allows you to load the different maps and their relative transforms at runtime.

You can preview the map alignment metadata in the ARMap component directly.

  • Load Alignment loads the alignment from the map metadata on the Cloud Service

  • Save Alignment saves the alignment to map metadata on the Cloud Service

  • Reset Alignment reloads the originally captured alignment from map metadata on the Cloud Service

The default captured alignment is in global ECEF coordinates with very large values. These are not useful as is inside Unity but you can overwrite the alignment however you want to.

The metadata is stored in a right-handed coordinate system on the Cloud Service. Conversion to Unity's left-handed coordinate system is done on Loading/Saving.

The ARMap component has functions to Load and Save Alignment

Automatic Alignment and Stitching

If your input maps have enough visual overlap, they can be automatically stitched by the Cloud Service. The easy way to do this is through the Developer Portal.

You can align/stitch 8 maps at a time with the free commercial license

The workflow is the following:

  1. Select two or more maps in the Developer Portal from the Job List

  2. Click on the Align Maps or Stitch Maps button

    1. If stitching maps, give a name for the new map

  3. The new alignment or stitching job will appear in the Job List

    1. If aligning maps, the map metadata for the input maps is updated

    2. If stitching maps, a new map with output files is generated

  4. The alignment or stitching jobs will have a coverage .json file for debugging

// Example coverage.json file for a stitching job
//
// Shows the new stitched map id, map ids for both
// successfully stitched and failed input maps
//
// Here all maps were successfully stitched together
‚Äč
{
"id": 18548,
"connected": [18500, 18501, 18503, 18544],
"disconnected": []
}

The input maps for Map Alignment or Map Stitching should have plenty of visual overlap

Select input maps for alignment or stitching
Select the action from the top buttons on top of the Job List
A new Alignment or Stitching job is created

Default alignment for new map constructed with GPS on is in ECEF coordinates!

Input Map A with overlap area illustrated
Input Map B with overlap area illustrated
Stitched output map AB