The datagen.api.catalog.eyes.count() function tells you how many eyes assets match your query. You can count how many eyes assets there are in total, or filter the catalog using eye attributes.
To count the full set of eyes assets:
fromdatagen.apiimportcatalogcatalog.eyes.count()
401
To count the number of eyes assets that match certain attributes (see below for the list of valid eye attributes):
When you get an eyes object from the catalog, you can edit that object in certain ways. These are the editable properties of eyes objects:
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 property defines the color and texture of the actor’s eyes. Datagen has hundreds of eye textures available in the following colors:
Amber
To download a CSV with a complete list of amber eye textures, click here
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
Gray
To download a CSV with a complete list of gray eye textures, click here
Green
To download a CSV with a complete list of green eye textures, click here
Hazel
To download a CSV with a complete list of hazel eye textures, click here
eyelid_closure
64-bit float
The eyelid_closure property defines how much the actor’s eyes are closed. Valid values for this property range from 0 (fully open) to 1 (fully closed).
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.
This code takes a pair of eyes from the catalog and changes the default direction of gaze:
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 right, while the +x direction is to the eye’s left.
The -y direction is directly ahead of the eye, while the +y direction is directly behind the eye.
The -z direction is straight down, while the +z direction is straight up.
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.
Combined with the distance property below, the vector and distance define a single point in space; each eye will be oriented towards that point. Here are two examples:
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.#
distance
64-bit float
The distance property 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 property 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.