Skip to main content

On Face Prefabs

GLTF

"faces": [
{
"gltf": {
"@mesh": "path/to/gltf/model",
"rotation": "0.0 0.0 0.0",
"scale": "1.0 1.0 1.0",
"translation": "0.0 0.0 0.0",
"animation": {
"name": "Animation 1",
"mode": "loop",
"seek_position": 100
},
"@use_physics": true,
"gravity": "0.0 -1000.0 0.0",
"bones": {
"bone_1": 1.0,
"bone_2": 0.0,
"bone_3": 1.0,
"bone_4": 0.0,
"bone_5": 1.0
},
"colliders": [
{
"center": "0. 0. 0.",
"radius": 100.0
},
{
"center": "10. 110. 420.",
"radius": 650.0
},
{
"center": "14. 300. 156.",
"radius": 10.0
}
],
"constraints": [
{
"from": "bone_1",
"to": "bone_2",
"distance": 10.0
},
{
"from": "bone_2",
"to": "bone_3",
"distance": 50.0
},
{
"from": "bone_3",
"to": "bone_4",
"distance": 30.0
},
{
"from": "bone_4",
"to": "bone_5",
"distance": 60.0
}
],
"damping": 0.99
}
// ...
}
// ...
]

Place a 3D model in the GLTF format on the face.

ParameterDescriptionOptionalDefault Value

@mesh

Path to GLTF model. Note leading @ in parameter, it is mandatory.

++

rotation

Rotation angles (in radians) over X, Y, Z axes.

"0 0 0"

scale

Scale along X, Y, Z axes

"1 1 1"

translation

Translate the model along X, Y, Z axes (in millimetres).

"0 0 0"

animation

Play animation from GLTF file. All keys are optional (in most cases just empty object is enough to play the default animation)

Parameters:

name - Select animation from file by name

seek_position - Select animation from file by name

mode - ("off" | "loop" | "once" | "once_reversed" | "fixed") - how to play the animation selected by "name"

use_physics - where to start the animation (in ms).

{}

gravity

Sets gravitation vector along X, Y, Z axes.

"0 0 0"

bones

Sets bones inversed mass. Object, where key is a name of bone and parameter is an inversed mass.

[]

colliders

Add sphere colliders for physical bones. Array of objects, each object is a separate collider.

Parameters:

center - X, Y, Z coordinates of the center of sphere

radius - float radius of the sphere.

[]

constraints

Add constraint between two bones. Array of objects, each object is a one constraint.

Parameters:

from - "from" bone name

to - "t" bone name

[]

damping

Damping parameter for physics simulation, good values usually are in [0.9-1.0] range.

[]

Action Units

"faces": [
{
"action_units": {},
// ...
}
// ...
]

Enable action units from a GLTF model.

Eyes Whitening

Usage

"faces": [
{
"eyes_whitening": {
"strength": 1.0
}
// ...
}
// ...
]

Makes the look more expressive by whitening the eyes.

ParameterDescriptionOptionalDefault Value

strength

Eyes whitening. Float number in the range [0.0, 1.0]

++

Preview

Drag

Eyes Flare

Usage

"faces": [
{
"eyes_flare": {
"strength": 1.0
}
// ...
}
// ...
]

Apply flare to the eyes.

ParameterDescriptionOptionalDefault Value

strength

Flare brightness. Float number in the range [0.0, 1.0]

++

Preview

Drag

Teeth Whitening

Usage

"faces": [
{
"teeth_whitening": {
"strength": 1.0
}
// ...
}
// ...
]

Apply whitening to the teeth.

ParameterDescriptionOptionalDefault Value

strength

Teeth whitening. Float number in the range [0.0, 1.0].

++

Preview

Drag

Softlight

Usage

"faces": [
{
"softlight": {
"strength": 1.0,
"texture": "path/to/file"
}
// ...
}
// ...
]

Apply softlight to the face.

ParameterDescriptionOptionalDefault Value

strength

Softlight strength. Float number in the range [0.0, 1.0].

++

texture

Path to custom softlight texture.

1.0

Preview

Drag

Morphing

Morph (i.e. deform) certain parts of the face.

Usage

