The ZegoEffects SDK provides the beauty makeup feature, which can put virtual makeups on your facial features, such as eyeliner, eyelashes, blusher, lipstick, and colored eye contacts, and also provides various makeup looks.
Before you begin to use the beauty makeup feature, make sure:
The beauty markups include these features: eyeliner, eyeshadow, eyelashes, blusher, lipstick, colored eye contacts, and makeup looks.
Each feature provides various styles:
You can choose to use any beauty makeup feature as needed by specifying the corresponding beauty makeup resource.
In general, take the following steps to use a beauty makeup feature:
setEyeliner
method with the path of the eyeliner resource passed to the path
parameter.intensity
, call the setEyelinerParam
method.
The value range of the intensity
property of ZegoEffectsEyelinerParam
is [0, 100]. As this value gets larger, the effect gets stronger.```objc
// Enable the eyeliner feature.
// 1. Enable the feature, and pass the path of the eyeliner resource.
[self.effects setEyeliner:@"/xxx/xxx/eyelinerdir/eyelinerdir_natural.bundle"];
// 2. Set the intensity, value range [0, 100].
ZegoEffectsEyelinerParam* param = [[ZegoEffectsEyelinerParam alloc] init];
param.intensity = 100;
[self.effects setEyelinerParam:param];
```
To remove the eyeliner, call the setEyeliner
method with the path
parameter set to nil
.
```objc
// Remove the eyeliner.
[self.effects setEyeliner:nil];
```
To apply the eyeshadow, call the setEyeshadow
method with the path of the eyeshadow resource passed to the path
parameter.
To set the intensity
, call the setEyeshadowParam
method.
The value range of the intensity
property of ZegoEffectsEyeshadowParam
is [0, 100]. As this value gets larger, the effect gets stronger.
// Enable the eyeshadow feature.
// 1. Enable the feature, and pass the path of the eyeshadow resource.
[self.effects setEyeshadow:@"/xxx/xxx/eyeshadowdir/eyeshadowdir_mist_pink.bundle"];
// 2. Set the intensity, value range [0, 100].
ZegoEffectsEyeshadowParam* param = [[ZegoEffectsEyeshadowParam alloc] init];
param.intensity = 100;
[self.effects setEyeshadowParam:param];
To remove the eyeshadow, call the setEyeshadow
method with the path
parameter set to nil
.
```objc
// Remove the eyeshadow.
[self.effects setEyeshadow:nil];
```
setEyelashes
method with the path of the eyelashes resource passed to the path
parameter.intensity
, call the setEyelashesParam
method.
The value range of the intensity
property of ZegoEffectsEyelashesParam
is [0, 100]. As this value gets larger, the effect gets stronger.```objc
// Enable the eyelashes feature.
// 1. Enable the feature, and pass the path of the eyelashes resource.
[self.effects setEyelashes:@"/xxx/xxx/eyelashesdir/eyelashesdir_bushy.bundle"];
// 2. Set the intensity, value range [0, 100].
ZegoEffectsEyelashesParam* param = [[ZegoEffectsEyelashesParam alloc] init];
param.intensity = 100;
[self.effects setEyelashesParam:param];
```
To remove the eyelashes, call the setEyelashes
method with the path
parameter set to nil
.
```objc
// Remove the eyelashes.
[self.effects setEyelashes:nil];
```
To apply the blusher, call the setBlusher
method with the path of the blusher resource passed to the path
parameter.
To set the intensity
, call the setBlusherParam
method.
The value range of the intensity
property of ZegoEffectsBlusherParam
is [0, 100]. As this value gets larger, the effect gets stronger.
// Enable the blusher feature.
// 1. Enable the feature, and pass the path of the blusher resource.
[self.effects setBlusher:@"/xxx/xxx/blusherdir/blusherdir_apricot_pink.bundle"];
// 2. Set the intensity, value range [0, 100].
ZegoEffectsBlusherParam* param = [[ZegoEffectsBlusherParam alloc] init];
param.intensity = 100;
[self.effects setBlusherParam:param];
To remove the blusher, call the setBlusher
method with the path
parameter set to nil
.
```objc
// Remove the blusher.
[self.effects setBlusher:nil];
```
setLipStick
method with the path of the lipstick resource passed to the path
parameter.intensity
, call the setLipStickParam
method.
The value range of the intensity
property of ZegoEffectsLipstickParam
is [0, 100]. As this value gets larger, the effect gets stronger.```objc
// Enable the lipstick feature.
// 1. Enable the feature, and pass the path of the lipstick resource.
[self.effects setLipStick:@"/xxx/xxx/lipstickdir/lipstickdir_bean_paste_pink.bundle"];
// 2. Set the intensity, value range [0, 100].
ZegoEffectsLipstickParam* param = [[ZegoEffectsLipstickParam alloc] init];
param.intensity = 100;
[self.effects setLipstickParam:param];
```
To remove the lipstick, call the setLipStick
method with the path
parameter set to nil
.
```objc
// Remove the lipstick.
[self.effects setLipStick:nil];
```
To apply the colored eye contacts, call the setColoredcontacts
method with the path of the colored eye contacts resource passed to the path
parameter.
To set the intensity
, call the setColoredcontactsParam
method.
The value range of the intensity
property of ZegoEffectsColoredcontactsParam
is [0, 100]. As this value gets larger, the effect gets stronger.
// Enable the colored contacts feature.
// 1. Enable the feature, and pass the path of the colored eye contacts resource.
[self.effects setColoredcontacts:@"/xxx/xxx/coloredcontactsdir/coloredcontactsdir_chocolate_brown.bundle"];
// 2. Set the intensity, value range [0, 100].
ZegoEffectsColoredcontactsParam* param = [[ZegoEffectsColoredcontactsParam alloc] init];
param.intensity = 100;
[self.effects setColoredcontactsParam:param];
To remove the colored eye contacts, call the setColoredcontacts
method with the path
parameter set to nil
.
```objc
// Remove the colored eye contacts.
[self.effects setColoredcontacts:nil];
```
You can't superimpose the makeup looks and stickers. Once you apply a makeup look, the sticker will be overridden.
setMakeup
method with the path of the makeup look resource passed to the path
parameter.intensity
, call the setMakeupParam
method.
The value range of the intensity
property of ZegoEffectsMakeupParam
is [0, 100]. As this value gets larger, the effect gets stronger.```objc
// Enable the makeup look feature.
// 1. Enable the feature, and pass the path of the corresponding makeup look resource.
[self.effects setMakeup:@"/xxx/xxx/makeupdir/makeupdir_cutie_and_cool.bundle"];
// 2. Set the intensity, value range [0, 100].
ZegoEffectsMakeupParam* param = [[ZegoEffectsMakeupParam alloc] init];
param.intensity = 100;
[self.effects setMakeupParam:param];
```
To remove the colored eye contacts, call the setMakeup
method with the path
parameter set to nil
.
```objc
// Remove the makeup looks.
[self.effects setMakeup:nil];
```