Lenses for Spectacles
Spectacles (2021) allows you to apply the Lenses you build directly in realtime on an augmented reality glasses. You can leverage its stereo speakers, touchpad, and stereo display and cameras to create new immersive experiences.
Tip: Before getting started with developing for Spectacles, check out the Spectacles (2021) Support Page for the full details of using Spectacles (2021), as well as its tech specs.
Tip: Previously you were able to apply Lenses on post-capture in footage generated by Spectacles 3 via Memories in the Snapchat app. This page deals with creating Lenses for Spectacles (2021) which is applied in real time on the display.
Differences in Lenses for AR Glasses
For the most, building for Spectacles (2021) is similar to how you would build any other Lens. However, since it is a different form factor, there are some consideration to keep in mind before delving into its creation.
Tip: Feel free to jump to the Building Lenses for Spectacles section to get started on creating your Lens for Spectacles (2021)
AR glasses uses a different type of display technology than traditional displays that we are all used to. This presents both new opportunities, as well as considerations. With AR glasses, the screen only displays AR effects, which is in turn overlaid on top of the real world. As a result, you should keep in mind:
Overlaid Display: Since the display is see through, the pixels on the screen cannot replace the real world, which limits certain types of visual effects. For example, components such as Face Stretching or Liquify will not work since you will see the real world behind it.
Additive Display: Since the display is displaying light on top of the real world, it cannot render the color black. In a similar vein, white is the most prominent color.
Tip: Although the display can not display black, you can create illusion of a black color by creating more contrast. A dark colored object with a white halo could be perceived as black
Motion To Photon Latency
In all AR systems there is an important property known as Motion To Photon Latency that all AR developers should be aware of. Motion To Photon Latency measures the difference in time between a user’s motion (i.e. physically turning the head left and right) and the display rendering the appropriate content of the motion. The greater the Motion To Photon Latency, the more apparent it becomes that the virtual content looks mis-registered to the real world (in other words, the AR content does not seem to be attached).
Spectacles (2021) tries to predict what to render on the display based on the user’s motion to mitigate the effects of the Motion To Photon Latency. However, there will be cases where this future prediction is unwanted. For example, some content may need to be at a fixed location on the display regardless of how the user is moving (e.g. on screen UI) and having the future prediction rendering will cause the content to have a ghost effect.
By default, this future prediction is applied to all content being rendered on the
Live Target so that the effects of motion to photon latency is reduced, and your content feels attached to the real world. However, if you want to ignore this prediction, you can use
Overlay Target. Take a look at the Creating Lenses page to learn more.
Notice the haze in the right image (image being rendered on Live Target), where the image has prediction applied and therefore not "attached" to the glasses.
Field of View
Spectacles (2021) has a display Field of View (FOV) of 26.3°. The FOV is the area in which the augmented reality content will be viewable through the display.
Live versus Captured Experience
In addition to being able to display Lenses in real time on the AR Glasses, you can capture the Lens being used on top of your video. This means, when you record a Snap with Spectacles (2021), the user may see a slight difference between what you see.
A Larger Field of View: Although the field of view is limited on the device, the captured image will show a larger field of view.
Non-additive Display: Although the glasses displays the Lens through an additive display where the color black doesn’t render, the captured content will composite the AR effect as you would see them on a standard display.
Real time on Spectacles (2021) on the left, Video captured by device on the right.
For the most part, building a Lens in Spectacles (2021) is similar to building Lenses with any other Lenses. However, there are some things to keep in mind:
Touchpad: Since the display is worn, the user can not touch the display to interact with the Lenses. On Spectacles (2021), the touchpad is available on the right side of the glasses arm and can respond to touches on the horizontal axis.
Instant World Tracking: The device is calibrated to allow for instant world tracking. In fact, it is the preferred method of tracking over Surface tracking.
Single Plane Tracking: The device is able to understand different orientation of surfaces that it sees--whether it be floors, walls, or other. Take a look at the Single Plane Tracking guide and template for more information.
Interaction Component: The device can give you a call back when the user is focusing on a certain object.
Dual speakers: The device comes with a speaker for each side of the ears, which allows for spatially aware audio.
To learn more about both what Spectacles (2021) is capable of, as well as its limitation, checkout the Feature Compatibility page.
Building a Lens for Spectacles (2021)
Next, check out the following resources to get started building the world you want to create!
- Creating Lenses for Spectacles (2021)
- Best Practices
- See the Building Blocks Template to see how you might create a user interface on this device
- See the Single Plane Tracking Guide and Template to see how you can leverage the Single Plane Tracking provided by Spectacles to attach things to different surfaces like floors and walls
- See the Animated Objects Template to see how you can use Interaction Component to allow users to interact with objects
- Feature Compatibility
Still Looking for help?Visit Support