Skip to main content
Version: 4.0.0

Head Segmentation

Head Segmentation isolates the subject's head, allowing you to apply customized textures and effects to it.

head segmentation demo

Requirements

Segmentation has a very high performance impact on iOS devices. Segmentation should not be combined with many other features as doing so will cause low FPS and may subsequently lead to not passing QA.

Add Head Segmentation

To add a Head Segmentation object:

  1. Open Effect House.
  2. Go to the Hierarchy panel.
  3. Click the Add object button [+].
  4. Go to Segmentation.
  5. Select Head Segmentation.
add head segmentation object

A Segmentation material will automatically be added to the Material property of the Image component when adding a Head Segmentation object. Segmentation material is useful for quickly adding commonly used segmentation effects to the scene.

Components

The Head Segmentation object is made up of the following components, found in the Inspector panel:

Demo Effect: Head Segmentation

In this section, you’ll learn how to generate a face mask and create a head segmentation effect.

You can generate your own face mask or download the following file to easily get started:

head_segmentation_demo.zip

head segmentation demo
  1. In Effect House, open Asset Studio.
  2. Click Face Mask and search the keyword blush.
generate face mask
  1. Import a blush face mask. You can see the imported assets in the Assets panel.
  2. In the Hierarchy panel, add a Face Mask object.
  3. Click the Face Mask object and assign the imported blush asset as the texture in the Inspector panel.assign texture
  4. Add a Face Stretch object and adjust the key points.
  5. Add a Head Segmentation object and move it around in the Scene panel to see it in action!
head segmentation demo

Demo Effect: Segmentation

Check out the Segmentation tutorial to incorporate a custom background into your effect.

segmentation demo