Avatar SDK  2.1.1
Realistic avatar generation toolset for Unity3D
Scene #05: Parameters Sample

This scene demonstrates API that allows working with computation parameters and flags. These parameters and flags configure which auxiliary features and resources should be generated for the avatar.

The SDK will tell you which resources and parameters are available for your account (this is the full list that you see in the UI). Then before the avatar is generated you can specify which resources you need and which parameters you would like to apply.

Accounts with more advanced paid plans (currently "Indie" and above) will have more resources available and more extended parameters for their avatars.

Currently, the following groups with parameters are available:

  • Haircuts
  • Blendshapes
  • Model Info
  • Avatar Modifications
  • Shape Modifications
  • Additional Textures

Haircuts

Unity plugin includes the following sets of artificial haircuts:

  • Base set: 3 male and 3 female haircuts
  • Facegen set: 39 haircuts in total, some of them are unisex
  • Plus set: set of haircuts available for HEAD 2.0 and BUST 2.0
  • Generated: haircut generated from original image (available for HEAD 2.0 and BUST 2.0)

It is possible to add custom haircuts to your account. Please contact us at suppo.nosp@m.rt@a.nosp@m.vatar.nosp@m.sdk..nosp@m.com to implement this, we will provide the implementation details on a custom basis. Once the custom haircuts are added, the SDK will return more haircuts in the available haircuts list.

Blendshapes

Avatar SDK supports avatars animation using blendshapes. There are two different blendshapes sets available in the Avatar SDK Unity plugin which should be used depending on your use-case: general animation and lip-sync. E.g. if you want to use lipsync functionality (such as Oculus Lipsync SDK) with your avatar you may want to generate additional visemes blendshapes, but if you don't use lipsync you should tell the SDK to skip these blendshapes to save calculation and download time.

  • legacy_45: Basic set of 45 facial blendshapes.
  • visems_17: Set of 15 visemes (aa, ch, ee, ih, oh, ou, th, dd, ff, kk, nn, pp, rr, sil, ss) and two additional blendshapes: frown and smile. This set is compatible with Oculus Lipsync that required these 15 visemes. You can find more details here how to use Oculus Lipsync with Avatar SDK: Oculus LipSync Sample
  • mobile_51: Set of 51 facial blendshapes. This set is compatible with Apple ARKit: https://developer.apple.com/documentation/arkit/creating_face-based_ar_experiences (available for HEAD 2.0 and BUST 2.0)
  • visems_15: Set of 14 visemes (PP, FF, TH, DD, kk, CH, SS, nn, RR, aa, E, ih, oh, ou) and one additional blendshape: Laughter. This set is compatible with Oculus Lipsync visemes. You can find more details here how to use Oculus Lipsync with Avatar SDK: Oculus LipSync Sample

Model Info

This group of flags configures which meta-information should be generated for the avatar.

  • Hair Color: Compute average haircut color from submitted photo.
  • Skin Color: Compute average skin color from submitted photo.
  • Gender: Predict person's gender from submitted photo (male or female) and confidence.
  • Age: Classify to which age group the person from the photo belongs to. There are two groups: Child and Adult.
  • Facial Landmarks: Compute facial landmarks.
  • Eye Sclera Color: Compute average eye sclera color from submitted photo.
  • Eye Iris Color: Compute average eye iris color from submitted photo.
  • Lips Color: Compute average lips color from submitted photo.
  • Predict Haircut: Predict which haircut matches best to submitted photo. Predicted haircut is chosen from the available haircuts set, not from the selected.
  • Race: Classify to which race the person from the photo belongs to. Possible values are: black, asian and white. Result of prediction is represented as set of confidence values for possible values.

Colors correspondance:

model_colors.jpg

Parameters availability:

