True Size Object Template
The True Size Object template allows you to put 3D objects into the world with an accurate scale. The template comes with several different sized objects as an example. The template will use LiDAR capabilities for better accuracy if it's available on the device, and will automatically fallback to Multi-Surface tracking solution, utilizing ARCore/ARKit, if LiDAR is unavailable. If neither are available, the template will use Surface tracking.
While the content in here can be used for 3D objects in general, this template is great for shopping related Lenses where a realistic representation of size is important to show.
To learn more about Shopping Lenses, please visit the Shopping Template.
In the next few sections, you will learn:
- What the User Experience of True to Size looks likes at runtime.
- How Multi-Surface Tracking and World Mesh are used to create a true to size experience.
- How the 3D model is configured to a real world scale.
Template Lens User Experience
When the template lens starts, you will see the following:
- The Scan message to find supported surfaces will be shown.
- The Item will automatically appears in the user’s environment if a vacant position is found.
- The Item can be dragged and rotated using finger gestures on-screen.
- Tapping a position will teleport the Item to that position.
- If the Item is off-screen, an indicator arrow will appear to guide the user's attention back to the Item.
Device Tracking
True to size scaling utilizes two different types of tracking solutions that are dependent on the User’s device:
- Multi-Surface Tracking
- LiDAR World Mesh
If a User is experiencing the template on a lower end device, it will default to a third type of tracking solution called Surface tracking.
Multi-Surface tracking
With Multi-Surface tracking, Users will be able to detect flat surfaces, such as a floor, table, or a countertop, in their environment. After a surface has been detected, items can then be placed on the detected surfaces. Sensors in the phone allow for the digital item to be rendered at an accurate scale as the User moves throughout their physical space.
In order to use Multi-Surface tracking in a Lens, the User’s device will need to support either Apple’s ARKit or Google’s ARCore SDK.
LiDAR World Mesh
Certain Apple devices have embedded Light Detection and Ranging sensors, commonly known as LiDAR, that can scan and understand the world around the User when experiencing AR content. When using the True to Size template on one of these devices, it will use World Reconstruction to create a virtual 3D mesh of the User’s environment to allow users to place content with greater accuracy.
To learn more about LiDAR and World Reconstruction in Lens Studio, please visit the World Mesh and Depth Texture guide.
If You or a User is on an older device that does not have ARCore or ARKit capabilities, you can utilize the Surface Tracking solution. This solution uses camera on a device to create an approximate scale to use when placing content on a surface. This will not create a true to size scale on the digital items in the Lens.
To learn more about Surface Tracking, please visit the Tracking Modes guide.
Item Placement Script Object
The Item Placement Script object contains the main logic used to place an object on a horizontal surface.
- Force Tracking Quality: Overrides which tracking solution will be used at runtime. This can be used to test how the template would behave on devices with no LiDAR or no world tracking support.
- Tracking Quality: Sets the type of tracking solution that will be used.
- Plane
- Surface
- Endless Surfaces: Sets if the item will go through barriers (such as walls) instead of getting stuck.
- Edge spring: Sets if the item will bounce back when dragged over the edge in a spring-like manner.
Best Practices
Listed below are some best practices to keep in mind when working with objects that will be accurately represented in the Lens.
Use Centimeters for Scale
To provide an accurate scale for the model, its units should be in centimeters. The scale of the model can be changed using the Transform component in the Lens studio editor.
For instance, if the model is of meters units instead of centimeters, you will need to scale it by 100.
3D Object centered and facing the Z Direction
When looking to add interactivity and manipulation to the user experience, the model will need to be properly positioned in order to be placed in the world accurately. The Object’s pivot point should be located at the center of the object and at the very bottom. The pivot point should be placed at origin or 0,0,0
and the Object should be faced towards the positive Z direction.
- In the Viewport, switch to Scene view and select 3D scene.
- Select the object you need to adjust in the Objects panel.
- Left-click on the Move Tool and move the Object to
0,0,0
. - Left-click on the Rotate Tool and rotate the Object to face the correct direction.
Incorrectly orientating the object in the correct position may lead to undesirable results.
Shown below are some examples of improperly placed objects and what to avoid.


Previewing Your Lens
You’re now ready to preview your Lens. To preview your Lens in Snapchat, follow the Pairing to Snapchat guide. In order to properly preview this template, use the Interactive Environment preview option.
You will need to switch to the rear camera in order for the template to work properly in the Interactive Environment preview.
You can simulate tapping on the screen by left-clicking within the Environment. You can also virtually walk around in the Environment by pressing the arrow keys while the Control (CTRL) key is pressed.