expression

object

The expression object defines the type and the intensity of your actor’s facial expression. The expression type is defined using a string, while the intensity ranges from 0 (neutral expression) to 1 (maximum intensity).

Examples of expressions:
../../_images/expression_surprise_5.png

Surprise (intensity 1)

../../_images/expression_disgust_4.png

Disgust (intensity 0.75)

../../_images/expression_happiness_4.png

Happiness (intensity 0.75)

../../_images/expression_anger_5.png

Anger (intensity 1)

../../_images/expression_neutral.png

No expression (“none”)

../../_images/expression_fear_4.png

Fear (intensity 0.75)

../../_images/expression_mouth_open_2.png

Mouth open (intensity 0.25)

../../_images/expression_sadness_3.png

Sadness (intensity 0.5)

../../_images/expression_contempt_2.png

Contempt (intensity 0.25)

The expression object contains the following fields:

"expression": {
  "name": //The type of expression, such as happiness or disgust.
  "intensity": //The intensity of the expression, from 0 to 1.
}

Sample usage

Location in the data request

In the JSON hierarchy of the data request, the expression field is found here:

{
  "datapoints": [
    {
      "human": {
        "expression": {

        }
      }
    }
  ]
}

A sample complete expression object

"expression": {
  "name": "contempt",
  "intensity": 0.5
}

These values will generate a facial expression that looks like this:

../../_images/basiccontempt.png

name

string

The name field defines the type of expression that your actor will be wearing on their face.

../../_images/expression_anger_3.png

"name"="anger",

../../_images/expression_contempt_3.png

"name"="contempt",

../../_images/expression_disgust_3.png

"name"="disgust",

../../_images/expression_fear_3.png

"name"="fear",

../../_images/expression_happiness_3.png

"name"="happiness",

../../_images/expression_mouth_open_3.png

"name"="mouth_open",

../../_images/expression_neutral.png

"name"="none",

../../_images/expression_sadness_3.png

"name"="sadness",

../../_images/expression_surprise_3.png

"name"="surprise",

Sample usage

A sample name field and its location in the data request

In the JSON hierarchy of the data request, the name field is found here:

{
  "datapoints": [
    {
      "human": {
        "expression": {
          "name": "happiness",
        }
      }
    }
  ]
}

This value will generate an actor with a happy expression:

../../_images/happybasic.jpeg


intensity

Float

The intensity field defines the intensity of the actor’s facial expression from 0 (neutral expression) to 1 (full intensity). The intensity will be applied to the facial expression (happiness, surprise, etc.) that you defined in the name field above.

Here are examples of how the facial expression scales up as it moves from 0 to 1:

Note

In all cases, an expression of intensity 0 is indistinguishable from a neutral expression; we recommend you use a minimum intensity of 0.1.

Anger

../../_images/expression_anger_1.png

"intensity": 0.0

../../_images/expression_anger_2.png

"intensity": 0.25

../../_images/expression_anger_3.png

"intensity": 0.5

../../_images/expression_anger_4.png

"intensity": 0.75

../../_images/expression_anger_5.png

"intensity": 1.0

Contempt

../../_images/expression_contempt_1.png

"intensity": 0.0

../../_images/expression_contempt_2.png

"intensity": 0.25

../../_images/expression_contempt_3.png

"intensity": 0.5

../../_images/expression_contempt_4.png

"intensity": 0.75

../../_images/expression_contempt_5.png

"intensity": 1.0

Disgust

../../_images/expression_disgust_1.png

"intensity": 0.0

../../_images/expression_disgust_2.png

"intensity": 0.25

../../_images/expression_disgust_3.png

"intensity": 0.5

../../_images/expression_disgust_4.png

"intensity": 0.75

../../_images/expression_disgust_5.png

"intensity": 1.0

Fear

../../_images/expression_fear_1.png

"intensity": 0.0

../../_images/expression_fear_2.png

"intensity": 0.25

../../_images/expression_fear_3.png

"intensity": 0.5

../../_images/expression_fear_4.png

"intensity": 0.75

../../_images/expression_fear_5.png

"intensity": 1.0

Happiness

../../_images/expression_happiness_1.png

"intensity": 0.0

../../_images/expression_happiness_2.png

"intensity": 0.25

../../_images/expression_happiness_3.png

"intensity": 0.5

../../_images/expression_happiness_4.png

"intensity": 0.75

../../_images/expression_happiness_5.png

"intensity": 1.0

Mouth open

../../_images/expression_mouth_open_1.png

"intensity": 0.0

../../_images/expression_mouth_open_2.png

"intensity": 0.25

../../_images/expression_mouth_open_3.png

"intensity": 0.5

../../_images/expression_mouth_open_4.png

"intensity": 0.75

../../_images/expression_mouth_open_5.png

"intensity": 1.0

None

Note

The intensity field is ignored when the actor’s expression is defined as “none”.

../../_images/expression_neutral.png

Sadness

../../_images/expression_sadness_1.png

"intensity": 0.0

../../_images/expression_sadness_2.png

"intensity": 0.25

../../_images/expression_sadness_3.png

"intensity": 0.5

../../_images/expression_sadness_4.png

"intensity": 0.75

../../_images/expression_sadness_5.png

"intensity": 1.0

Surprise

../../_images/expression_surprise_1.png

"intensity": 0.0

../../_images/expression_surprise_2.png

"intensity": 0.25

../../_images/expression_surprise_3.png

"intensity": 0.5

../../_images/expression_surprise_4.png

"intensity": 0.75

../../_images/expression_surprise_5.png

"intensity": 1.0

Sample usage

A sample intensity field and its location in the data request

In the JSON hierarchy of the data request, the intensity field is found here:

{
  "datapoints": [
    {
      "human": {
        "expression": {
          "intensity": 5,
        }
      }
    }
  ]
}

This value will generate an actor with a very intense expression - in this case, disgust:

../../_images/disgustlevel5.png