Head Segmentation
Head Segmentation isolates the subject's head, allowing you to apply customized textures and effects to it.
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:
- Open Effect House.
- Go to the Hierarchy panel.
- Click the Add object button [+].
- Go to Segmentation.
- Select Head Segmentation.
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:
- In Effect House, open Asset Studio.
- Click Face Mask and search the keyword blush.
- Import a blush face mask. You can see the imported assets in the Assets panel.
- In the Hierarchy panel, add a Face Mask object.
- Click the Face Mask object and assign the imported blush asset as the texture in the Inspector panel.
- Add a Face Stretch object and adjust the key points.
- Add a Head Segmentation object and move it around in the Scene panel to see it in action!
Demo Effect: Segmentation
Check out the Segmentation tutorial to incorporate a custom background into your effect.