Stores a definition of makeup feature. One makeup feature contains all information required to render virtual makeup:
- mesh
- area
- color
- description of blending and filtering algorithms required to augment the camera feed with virtual makeup.
One FeatureTemplate instance can contain multiple rendering elements which share the mesh but can have different application area, color or blending and filtering algorithm. The simplest use-case for this class is using one of the predefined template specified in FeatureTemplateRepository obtained from MakeupEngine::GetFeatures function and setting the color of each element in elements array.
FeatureTemplate is defined by the following:
- name: name of the feature. This value is used for identification of different features. Does not have to be unique.
- type: type of the feature. Defines a mesh used to represent this feature when rendering.
- elements: defines a list of templates of elements required for rendering of this feature. Each element template uses the same mesh defined by the type parameter.
The following types are supported:
- Lipstick
- Lipliner
- Mascara
- Foundation
- Blush
- Concealer
- Eyeliner
- Eyeshadow
- EyebrowLine
- Eyebrows
- Eyebrows_1 - deprecated
- Eyebrows_2 - deprecated
- Eyebrows_3 - deprecated
Each type maps to a single mesh. The meshes used are stored in .obj format in the "Assets/Models" folder. The name of the .obj corresponds to the type name.
Additionally, this class provides methods for serialization and deserialization of FeatureTemplate instances from and to JSON format.