Skip to content

MultiSet VPS

MultiSet is a high quality visual positioning system (VPS) that makes it possible to build interactive experiences that take place in real world locations. The MultiSet system can determine the location of the user in a given space and this can be used to place tracked AR content accurately into the environment. This process is called localization and works by sending camera images to MultiSet’s VPS servers.

The first step in building MultiSet VPS tracked experiences with Mattercraft is to register for a MultiSet account. You can do so from the developer portal:

In order to track content to a physical location you must make a scan of the space. This process builds a map of the visual appearance and structure of the location - everything MultiSet needs in order to determine where end-user devices are in that space.

A 3D model of the location is also created that can be used in Mattercraft to help you place content, and to generate additional data, such as the walkwable area.

MultiSet provides a number of ways to perform the scan, including an app that’s supported on LiDAR equiped iPhones and iPads. The MultiSet Mapping Documentation covers the mapping process and gives a number of tips and tricks for getting great results.

Any scans you perform can be viewed in the MultiSet Developer Portal:

If you’re working a large space you may wish to use MultiSet’s MapSet feature. This allows you to combine multiple individual scans into a single larger set for content and localization. Mattercraft’s MultiSet integration supports both maps and map sets.

In order to use a MultiSet map, or map set, in Mattercraft, you must generate a set of credentials. To do so, head to the credentials page of the developer portal and select ‘Create New’.

We recommend creating and using credentials with only query permissions. This is important as Mattercraft projects are distributed as web pages - the credential may be visible to anyone who views or disassembles the source of the published page.

Once you’ve created a credential, keep a note of the client ID and secret as you’ll need those when creating your Mattercraft project.

Mattercraft includes a number of template projects to help you get started building VPS experiences. The MultiSet Basic Example template is a great starting point - you can find it in the “Visual Position (VPS)” section:

MultiSet VPS projects build upon Zappar’s world tracking functionality and much of the example project may be familiar to you if you’ve built a world tracking AR experience before.

To begin, select the MultiSetAnchorGroup in the Hiearchy on the right, and add the client ID and secret you generated in the developer portal. You can then add a map code (which begins MAP_...) to the ‘Map Code’ property, or a map set code (which beings MSET_...) to the ‘Map Set Code’ property. The code for a given map/map-set can be found in the MultiSet developer portal.

Once the credentials and a map/map-set code have been added, a 3D preview of the space should appear in the 3D editor.

Add content to the MultiSetAnchorGroup that you would like positioned relative to the map. The template includes the Modern Arm Chair 3D model in this location as an example - feel free to delete it and replace it with your own content.

The 3D preview of the space is loaded only in the editor (to help with content placement) and not when end users are accessing the experience. You can configure this functionality by selecting the Map Preview component in the Hierarchy.

The MultiSetAnchorGroup has a number of useful properties, including:

  • Relocalization Interval: the amount of time after a successful localization that a further localization will be attempted. This is helpful to avoid drift - if the user has been moving around in the space for some time, the accuracy of the location estimate may be reduced and a relocalization can correct this.
  • Images to Submit: how many camera images to collect and send to the MultiSet servers per localization. The default, 1, gives the quickest result from the MultiSet servers, while setting it to 4 may increase the accuracy of the localization in larger or more challenging spaces.

In spaces with multiple rooms or walls, you may wish to add a MultiSetOcclusionMesh. It’s a component that will hide AR objects that are behind walls (or other occluders) in the map. You can add it by right clicking on the MultiSetAnchorGroup and adding a MultiSetOcclusionMesh node. The MultiSetOcclusionMesh uses a textureless version of the 3D model generated by MultiSet’s mapping application and downloading this may take a few moments while the experience loads for the user.

The MultiSetAnchorGroup component emits some events that you can use from behaviors or script. These include:

  • onFirstLocalized - emitted the first time a successful query of map is complete.
  • onLocalizeSuccess - emitted every time a successful localization (or relocalization) of the user in the map is complete.
  • onLocalizeFailed - emitted when a localization has failed. This can be due to network connectivity issues, or that the camera image submitted to the server was not sufficient to calcuate the user’s position.
  • onNotLocalized - emitted when the position of user in the environment can no longer be considered accurate. This can happen if the AR tracking is lost, if the camera is turned off/on, or if the user returns to the experience from the background.
  • onLocalized - emitted when the position of the user in the environment is accurate, having not been so.

The onLocalizeSuccess / onLocalizeFailed events are emitted for every localization attempt, while onLocalized / onNotLocalized are only emitted if the accuracy of the localization has changed.