Custom Locations
Map real-world areas with the Custom Locations Scanner Lens and import them into Lens Studio to create persistent location-based AR experiences.
- Snapchat: not supported
- SPECS: fully supported
- Camera Kit Web: not supported
- Camera Kit Mobile: not supported
- SnapchatNot supported
- SPECSFully supported
- Camera Kit WebNot supported
- Camera Kit MobileNot supported
Overview
Custom Locations gives you a straightforward way to map real-world areas and build AR experiences around them. First, find the Lens by typing "Custom Locations Scanner" in the search bar of Lens Explorer. Next, use the Lens to scan a location and create a Custom Location map. Then, import the Custom Location into Lens Studio to author AR content for it.
With the Custom Locations Scanner Lens, you can map individual locations, create groups of locations, and add more viewpoints to an existing location.
Previous Versions
This Lens and its components are an evolution of the Custom Location Creator Lens available on mobile.
The LocatedAtComponent component is still used, and the Import Mesh to Lens Studio guide is still applicable.
What does each Custom Location contain?
- A colored mesh of the scanned location
- A series of localization viewpoints (represented by camera frame icons)
The colored mesh is visible in the Lens Studio Preview panel and serves as a spatial reference, so you can position your AR content relative to the real-world location before deploying to your device.
You could also use the mesh as an occluder. Apply an occluder material to it, and real-world surfaces hide the AR content behind them.
The viewpoints are snapshots of the location captured during scanning. Your Lens uses them to work out where the device is in the real world, which is called localizing. When the device sees part of the scanned location, your Lens matches what it sees to these snapshots, works out the user's position, and displays your AR content in the right place.
Viewpoints
The Custom Locations Scanner Lens captures viewpoints as you scan. While scanning, move laterally around the location and look at it from many different angles.
Yellow camera frames appear during a scan to show where each viewpoint was captured and which direction it faces.
More viewpoints mean better localization. To add viewpoints to an existing scan, create an Incremental Scan. This also helps if your Lens needs to work in different lighting, such as at night: do the incremental scan in that lighting. However, an incremental scan adds viewpoints only: it doesn't extend or update the scanned mesh. It also generates a new ID, so you need to update your Lens to use it.
The following sections include example videos of scanning, such as Scan and publish a location.
Location IDs are saved only on your device. If you factory reset your SPECS, you lose the list of location IDs you've saved. Keep a copy of any ID your Lens uses.
Scanned locations are uploaded publicly. Deleting a location in the Custom Locations Scanner Lens removes it from the list on your device, but not from the cloud.
Getting started
Prerequisites
- Lens Studio:
v5.25+ - SPECS OS:
v7.0+ - SPECS App iOS:
v1.7+ - SPECS App Android:
v1.7+ - Interaction Kit (optional)
Creating a New Custom Location
Scan and publish a location
Scan a location with the Custom Locations Scanner Lens on your SPECS. To find it, type "Custom Locations Scanner" in the search bar of Lens Explorer.
-
Go to the location you want to scan.
-
Open the Custom Locations Scanner Lens and select New Scan at the bottom.
-
Name your new scan.
-
Select Start Scanning, then move around the location. View it from many different angles and move laterally as you scan. As the scan progresses, the scanned mesh updates as SPECS tracks the shape of the location more accurately.
-
Select Finish Scan. The button appears as soon as the scan meets the minimum requirements, but keep scanning for longer to capture more viewpoints.
-
Accept the disclaimer and publish the location.
The Lens then shows the new location ID, the scan name, and the scan size. Use this ID to import the location into Lens Studio.
The disclaimer you accept before you publish reads:
After you upload this Location to Snap, you will receive a unique reference ID. Anyone with access to this ID will be able to use this Location in Lens Studio to publish a Lens, so avoid uploading a Location that contains sensitive personal information.
Verify a scan
Before you import a location into Lens Studio, you can preview the scan on SPECS. Verifying a scan shows the scanned mesh as a grid over the real space, so you can check what the scan covers without opening Lens Studio.
-
In the Custom Locations Scanner Lens, select
...on the scan you want to check. -
Select the check mark (✓) and confirm.
-
Walk around the scanned area. The Lens shows the scanned mesh as a grid over the space.
-
Select the return button to go back to the main menu.
Import Scanned Mesh to Lens Studio
Once you've published a location with the Custom Locations Scanner Lens, you can import it into Lens Studio. First, open a SPECS project made from the Base Template and sign in to Lens Studio with your SPECS account. If you haven't done either yet, see Set Up Lens Studio for SPECS.
You can import a location in two ways:
- With its location ID: works for any published location.
- From the Map panel: lists the locations published from your SPECS account, so you don't need to copy the ID.
Import with a location ID
-
In the Scene Hierarchy panel, select World > Custom Location.

