Skip to main content
Version: 4.55.1

Portrait Skin Segmentation

The Portrait Skin Segmentation template lets you easily segment skin in the camera view and replace it with an image, text, 3D models, post effects and more. This template comes with body tracking to help you easily attach your art to the skin.

: Since Skin Segmentation texture is a portrait effect,  the effect works best when the user is close to the camera.

Guide

The Skin Segmentation template contains three sections that let you segment the skin and attach objects to the body and the user’s face.

This guide explains the function and use of each section.

Segmentation Post Effect

The Objects Panel has a post effect object called Portrait Skin Segmentation Post Effect.

This post effect uses the Portrait Segmentation texture to extract the skin part of the Device Camera texture and place it in the front of the camera. In other words, it masks the user’s skin and objects can be only shown if they are placed on the user’s skin.

To show  objects in areas other than the skin, place the object below the Portrait Skin Segmentation Post Effect object in the hierarchy.

To edit the Portrait Skin Segmentation texture, select the Portrait Skin Segmentation [EDIT_ME] asset in the Resources panel and edit the values in the inspector panel.

To learn more about values in the segmentation texture please visit the Segmentation guide page.

Attaching Objects To the Body Skin

This template comes with a body tracking that lets you easily attach images or any other object to the skin.

To edit the image on the body, select the child object of the tracked object and edit the values in the Inspector panel.

For example, to edit the image on the user’s neck, select the child object of the Neck [EDIT_CHILDREN] and edit the Image component in the inspector panel.

To learn more about the Image component please visit the Image guide page.

To add any object other than the image, add that object as a child of the tracked object. See the Right ForeArm [EDIT_CHILDREN] child to see how a 3D object is placed on the skin.

Tacked objects include a Look At component. This component makes sure all child objects always face the camera. This component is optional.

Attach Object To the Face Skin

This template comes with a set of objects that lets you easily place design on the Face mesh within Lens Studio.

To make your objects appear on the face mesh, place any content as a child of the Face Tattoo Designer [EDIT_CHILDREN] and adjust the transform of the object on the face.

Under the Face Tattoo Designer [EDIT_CHILDREN] camera, you will find an object called Face Mesh UV Debug. This object is only visible in the 2d Editor to help you place your design on the face.

Preview Your Lens

You’re now ready to preview your Lens experience. To preview your Lens in Snapchat, follow the Pairing to Snapchat guide.

Please refer to the guides below for additional information:

Was this page helpful?
Yes
No