Supported pipelines
Styled Face pipeline was introduced for cartoonish avatars generation. It is the subtype (indie/legacy_styled) of the Animated Face pipeline.
The "cartoonish" effect comprises the avatar's geometry modification and applying additional texture. There are two type of textures for it: Slightly Cartoonish Texture and Cartoonish Texture.
Geometry of the Head 1.2 avatars can't be modified. Only the Slightly Cartoonish Texture can be generated along with the Parametric Eyes parameter.
Models comparison
Animated Face and Styled Face with Slightly Cartoonish Texture avatars
Animated Face and Styled Face with Cartoonish Texture avatars
Head 1.2 and Cartoonish Head 1.2 avatars
Configuration
Styled Face avatars should be generated with the following parameters for getting the "cartoonish" effect:
- Use PipelneType.STYLED_FACE
- Set the ComputationParameters.avatarModifications.allowModifyNeck to
True
.
- Configure cartoonish stylization level by varying ComputationParameters.shapeModifications.cartoonishV03 parameters in the range [0..1].
- Configure the list of the cartoonish textures that will be generated. ComputationParameters.additionalTextures. There are two textures: slightly_cartoonish_texture and cartoonish_texture.
IEnumerator ConfigureStyledFaceCartoonishParameters(ComputationParameters computationParameters)
{
yield return Await(parametersRequest);
if (parametersRequest.IsError)
yield break;
computationParameters.haircuts = parametersRequest.Result.haircuts;
computationParameters.additionalTextures.AddValue("base/slightly_cartoonish_texture");
computationParameters.additionalTextures.AddValue("plus/cartoonish_texture");
computationParameters.avatarModifications.allowModifyNeck.Value = true;
computationParameters.avatarModifications.addGlare.Value = true;
computationParameters.avatarModifications.addEyelidShadow.Value = true;
computationParameters.shapeModifications.cartoonishV03.Value = 1.0fs;
}
To generate "cartoonish" Head 1.2 avatar, use the following parameters combination:
- Set the ComputationParameters.avatarModifications.slightlyCartoonishTexture to
True
.
- Set the Parametric Eyes Texture, Add Glare and Add Eyelid Shadow values.
ComputationParameters ConfigureHeadCartoonishParameters()
{
ComputationParameters computationParameters = ComputationParameters.Empty;
computationParameters.avatarModifications.slightlyCartoonishTexture.Value = true;
computationParameters.avatarModifications.parametricEyesTexture.Value = true;
computationParameters.avatarModifications.addGlare.Value = true;
computationParameters.avatarModifications.addEyelidShadow.Value = true;
return computationParameters;
}
Implementation
See CartoonishAvatarSample.cs for implementation details.
See also FAQ and the getting started instructions on the main page: Main Page.