Parameter Name Face pipeline Head pipeline Styled Face pipeline Head 2.0 (head/mobile) Head 2.0 (bust/mobile)
Hair Color Free - Indie Pro Pro
Skin Color Plus Plus Plus Pro Pro
Gender Plus Plus Plus Pro Pro
Age Plus Plus Plus Pro Pro
Facial Landmarks Plus Plus Plus Pro -
Eye Sclera Color Plus Plus Plus Pro Pro
Eye Iris Color Plus Plus Plus Pro Pro
Lips Color Plus Plus Plus - -
Predict Haircut Plus - Plus - -
Race - Plus - Pro Pro

Avatar Modifications

Group of parameters that allows to modify the avatar:

  • Allow Modify Neck: By default all avatars have the same neck size for all models for easier attaching to the body. If the flag is set to True, neck will be modified to better match submitted photo.
  • Curved Bottom: Make the bottom of the Head model slightly curved. Applied only to the Head avatars. See models comparison below.
    curved_bottom.jpg
  • Slightly Cartoonish Texture: Make the regular texture looking with slightly cartoonish effect. Applied only to the Head avatars.
    slightly_cartoonish_head.jpg
  • Add Glare: Add a glare to the eyes on the regular texture.
    eye_glare.jpg
  • Add Eyelid Shadow: Add an eyelid shadow on the regular texture.
    eyelid_shadow.jpg
  • Eye Iris Color: Allow to set the iris color.
    eye_iris_color.jpg
  • Eye Sclera Color: Allow to set the eye sclera color.
    eye_sclera_color.jpg
  • Lips Color: Allow to set the lips color.
  • Caricature Amount: Factor to strengthen differences between average model and particular avatar. Valid values range is [0, +∞). Usable values range is model dependent and usually should be lower than 5.
  • Teeth Color: Recolor teeth directly on a model texture.
  • Hair Color: Recolor generated haircut directly on a haircut texture.
  • Texture size: Size of resulting model's texture.
  • Generated haircut texture size: Size of generated haircut's texture.
  • Generated haircut faces count: Number of faces in generated haircut.
  • Remove smile: Detect smile on input photo and remove if detected.

Parameters availability:

Parameter Name Face pipeline Head pipeline Styled Face pipeline Head 2.0 (head/mobile) Head 2.0 (bust/mobile)
Allow Modify Neck Indie - Indie Pro -
Curved Bottom - Plus - - Pro
Slightly Cartoonish Texture - Plus - - -
Add Glare - - Plus Pro Pro
Add Eyelid Shadow - - Plus Pro Pro
Eye Iris Color - - Plus Pro Pro
Eye Sclera Color - - Plus Pro Pro
Lips Color Plus - Plus - -
Caricature Amount Plus - Plus - -
Teeth Color Plus - Plus Pro Pro
Hair Color - - - Pro Pro
Texture size - - - Pro Pro
Generated haircut texture size - - - Pro Pro
Generated haircut faces count - - - Pro Pro
Remove smile - Plus - Plus Plus

Shape Modifications

Group of parameters that allows to modify the avatar geometry:

  • Cartoonish Level: Level of the cartoon-like stylization. Applied only to the "Styled Face" pipeline starting from the "Indie" subscription plan.

Additional Textures

The list of the additional textures that can be generated along with the default one:

  • slightly_cartoonish_texture: Slightly smoother than regular texture.
    slightly_cartoonish_texture.jpg
  • smooth_eyelashes_texture: Regular texture with smoothen area of eyelashes.
    smooth_eyelashes_texture.jpg
  • lips_mask: Mask of the lips on the regular texture.
    lips_mask.jpg
  • cartoonish_texture: Uniformly colored texture with cartoon-like effect.
    cartoonish_texture.jpg

Textures availability:

Texture Name Face pipeline Head pipeline Styled Face pipeline Head 2.0 (head/mobile) Head 2.0 (bust/mobile)
slightly_cartoonish_texture Free - Indie - -
smooth_eyelashes_texture Plus - Plus - -
lips_mask Plus Plus Plus - -
cartoonish_texture - - Plus - -

See ParametersSample.cs for implementation details.

See also FAQ and the getting started instructions on the main page: Main Page.