- Documentation
- AI Effects
- Guides
- Beauty makeups
Beauty makeups
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.
Prerequisites
Before you begin to use the beauty makeup feature, make sure:
- Integrate the ZegoEffects SDK into your project. For details, see Integration.
- Implement the basic image processing functionality. For details, see Implementation.
Implementation steps
The beauty markups include these features: eyeliner, eyeshadow, eyelashes, blusher, lipstick, colored eye contacts, and makeup looks.
Each feature provides various styles:
- Eyeliner: Natural, Cat Eye, naughty, innocent,dignified.
- Eyeshadow: Pink Mist, Shimmer Pink, Tea Brown, Bright Orange, Mocha_Brown.
- Eyelashes: Natural, Tender, Curl, Everlong, Thick.
- Blusher: Slightly Drunk, Peach, Milky Orange, Apricot Pink, Sweet Orange.
- Lipstick: Cameo Pink, Sweet Orange, Rust Red, Coral, Red Velvet.
- Colored eye contacts: Darknight Black, Starry Blue, Mystery Brown-Green, Polar Lights Brown, Chocolate Brown.
- Makeup looks: Vulnerable & Innocent Eyes, Milky Eyes, Cutie & Cool, Pure & Sexy, Flawless.
- You can't superimpose the styles of each feature. Once you apply a new style, the previous one (if any) will be overridden.
- You can superimpose the effects of eyeliner, eyeshadow, eyelashes, blusher, lipstick, and colored eye contacts, but you can't superimpose those with the makeup looks.
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:
- Enable the feature.
- Specify the parameters of the beauty makeup feature as needed. If not specified, the SDK uses the default settings.
Eyeliner
Use the eyeliner
- To apply the eyeliner, call the
setEyeliner
method with the path of the eyeliner resource passed to thepath
parameter. - To set the
intensity
, call thesetEyelinerParam
method. The value range of theintensity
property ofZegoEffectsEyelinerParam
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];
```
Remove the eyeliner
To remove the eyeliner, call the setEyeliner
method with the path
parameter set to nil
.
```objc
// Remove the eyeliner.
[self.effects setEyeliner:nil];
```
Eyeshadow
Use the eyeshadow
To apply the eyeshadow, call the
setEyeshadow
method with the path of the eyeshadow resource passed to thepath
parameter.To set the
intensity
, call thesetEyeshadowParam
method. The value range of theintensity
property ofZegoEffectsEyeshadowParam
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];
Remove the eyeshadow
To remove the eyeshadow, call the setEyeshadow
method with the path
parameter set to nil
.
```objc
// Remove the eyeshadow.
[self.effects setEyeshadow:nil];
```
Eyelashes
Use the eyelashes
- To apply the eyelashes, call the
setEyelashes
method with the path of the eyelashes resource passed to thepath
parameter. - To set the
intensity
, call thesetEyelashesParam
method. The value range of theintensity
property ofZegoEffectsEyelashesParam
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];
```
Remove the eyelashes
To remove the eyelashes, call the setEyelashes
method with the path
parameter set to nil
.
```objc
// Remove the eyelashes.
[self.effects setEyelashes:nil];
```
Blusher
Use the blusher
To apply the blusher, call the
setBlusher
method with the path of the blusher resource passed to thepath
parameter.To set the
intensity
, call thesetBlusherParam
method. The value range of theintensity
property ofZegoEffectsBlusherParam
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];
Remove the blusher
To remove the blusher, call the setBlusher
method with the path
parameter set to nil
.
```objc
// Remove the blusher.
[self.effects setBlusher:nil];
```
Lipstick
Use the lipstick
- To apply the lipstick, call the
setLipStick
method with the path of the lipstick resource passed to thepath
parameter. - To set the
intensity
, call thesetLipStickParam
method. The value range of theintensity
property ofZegoEffectsLipstickParam
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];
```
Remove the lipstick
To remove the lipstick, call the setLipStick
method with the path
parameter set to nil
.
```objc
// Remove the lipstick.
[self.effects setLipStick:nil];
```
Colored eye contacts
Use the colored eye contacts
To apply the colored eye contacts, call the
setColoredcontacts
method with the path of the colored eye contacts resource passed to thepath
parameter.To set the
intensity
, call thesetColoredcontactsParam
method. The value range of theintensity
property ofZegoEffectsColoredcontactsParam
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];
Remove the colored eye contacts
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];
```
Makeup looks
You can't superimpose the makeup looks and stickers. Once you apply a makeup look, the sticker will be overridden.
Use the makeup looks
- To apply the makeup looks, call the
setMakeup
method with the path of the makeup look resource passed to thepath
parameter. - To set the
intensity
, call thesetMakeupParam
method. The value range of theintensity
property ofZegoEffectsMakeupParam
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];
```
Remove the makeup looks
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];
```