Skip to main content
Version: 4.0.0

Hand Segmentation

Hand Segmentation isolates the subject's hands, allowing you to apply customized textures and effects to them.

hand 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 Hand Segmentation

To add a Hand Segmentation object:

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

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

Components

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

Demo Effect: Hand Segmentation

In this section, you’ll learn how to create a hand shadow effect.

Download the following file to follow along:

↓ HandSegmentationDemo.zip

hand segmentation demo

Add a Hand Segmentation object:

  1. Go to the Hierarchy panel.
  2. Click the Add object button [+].
  3. Go to Segmentation.
  4. Click Hand Segmentation.

Then add an Image object:

  1. Clik the Add object button [+].
  2. Go to 2D.
  3. Click Image. This will be the background image.

Create the hand shadow effect:

  1. Remove the canvas and 2D camera that were added with the image. You only need one 2D camera and one canvas in the scene.
  2. Drag the Image under the Hand Color object so that it will render behind the hand segmentation.
  3. Rename it to Background.
  4. Replace the texture of this Background image to background.
  5. Adjust its size in the Scene view to fill the screen.
image properties
  1. Select Hand Segmentation Texture from the Assets panel.
  2. In the Inspector panel, change its Cutout Texture to the black hand texture you prepared. Now feel free to try it on your hand.
hand segmentation texture properties