Lenses for Spectacles 3
Spectacles 3 is the latest version of Spectacles sunglasses with dual cameras designed to capture the world in 3D. When building for Spectacles, a depth map of the scene, as well as the path which the video travels through is available to use in Lenses.
Tip: Looking to apply Lenses on augmented reality glasses? Check out the Lenses for Spectacles (2021) page!
Creating Lenses for Spectacles
To enable your Lenses to work with Spectacles, first open the Project Info window by pressing the
Project info button found in the top left corner of Lens Studio
Then, in the pop up window, in the “Lens is Made” for section, enable the checkbox next to
“Spectacles 3 😎”
Differences in Lenses for Spectacles
Lenses for Spectacles have unique advantages that allows you to make new types of experiences.
With Spectacles enabled, you are able to occlude your scene based on the depth information collected in the Spectacles video. To do this, in the
Objects panel, press
+, and select
Depth Setter object should be placed above the objects you want to occlude in the
You can add the
Depth Setter component through the Inspector panel as well. In general, you will want to add the
Depth Setter component to the perspective Camera object.
Additionally, you can add a material that represents the depth map of the Spectacles video. To do this, in the
Resources panel, press
In script, this material allows you to access the distance value at a screen coordinate in the video on a frame using the
getDepth API. Take a look at the Depth Template for an example of how to use this.
Finally, since the Lens runs after the video has been captured, you are able to get the path that the device travels during the video. To use this, in a script, use the
getDevicePathIndex API found in the Device Tracking component. Take a look at the Path Template for an example of how to use this.
Since Lenses for Spectacles run in a different context and not on the live camera, some features are unavailable:
- User context system
- City name
- Time of the recording
- Persistent Storage
- Audio Effect
- Camera Roll Picker
- Device Tracking (all modes are unavailable except of “World”)
When a feature is unavailable in a Spectacles context, you will see a yellow triangle next to the object containing it in the
Objects panel to remind you.
Previewing Lenses for Spectacles
To preview your Lens for Spectacles in Lens Studio, at the bottom left corner of your
Preview panel, select the Spectacles logo. Check out the Preview Videos page to download more footage to test your Lenses against.
To preview your Lens on device, follow the Pairing to Snapchat guide to connect your mobile device with Lens Studio. Once your Lens is pushed to device, open your Snapchat memories and choose a spectacles video. Then, long press your video to bring up the bottom menu, and choose
Edit Snap. Once the 3D data from your video is downloaded, swipe right on your video to enable your Lens.
Sharing Lenses for Spectacles
You can share your Lens like any other Lenses. Take a look at the sharing guide for more information. Once your Lens is shared, the recipient can open their memories, edit their Spectacles video, and swipe to find your Lens.
Still Looking for help?Visit Support