-
Select the new asset in the Asset Browser and enter your location ID.

After you enter the ID, Lens Studio shows the location mesh and its tracking asset.
Import from the Map panel
-
In Lens Studio, select Window > Editors > Map.
-
In the Map panel, open the Custom Location tab. It lists every Custom Location you've published, with its ID, name, and publish date. To find one quickly, enter its ID or name in Keyword and select Apply.

-
Select Import on the location you want.
Lens Studio adds a scene object named after the location ID, with a Located At component set to that ID and a Render Mesh Visual that shows the scanned mesh.

The Map panel lists only the Custom Locations published from the SPECS account you're signed in with. It doesn't show them if you're signed in with a Snapchat account from Spectacles (2024).
After you import
Use the scan mesh mainly to place content in the editor. If you keep it in the published Lens, you could use it as an occluder instead of showing it.
Lens Studio needs an internet connection to import a Custom Location and to open a project that contains one.
Using your Location based Lens
A Sample project is available in the SPECS-sample GitHub repository. In its README there is a step by step guide that creates an example Lens to demonstrate a potential use case.
Creating an Incremental Scan
An incremental scan adds viewpoints to an existing scan to improve localization, for example by adding viewpoints under varied light conditions, such as at night. The incremental scan doesn't add to or update the scanned mesh. It also gets its own ID and name, so update your Lens to use the new ID.
-
Select
...on an existing scan within your Lens. -
Select
+and confirm. -
The user will be presented with the scanning prompt and must localize against the existing scan.
-
Rename the incremental scan before adding new viewpoints.
-
Once localized, the Finish Scan button will appear.
-
Tap on this button to begin the incremental scan.
-
Now move around to the new localization points to gather new viewpoints.
-
Once completed, tap publish to receive the new ID.
-
In the Lens Studio project using the previous ID, replace the ID.
-
Publish the updated Lens with the updated localization scan.
The new incremental scan will be created in the same coordinate frame as the original, so the placement of virtual objects will not need to be updated.
Creating a Custom Location Group
Create and publish a group
You can tie up to five Custom Locations together into a Custom Location Group. Follow the above steps until you have at least two locations that are relatively close to each other. Locations that are less than 20m from each other work best.
-
Select the + button in the top-left corner.
-
Check all of the locations that you wish to gather together. You can select up to five locations per group.
-
Press Create a new group.
-
One by one, select each of the locations and:
- Go to that location and await stabilization.
- Select the next location.
-
Once all locations are stabilized, the Create a group button will appear.
-
Press Create a group. The Lens shows the group ID and lets you name the group.
-
Name the group, then press OK to publish it.
During grouping, selecting an already stabilized location will result in it being remapped. This could be useful if you believe the located position is incorrect.
Importing Custom Location Groups to Lens Studio
Once a group has been published, you can import it into Lens Studio in two ways:
- With its group ID: works for any published group.
- From the Map panel: lists the groups published from your SPECS account, so you don't need to copy the ID.
Import with a group ID
- Create an empty scene object.
- On the object, click Add Component.
- Select Custom Location Group.
- On the new component, enter the ID into the Group ID field.
- Press Reload Group.
Lens Studio generates a Custom Location child for every member of the group.

Import a group from the Map panel
-
In Lens Studio, select Window > Editors > Map.
-
In the Map panel, open the Custom Location Group tab. It lists every Custom Location Group you've published.
-
Select Import on the group you want. Lens Studio adds a scene object with a Custom Location Group component, set to the group's ID and listing its locations.

Custom Location Groups aren't supported in Connected Lenses: a Connected Lens uses a single Custom Location.
Group Localization
The scanning Lens will only allow groups of up to 5 to be created at this time.

Methods for Capturing Optimal Viewpoints
Follow these tips while you scan to capture more useful viewpoints and a better mesh:
- Keep moving. Make sure that your device is in constant motion.
- Don't stand in one spot. Don't stand still and turn your head around from one spot. Walk around the space instead.
- Avoid extreme angles and fast motion. Don't point straight up or straight down, and don't move your head quickly.