"faces": [
{
"morphing": {
"eyebrows": {
"spacing": 0.6,
"height": 0.1,
"bend": 1.0
},
"eyes": {
"rounding": 0.6,
"enlargement": 0.3,
"height": 0,
"spacing": 0.3,
"squint": 0.3,
"lower_eyelid_pos": 0,
"lower_eyelid_size": 0,
"down": 0,
"eyelid_upper": 0,
"eyelid_lower": 0
},
"face": {
"narrowing": 0,
"v_shape": 0,
"cheekbones_narrowing": 0,
"cheeks_narrowing": 0,
"jaw_narrowing": 0,
"chin_shortening": 0.3,
"chin_narrowing": 0,
"sunken_cheeks": 0.0,
"cheeks_jaw_narrowing": 0,
"jaw_wide_thin": 0,
"chin": 0,
"forehead": 0.3
},
"nose": {
"width": 0.3,
"length": 0.2,
"tip_width": 0.1,
"down_up": 0.1,
"sellion": 0.2
},
"lips": {
"size": 0.4,
"height": 1.0,
"thickness": 0.1,
"mouth_size": 0.2,
"smile": 0.8,
"shape": 0.4,
"sharp": 0.6
}
}
// ...
}
// ...
]

All settings are optional.

Eyebrows

ParameterDescriptionOptionalDefault Value

spacing

Adjusting the space between the eyebrows [-1; 1].

0.0

heightheight

Raising/lowering the eyebrows [-1; 1].

0.0

bend

Adjusting the bend of the eyebrows [-1; 1].

0.0

Eyes

ParameterDescriptionOptionalDefault Value

rounding

Adjusting the roundness of the eyes [0; 1].

0.0

enlargement

Enlarging the eyes [0; 1].

0.0

height

Raising/lowering the eyes [-1; 1].

0.0

spacing

Adjusting the space between the eyes [-1; 1].

0.0

squint

Making the person squint by adjusting the eyelids [-1; 1]

0.0

lower_eyelid_pos

Raising/lowering the lower eyelid [-1; 1].

0.0

lower_eyelid_size

Enlarging/shrinking the lower eyelid [-1; 1].

0.0

down

Eyes down [0; 1].

0.0

eyelid_upper

Eyelid upper [0; 1].

0.0

eyelid_lower

Eyelid lower [0; 1].

0.0

Face

ParameterDescriptionOptionalDefault Value

narrowing

Narrowing the face [0; 1].

0.0

v_shape

Shrinking the chin and narrowing the cheeks [0; 1].

0.0

cheekbones_narrowing

Narrowing the cheekbones [-1; 1].

0.0

cheeks_narrowing

Narrowing the cheeks [0; 1].

0.0

jaw_narrowing

Narrowing the jaw [0; 1].

0.0

chin_shortening

Decreasing the length of the chin [0; 1].

0.0

chin_narrowing

Narrowing the chin [0; 1].

0.0

sunken_cheeks

Sinking the cheeks and emphasizing the cheekbones [0; 1].

0.0

cheeks_and_jaw_narrowing

Narrowing the cheeks and the jaw [0; 1].

0.0

jaw_wide_thin

Jaw wide/thin [0; 1].

0.0

chin

Face chin [0; 1].

0.0

forehead

Forehead [0; 1].

0.0

Nose

ParameterDescriptionOptionalDefault Value

width

Adjusting the nose width [-1; 1].

0.0

length

Adjusting the nose length [-1; 1].

0.0

tip_width

Adjusting the nose tip width [0; 1].

0.0

down_up

Nose down/up [0; 1].

0.0

sellion

Nose sellion [0; 1].

0.0

Lips

ParameterDescriptionOptionalDefault Value

size

Adjusting the width and vertical size of the lips [-1; 1].

0.0

height

Raising/lowering the lips [-1; 1].

0.0

thickness

Adjusting the thickness of the lips [-1; 1].

0.0

mouth_size

Adjusting the size of the mouth [-1; 1].

0.0

smile

Making a person smile [0; 1].

0.0

shape

Adjusting the shape of the lips [-1; 1].

0.0

sharp

Lips sharp [0; 1].

0.0

Preview

Drag

Eyes

Eyes recoloring.

Usage

"faces": [
{
"eyes": {
"eyes": "0 0.2 0.8 0.64",
"corneosclera": "1 1 1 1",
"pupil": "0 0 0 1"
}
// ...
}
// ...
]
ParameterDescriptionOptionalDefault Value

eyes

Eyes (i.e. iris) color. See note about color format above.

"0 0 0"

corneosclera

Corneosclera ("sclera" in everyday language) color.

"0 0 0"

pupil

Pupil color. See note about color format above.

"0 0 0"

Preview

Drag

Hair

Hair recoloring.

"faces": [
{
"hair": {
"color": [
"0.19 0.06 0.25",
"0.09 0.25 0.38"
]
}
// ...
}
// ...
]
ParameterDescriptionOptionalDefault Value

color

Apply solid color if one element supplied or gradient recoloring if array (like stands in the sample). See note about color format above.

"0 0 0"

Preview

Drag