Customize 3D Content
This is the third tutorial in the Building Your First Lens series. This tutorial series walks through all of the steps for creating your first AR project (Lens) in Lens Studio. At the end of this series you will have recreated the Birthday Countdown sample project, learning all of the steps and pieces to create your own AR experiences.
This step of the tutorial focuses on adding 3D content to your Lens Studio project. Whether that was created in an external tool such as Blender, from an external service, or via the Lens Studio Asset Library. You will learn about how 3D objects in Lens Studio are rendered and how you can modify these settings to make a unique visual experience for the user.
Prerequisites
- Download the latest version of Lens Studio
Working with Polished 3D Assets
While Lens Studio contains a lot of built in features, it shines most as a way to bring your own content to life in AR!
We can start by replacing our trusty cone with a 3D model of a party hat.
If you are opting to create the 3D model yourself or import from an external service, you can import the created file into Lens Studio by simply dragging in a 3D model file into the Asset Browser window.
If you would prefer to follow along with the hat we are using, we will be downloading the 3D model from the Asset Library in Lens Studio in the next step.
We can locate the 3D model of the hat we will use in the Asset Libary
The Asset Library is a collection of assets created by Snap and the community that will help you build your Lenses.
Select the Asset Library button in the upper left corner, and then search for Birthday Hat.
Once the birthday hat appears, hover over it and select Import to add it to your Asset Browser.
We can see that the birthday hat has been added to our project, and we can open its folder to find all of the pieces we just downloaded.
In the Birthday Hat Resources folder, we can see everything you need to render a 3D object: Materials, Meshes, and Textures.
Since this object has already been conifigured for use in Lens Studio, we can instead, use the prefab named PLACE_IN_OBJECTS_PANEL.
We can drag and drop this asset to our Hierarchy, directly onto the Head Binding object to attach it to the user's head.
Note: A Prefab is a preconfigured object that can be easily modified and is ready for use in Lens Studio. You can turn any object into a prefab by drag and dropping it from the Hierarchy panel to the Asset Browser panel.
Now with our new hat added to the scene, we can remove the cone object.
You can uncheck the checkbox next to its name to disable it, or right-click > delete to remove it from the scene.
Now, you can adjust the position and scale of the new hat as we did in section 2.
Deleting an object from the Scene will leave its assets available for use in the Asset Browser.
With our new hat in place, we can now customize it to match our style.
Select the various materials in the Asset Browser and change the Base Color property for each one until you have the perfect look.
Once you are comfortable adjusting the properties of the materials, try replacing some of the provided Materials with new ones!
You can find new Materials by selecting the + in the Asset Browser and navigating to the Materials tab or you can find even more in the Asset Library!
Tip: You can also generate your own Materials using the GenAi Suite!
Reminder that the material is set in the Render Mesh Visual component.
Summary
You can find tons of free 3D models and materials directly in Lens Studio, in the Asset Library
You can also import your own content created from external tools and easily modify them within Lens Studio to create the perfect look.