eyes

The eyes object is responsible for constructing the eyes of the human actor in your scene. These fields define the eye color, direction of gaze, and the amount that the eyelids are closed.

The eyes object contains the following fields:

"eyes": {
  "id": //A UUID that defines the texture used in the eyes
  "target_of_gaze": {
    "direction": {
      //The x, y, and z components of the vector to the target of the eyes' gaze
    },
    "distance": //The distance between the eyes and the target of their gaze
  },
  "eyelid_closure": //The amount by which the eyelids are closed
},

Sample usage

Location in the data request

In the JSON hierarchy of the data request, the eyes object is found here:

{
  "datapoints": [
    {
      "human": {
        "head": {
          "eyes": {

          },
        }
      }
    }
  ]
}

A sample complete eyes object

"eyes": {
  "id": "1a51d75a-4e6f-43d2-ab6d-52e2e7ae69df",
  "target_of_gaze": {
    "direction": {
      "x": 0.0
      "y": -0.817,
      "z": 0.577,
    },
    "distance": 15.0
  },
  "eyelid_closure": 0.0
},

The values above will generate a pair of green eyes looking slightly upward.

id

string

The UUID of the texture that you want to apply to the eyes.

Tip

To download a CSV with a complete list of eye textures, click here

This field defines the color and texture of the actor’s eyes. Datagen has hundreds of eye textures available in the following colors:

Blue

To download a CSV with a complete list of blue eye textures, click here

Brown

To download a CSV with a complete list of brown eye textures, click here

Green

To download a CSV with a complete list of green eye textures, click here

Sample usage

A sample id field and its location in the data request

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

{
  "datapoints": [
    {
      "human": {
        "head": {
          "eyes": {
            "id": "256f4994-a6b2-4263-ac25-8eb556c768ca",
          },
        }
      }
    }
  ]
}

The value above will generate a pair of brown eyes.


target_of_gaze

object

The target_of_gaze object defines the point in space that the actor’s eyes are focused on.

The target point is defined based on direction and distance from an origin: the midpoint between the center of the actor’s left pupil and the center of the actor’s right pupil.

The target_of_gaze object contains the following fields:

"target_of_gaze": {
  "direction": {
    //The x, y, and z components of the normalized vector coming out of the midpoint between the actor's pupils
  },
  "distance": //The distance between the midpoint between the actor's pupils and the target of the actor's gaze
},

Sample usage

Location in the data request

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

{
  "datapoints": [
    {
      "human": {
        "head": {
          "eyes": {
            "target_of_gaze": {

            },
          }
        }
      }
    }
  ]
}

A sample complete target_of_gaze object

"target_of_gaze": {
  "direction": {
    "x": 0.5
    "y": -0.86603,
    "z": 0.0,
  },
  "distance": 15.0
},

The values above will generate eyes that are looking in this direction:

../../_images/target_of_gaze_left.jpg


direction

object

The direction object contains the x, y, and z components of a normalized vector that defines the direction that the actor’s eyes are pointing.

This vector is defined in the eye space, meaning that if the head is turned or tilted all of these directions will be turned or tilted along with it.

  • The +x direction is to the eye’s left, while the -x direction is to the eye’s right.

  • The +y direction is directly ahead of the eye, while the -y direction is directly behind the eye.

  • The +z direction is straight up, while the -y direction is straight down.

The origin point for this normalized vector is the midpoint between the center of the actor’s left pupil and the center of the actor’s right pupil; the directions are in the head space.

Some sample values for the direction object:

../../_images/target_of_gaze_upper_right.jpg

x=-0.24184

y=-0.93969

z=0.24184

../../_images/target_of_gaze_up.jpg

x=0

y=-0.95106

z=0.30902

../../_images/target_of_gaze_upper_left.jpg

x=0.24184

y=-0.93969

z=0.24184

../../_images/target_of_gaze_right.jpg

x=-0.5

y=-0.86603

z=0

../../_images/target_of_gaze_forward.jpg

x=0

y=-1

z=0

../../_images/target_of_gaze_left.jpg

x=0.5

y=-0.86603

z=0

../../_images/target_of_gaze_lower_right.jpg

x=-0.35355

y=-0.86603

z=-0.35355

../../_images/target_of_gaze_down.jpg

x=0

y=-0.85717

z=-0.51504

../../_images/target_of_gaze_lower_left.jpg

x=0.35355

y=-0.86603

z=-0.35355

Combined with the distance field below, the vector and distance define a single point in space; each eye will be oriented towards that point. Here are two examples:

../../_images/gaze_diagram.jpg

The gaze vectors for each eye (one pair of examples in blue, one pair of examples in green) will be calculated based on the direction from the eye to the selected point in space.

The direction object contains the following fields:

"direction": {
  "x": //The x component of the normalized vector
  "y": //The y component of the normalized vector
  "z": //The z component of the normalized vector
},

All three components should be entered as type 64-bit float, with values between -1 and 1.

Sample usage

Location in the data request

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

{
  "datapoints": [
    {
      "human": {
        "head": {
          "eyes": {
            "target_of_gaze": {
              "direction": {

              },
            }
          }
        }
      }
    }
  ]
}

A sample complete direction object

"direction": {
  "z": 0.0,
  "y": -1.0,
  "x": 0.0
},

These values will generate a pair of eyes looking in this direction:

../../_images/target_of_gaze_forward.jpg


distance

64-bit float

The distance field defines the distance, in meters, between the point of origin and the target of the actor’s gaze. This determines how much the actor is crossing or diverging their eyes. In combination with the normalized vector defined in the direction object above, the direction and distance define a single point some distance away from the head, which each eye is focused on.

The point of origin, from which this distance will be measured, is the midpoint between the center of the actor’s left pupil and the center of the actor’s right pupil.

Distance to target of gaze
../../_images/Eye_Gaze_0.1.png

"distance"=0.1

../../_images/Eye_Gaze_1.png

"distance"=1

../../_images/Eye_Gaze_15.png

"distance"=15

Sample usage

A sample distance field and its location in the data request

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

{
  "datapoints": [
    {
      "human": {
        "head": {
          "eyes": {
            "target_of_gaze": {
              "distance": 1000.0
            },
          }
        }
      }
    }
  ]
}

This value will generate a pair of eyes looking at an object 1000 meters away:

../../_images/eye-gaze-1000_m.png


eyelid_closure

64-bit float

The eyelid_closure field defines how much the actor’s eyes are closed. Valid values for this field range from 0 (fully open) to 1 (fully closed).

../../_images/eyelid_closure_0.png

"eyelid_closure"=0

../../_images/eyelid_closure_0.25.png

"eyelid_closure"=0.25

../../_images/eyelid_closure_0.5.png

"eyelid_closure"=0.5

../../_images/eyelid_closure_0.75.png

"eyelid_closure"=0.75

../../_images/eyelid_closure_1.png

"eyelid_closure"=1

Note

If your actor is looking down, their eyes will automatically be closed at least some amount.

Sample usage

A sample eyelid_closure field and its location in the data request

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

{
  "datapoints": [
    {
      "human": {
        "head": {
          "eyes": {
            "eyelid_closure": 0.5
          }
        }
      }
    }
  ]
}

This value will generate eyes that are closed approximately halfway:

../../_images/eyelid_closure_0.5_second.png