Using Substance Painter
Lens Studio supports high quality physically based rendering (PBR). Allegorithmic's Substance Painter is a tool built for creating PBR textures. The below guide will walk through how to configure Substance Painter for Lens Studio use. This allows you to visualize your model in Substance Painter as it would appear in Lens Studio and Snapchat. And then, how to export your PBR textures to be easily loaded into Lens Studio.
Download Substance Painter Shelf
To use Lens Studio PBR in Substance Painter, you first need to install our Substance Painter Shelf. This shelf has the Lens Studio shader, the Lens Studio export configuration and some example environment maps.
Install Substance Painter Shelf
To install the Substance Painter Shelf, first go to
File -> Preferences in Substance Painter. Select the
Shelf settings. Next, select
path and navigate to the downloaded and unzipped Lens Studio Substance Painter Shelf.
To enable the shelf, select it as your Default.
You can also extend your existing shelf by clicking the
+ button to the right of the
Next, navigate to the
Viewer Settings window and set
Shader to the
Finally, in the same
Viewer Settings window, set the
Environment Map to one of our included environment maps.
New Project, OpenGL
When creating a new Substance project, make sure to set the
Normal map format drop down to
If you have an existing project, in the tool bar select
Edit -> Project Configuration... and verify that the
Normal map format drop down is set correctly to
OpenGL. Additionally, make sure the
Compute tangent space per fragment checkbox is checked.
If you are importing a normal map texture into Substance, you need to make sure your normal map's
Color space setting is set to
OpenGL normal and not
To export your textures, go to
File -> Export Textures.... This will open the
Export window. Select
Lens Studio in the
Config drop down. Finally, select your desired export directory and click the export button.
This will export three textures that are ready to be added to Lens Studio.
One of the textures is your
Another is your
materialsParamTexis unique to our engine. It is a single texture that represents Metallic, Roughness and Ambient Occlusion
Lens Studio PBR Material
To use your PBR textures in Lens Studio, first import them to the project by dragging them into your
Resources panel. Next, create a new PBR material by selecting
Add New -> Material -> PBR in the
After that, add one of our preset Environment Maps or import your own.
To add one of the Lens Studio preset Environment Maps, select
Add New -> Texture -> Environment Map. To import your own, drag an
HDR environment map into your
This HDR will be built into two separate textures, the
xxx_diff and the
The smaller texture is
xxx_diff and the larger texture is the
With your new material selected, link all five textures to the appropriate channels in the
Now, assign your material to an imported mesh. For more information on importing meshes, follow the 3D Object Import guide.
You now have a high quality PBR material with textures inside Lens Studio!
Still Looking for help?Visit Support