Skip to main content

Face Mask Generator

Generate a face mask texture from a text prompt with the Face Mask tool in Lens Studio's GenAI Suite and apply it to the face in your Lens.

  • Snapchat: fully supported
  • SPECS: partially supported
  • Camera Kit Web: not supported
  • Camera Kit Mobile: not supported
  • SnapchatFully supported
  • SPECSPartially supported
  • Camera Kit WebNot supported
  • Camera Kit MobileNot supported

Platform details

  • Snapchat — Fully supported.

  • SPECS — Partially supported.

  • Camera Kit Web — Not supported.

  • Camera Kit Mobile — Not supported.

The Face Mask tool generates a face texture from a text prompt and applies it to the face in your Lens right away. When you import the result, the tool creates a Face Mask component (FaceMaskVisual) with a Face Mask material for you, so you don't have to set up the effect by hand.

The Lens Studio AI assistant can also generate a face mask texture for you in chat, through its GenerateFaceMaskTexture tool.

Open the Face Mask tool

  1. In the Lens Studio toolbar, select Lens Studio AI. The Lens Studio AI panel opens on the GenAI Suite home, a grid of tool cards under Generate ML models and Assets.

    The Lens Studio toolbar with the Lens Studio AI button outlined in red
    The Lens Studio AI panel on the GenAI Suite home, with tool cards under Generate ML models and Assets
  2. Scroll toward the end of the tool grid and select the Face Mask card.

    The end of the GenAI Suite tool grid, with cards including Selfie Attachments, Face Mask, and 3D Asset

If the Face Mask card is missing, install the tool from the Asset Library, where it is listed as the Face Mask plugin. Once installed, you can also open it from the Asset Browser.

Generate and import a face mask texture

  1. To try one of the default prompts and get familiar with the model, select Surprise Me.

    The Face Mask tool with the Surprise Me button highlighted
  2. To use your own prompt, enter a description of the face mask you want to generate in the Prompt field, up to 200 characters.

    The Prompt field of the Face Mask tool filled with a description of a face mask
  3. Optionally, use the Negative Prompt field, also up to 200 characters, to list what you don't want on your mask. It can include visual aspects, such as specific colors, shapes, or styles, and texture-quality issues you want to avoid.

    The Negative Prompt field of the Face Mask tool filled with elements to avoid
  4. When your prompt is ready, select Generate texture. The tool generates a preview of the face texture, which takes up to 7 seconds.

    The Generate texture button of the Face Mask tool highlighted
  5. If the preview doesn't match what you want, adjust your prompts or change the Seed to explore different visual results, then select Regenerate to create a new preview.

    A generated face mask preview with the Seed control and the Regenerate button
  6. When you're happy with the result, select Import to project to continue building your Lens.

    A generated face mask preview with the Import to project button highlighted

The import adds the generated texture to a Generated Face Masks folder in the Asset Browser, creates a Face Mask material, and adds a Face Mask component that uses it to a scene object. The Inspector shows the Face Mask component, and the Preview shows the mask on the face.

The Inspector showing the Face Mask component with the Face Mask material, beside the Preview with the generated mask on a face

For an overview of the effect and the settings of the Face Mask component, see Face Mask.

Test and share your face mask Lens

When building for Snapchat, save your project and push the Lens to Snapchat to test it on a device; see Pairing to Snapchat. To learn how to share your creation, see Submitting Your Lens.