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:
To apply the eyeliner, call the setEyeliner
method with the path of the eyeliner resource passed to the path
parameter.
To set the 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.
// Enable the eyeliner feature.
// 1. Enable the feature, and pass the path of the eyeliner resource.
mEffects.setEyeliner("/xxx/xxx/eyelinerdir/eyelinerdir_natural.bundle");
// 2. Set the intensity, value range [0, 100].
ZegoEffectsEyelinerParam param = new ZegoEffectsEyelinerParam();
param.intensity = 100;
mEffects.setEyelinerParam(param);
To remove the eyeliner, call the setEyeliner
method with the path
parameter set to nil
.
```java
// Remove the eyeliner.
mEffects.setEyeliner(null);
```
setEyeshadow
method with the path of the eyeshadow resource passed to the path
parameter.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.```java
// Enable the eyeshadow feature.
// 1. Enable the feature, and pass the path of the eyeshadow resource.
mEffects.setEyeshadow("/xxx/xxx/eyeshadowdir/eyeshadowdir_mist_pink.bundle");
// 2. Set the intensity, value range [0, 100].
ZegoEffectsEyeshadowParam param = new ZegoEffectsEyeshadowParam();
param.intensity = 100;
mEffects.setEyeshadowParam(param);
```
To remove the eyeshadow, call the setEyeshadow
method with the path
parameter set to nil
.
```java
// Remove the eyeshadow.
mEffects.setEyeshadow(null);
```
To apply the eyelashes, call the setEyelashes
method with the path of the eyelashes resource passed to the path
parameter.
To set the 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.
// Enable the eyelashes feature.
// 1. Enable the feature, and pass the path of the eyelashes resource.
mEffects.setEyelashes("/xxx/xxx/eyelashesdir/eyelashesdir_bushy.bundle");
// 2. Set the intensity, value range [0, 100].
ZegoEffectsEyelashesParam param = new ZegoEffectsEyelashesParam();
param.intensity = 100;
mEffects.setEyelashesParam(param);
To remove the eyelashes, call the setEyelashes
method with the path
parameter set to nil
.
```java
// Remove the eyelashes.
mEffects.setEyelashes(null);
```
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.
mEffects.setBlusher("/xxx/xxx/blusherdir/blusherdir_apricot_pink.bundle");
// 2. Set the intensity, value range [0, 100].
ZegoEffectsBlusherParam param = new ZegoEffectsBlusherParam();
param.intensity = 100;
mEffects.setBlusherParam(param);
To remove the blusher, call the setBlusher
method with the path
parameter set to nil
.
```java
// Remove the blusher.
mEffects.setBlusher(null);
```
To apply the lipstick, call the setLipStick
method with the path of the lipstick resource passed to the path
parameter.
To set the 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.
// Enable the lipstick feature.
// 1. Enable the feature, and pass the path of the lipstick resource.
mEffects.setLipStick("/xxx/xxx/lipstickdir/lipstickdir_bean_paste_pink.bundle");
// 2. Set the intensity, value range [0, 100].
ZegoEffectsLipstickParam param = new ZegoEffectsLipstickParam();
param.intensity = 100;
mEffects.setLipstickParam(param);
To remove the lipstick, call the setLipStick
method with the path
parameter set to nil
.
```java
// Remove the lipstick.
mEffects.setLipStick(null);
```
setColoredcontacts
method with the path of the colored eye contacts resource passed to the path
parameter.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.```java
// Enable the colored contacts feature.
// 1. Enable the feature, and pass the path of the colored eye contacts resource.
mEffects.setColoredcontacts("/xxx/xxx/coloredcontactsdir/coloredcontactsdir_chocolate_brown.bundle");
// 2. Set the intensity, value range [0, 100].
ZegoEffectsColoredcontactsParam param = new ZegoEffectsColoredcontactsParam();
param.intensity = 100;
mEffects.setColoredcontactsParam(param);
```
To remove the colored eye contacts, call the setColoredcontacts
method with the path
parameter set to nil
.
```java
// Remove the colored eye contacts.
mEffects.setColoredcontacts(null);
```
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.```java
// Enable the makeup look feature.
// 1. Enable the feature, and pass the path of the corresponding makeup look resource.
mEffects.setMakeup("/xxx/xxx/makeupdir/makeupdir_cutie_and_cool.bundle");
// 2. Set the intensity, value range [0, 100].
ZegoEffectsMakeupParam param = new ZegoEffectsMakeupParam();
param.intensity = 100;
mEffects.setMakeupParam(param);
```
To remove the colored eye contacts, call the setMakeup
method with the path
parameter set to nil
.
```java
// Remove the makeup looks.
mEffects.setMakeup(null);
```