Previewing Your Lens
There are two ways to preview and test your Lens: using the Preview
panel inside Lens Studio or Pairing to Snapchat to test on actual devices. For information on previewing your Lens in Snapchat, follow the Pairing to Snapchat guide.
Preview Panel
The Preview
panel allows you to see what your Lens would look like within Snapchat without having to open your device. The Preview
panel updates in real time as you make changes to your scene. The Preview
panel has various modes for visualization which are detailed below.
Photo Mode
Click the top bar in the Preview
panel to select a preview background. Then, select the Photo
tab. Here you can select from a number of static face and world photos to preview your content against. You can also add your own preview photos by selecting + From Files
.
Video Mode
Click the top bar in the Preview
panel to select a preview background. Then, select the Video
tab. Here you can select from a number of pre-recorded videos of faces and world videos with tracking data. You can also add your own custom videos by selecting + From Files
.
You can also add your own custom preview videos. Face Tracking, Marker Tracking and Object Tracking will work with custom preview videos. Custom preview videos will not have the proper tracking data for Rotation, Surface and World tracking to work.
Tip: It's best to provide a .mp4 formatted video. One way to do this is to use the following settings for FFMPEG: ffmpeg -i my_video.MOV -vcodec h264 -acodec mp2 my_video.mp4
Webcam Mode
Click this button to toggle the Preview
panel to use your computer's Webcam.
Interactive Preview Mode
The Interactive Preview Mode allows you to walk around the scene as if you were using the Lens on your device. You can use it to preview lenses with World Device Tracking
or World Mesh
right in Lens Studio without using the Lens on your device.
To walk around the scene, you can use W A S D
or the Arrow Keys
on your keyboard.
To change the orientation of the camera hold down the right mouse button
and drag your mouse around.
To raise or lower the camera, turn off Y Lock
, then use Left Control
to move the camera down and Space
to move camera up.
To go back to the camera's original position, press the Reset Button
.
You can change the speed of the interactive preview to one of three settings; Slow, Medium and Fast.
Try this mode with LiDAR enabled template!
Device Simulation
Your Lens might look different on different devices due to the screen size and device's native UI. At the bottom of the Preview
panel, you can choose from a set of devices to simulate how your Lens looks like on that device.
You can drag the preview panel off the main panel to enable the floating device mode.
More Options
Toggle UI
Click on the button to toggle the mock of the Snapchat UI. Open the drop-down for more UI options.
- **Capture Mode -**When disabled, the UI will represent what Snapchat looks like in the live camera and while recording. When enabled, the UI will represent what Snapchat looks like after recording
- **Show Sponsored UI -**For Lens Creators creating Sponsored Lenses, this option when enabled, will show you the additional sponsored UI that's added to the Lens
Preview Photo / Video Mode
Click this button to toggle the Preview
panel back to previewing in Photo / Video mode from Webcam mode.
Lens Reset
Restarts the Lens as if it was freshly selected by the user. Anytime you make modifications to scripts, make sure to reset the Lens using the Lens Reset
button.
Swap Cameras
Simulates swapping between the front and rear camera.
Mute Sound
Mutes all sound coming from the Lens.
Screenshot
Takes a screenshot of the Lens from within the Preview
panel. Then, prompts you to save the screenshot to your machine.
Screen Recording
Starts recording a video of the Lens from within the Preview panel. Then, prompts you to save the video to your machine.
Persistent Storage
Opens the drop-down to clear or print the persistent storage. For more information on persistent storage, refer to the Persistent Storage guide.