facial_hair

object

The facial_hair object is responsible for setting the style, color, and other attributes of the actor’s facial hair.

This object is optional; if you do not want your actor to have facial hair, simply leave it out or set it equal to null.

Note

If the facial_hair object is included, all of its child objects must be included as well.

The facial_hair object contains the following fields:

"facial_hair": {
  "id": //A UUID that defines the actor's facial hair style
  "color_settings": {
    "melanin": //The amount of black color in the facial hair
    "redness": //The amount of red color in the facial hair
    "whiteness": //How much the facial hair has gone grey or, at higher values, white
    "roughness": //How diffuse light as it reflects off of the hairs, which defines how shiny or dull the hair is
    "index_of_refraction": //How much light rays change direction as they travel through the hairs
  }
},

Sample usage

Location in the data request

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

{
  "datapoints": [
    {
      "human": {
        "head": {
          "facial_hair": {

          },
        }
      },
    }
  ]
}

A sample complete :code:`facial_hair` object

"facial_hair": {
  "id": "c1b73754-2738-4ca9-9147-db7e869a5811",
  "color_settings": {
    "melanin": 1,
    "redness": 0,
    "whiteness": 0.7,
    "roughness": 0.2,
    "index_of_refraction": 1.4
  }
},

This set of values will generate a black beard that has greyed almost to the point of being white.

id

string

The id field defines the shape, styling, and length of the actor’s facial hair, selecting it from our catalog of facial hair types. This field does not define the facial hair’s color or how it reflects light.

Tip

To download a CSV with a complete list of facial hair styles, click here

Our facial hair types are categorized by style:

Beards

To download a CSV with a complete list of the UUIDs that define beards, click here

Full beards

To download a CSV with a complete list of the UUIDs that define full beards, click here

Mustaches

To download a CSV with a complete list of the UUIDs that define mustaches, click here

Partial beards

To download a CSV with a complete list of the UUIDs that define partial beards, click here

Stubble

To download a CSV with a complete list of the UUIDs that define stubble styles, 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": {
          "facial_hair": {
            "id": "a3643b68-4e08-4c6c-a8a1-286281602ccb",
          },
        }
      }
    }
  ]
}

This value will give the actor in your scene a beard.


color_settings

object

The color_settings object contains a variety of controls that you can use to adjust the color and shine of the actor’s facial hair.

The color_settings object contains the following fields:

"color_settings": {
  "melanin": //The amount of melanin in the facial hair, which defines how dark it is
  "redness": //The ratio between pheomelanin and eumelanin, which defines how red it is
  "whiteness": //How much the facial hair has gone grey or white
  "roughness": //How diffuse light as it reflects off of the hairs, which defines how shiny or dull the hair is
  "index_of_refraction": //How much light rays change direction as they travel through the hairs
},

Sample usage

Location in the data request

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

{
  "datapoints": [
    {
      "human": {
        "head": {
          "facial_hair": {
            "color_settings": {

            }
          }
        }
      }
    }
  ]
}

A sample complete color_settings object

"color_settings": {
  "melanin": 0.25,
  "redness": 0,
  "whiteness": 0.4,
  "roughness": 0.25,
  "index_of_refraction": 1.45
}

These values will generate blond facial hair that has begun to go grey.


melanin and redness

floats

The melanin and redness values together define the color of the actor’s facial hair. Melanin is the amount of black color in the hairs; redness is the amount of red. Both fields can accept floating-point values between 0 and 1:

Facial hair melanin vs. redness
../../_images/Facial_Hair_Melanin_0_Redness_0.png

"melanin"=0 "redness"=0

../../_images/Facial_Hair_Melanin_0_Redness_0.25.png

"melanin"=0 "redness"=0.25

../../_images/Facial_Hair_Melanin_0_Redness_0.5.png

"melanin"=0 "redness"=0.5

../../_images/Facial_Hair_Melanin_0_Redness_0.75.png

"melanin"=0 "redness"=0.75

../../_images/Facial_Hair_Melanin_0_Redness_1.png

"melanin"=0 "redness"=1

../../_images/Facial_Hair_Melanin_0.25_Redness_0.png

"melanin"=0.25 "redness"=0

../../_images/Facial_Hair_Melanin_0.25_Redness_0.25.png

"melanin"=0.25 "redness"=0.25

../../_images/Facial_Hair_Melanin_0.25_Redness_0.5.png

"melanin"=0.25 "redness"=0.5

../../_images/Facial_Hair_Melanin_0.25_Redness_0.75.png

"melanin"=0.25 "redness"=0.75

../../_images/Facial_Hair_Melanin_0.25_Redness_1.png

"melanin"=0.25 "redness"=1

../../_images/Facial_Hair_Melanin_0.5_Redness_0.png

"melanin"=0.5 "redness"=0

../../_images/Facial_Hair_Melanin_0.5_Redness_0.25.png

"melanin"=0.5 "redness"=0.25

../../_images/Facial_Hair_Melanin_0.5_Redness_0.5.png

"melanin"=0.5 "redness"=0.5

../../_images/Facial_Hair_Melanin_0.5_Redness_0.75.png

"melanin"=0.5 "redness"=0.75

../../_images/Facial_Hair_Melanin_0.5_Redness_1.png

"melanin"=0.5 "redness"=1

../../_images/Facial_Hair_Melanin_0.75_Redness_0.png

"melanin"=0.75 "redness"=0

../../_images/Facial_Hair_Melanin_0.75_Redness_0.25.png

"melanin"=0.75 "redness"=0.25

../../_images/Facial_Hair_Melanin_0.75_Redness_0.5.png

"melanin"=0.75 "redness"=0.5

../../_images/Facial_Hair_Melanin_0.75_Redness_0.75.png

"melanin"=0.75 "redness"=0.75

../../_images/Facial_Hair_Melanin_0.75_Redness_1.png

"melanin"=0.75 "redness"=1

../../_images/Facial_Hair_Melanin_1_Redness_0.png

"melanin"=1 "redness"=0

../../_images/Facial_Hair_Melanin_1_Redness_0.25.png

"melanin"=1 "redness"=0.25

../../_images/Facial_Hair_Melanin_1_Redness_0.5.png

"melanin"=1 "redness"=0.5

../../_images/Facial_Hair_Melanin_1_Redness_0.75.png

"melanin"=1 "redness"=0.75

../../_images/Facial_Hair_Melanin_1_Redness_1.png

"melanin"=1 "redness"=1

As you can see in the images above, the relationship between melanin and redness is not linear. The two influence each other greatly. At very high and very low concentrations of melanin, changing the redness has little or no effect. When melanin has medium-level values, the effects of redness are more noticeable.

The values for typical hair colors are:

Blonde: melanin=0.2, redness=0

Red: melanin=0.5, redness=1

Black: melanin=1, redness=0

Dark brown: melanin=0.8, redness=0.2

Light brown: melanin=0.5, redness=0.6

Sample usage

Sample melanin and redness fields and their location in the data request

In the JSON hierarchy of the data request, the melanin and redness fields are found here:

{
  "datapoints": [
    {
      "human": {
        "head": {
          "facial_hair": {
            "color_settings": {
              "melanin": 0.5,
              "redness": 0.6,
            }
          }
        }
      }
    }
  ]
}

These values will generate light brown facial hair.


whiteness

64-bit float

The whiteness field defines how much of the hair has begun to go grey or white. This field accepts floating-point values from 0 (no white hairs) to 1 (fully white).

API/Upload JSON/images/Facial_Hair_Whiteness_0.png

Whiteness=0

API/Upload JSON/images/Facial_Hair_Whiteness_0.25.png

Whiteness=0.25

API/Upload JSON/images/Facial_Hair_Whiteness_0.5.png

Whiteness=0.5

API/Upload JSON/images/Facial_Hair_Whiteness_0.75.png

Whiteness=0.75

API/Upload JSON/images/Facial_Hair_Whiteness_1.png

Whiteness=1

While the increase in grey and white hairs using this field is not strictly linear, it is still useful to think of this value as whitening the hair roughly in percentage terms. As a rule, values between 0.4 and 0.7 generate greying facial hair, while values above 0.7 generate white facial hair.

Sample usage

A sample whiteness field and its location in the data request

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

{
  "datapoints": [
    {
      "human": {
        "head": {
          "facial_hair": {
            "color_settings": {
              "whiteness": 0.7,
            }
          }
        }
      }
    }
  ]
}

This value will generate facial hair that has gone mostly grey and begun to go white.


roughness

64-bit float

The roughness field affects the reflectivity of the hair. The rougher the surface of the hair, the more light gets absorbed within it and gets reflected as diffuse light rather than mirror-like reflections.

This field accepts floating-point values from 0.15 to 0.5.

../../_images/Facial_Hair_Roughness_0.15.png

"roughness"=0.15

../../_images/Facial_Hair_Roughness_0.255.png

"roughness"=0.255

../../_images/Facial_Hair_Roughness_0.5.png

"roughness"=0.5

Sample usage

A sample roughness field and its location in the data request

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

{
  "datapoints": [
    {
      "human": {
        "head": {
          "facial_hair": {
            "color_settings": {
              "roughness": 0.17,
            }
          }
        }
      }
    }
  ]
}

This value will generate glossy facial hair.


index_of_refraction

64-bit float

The index_of_refraction field affects how the hair bends light that is traveling through it. All hair is at least somewhat translucent, lighter hair in particular. Simulating the changes in the direction of light rays as they travel through the hair is an important part of making hair look realistic.

This field accepts floating-point values from 1.4 to 1.65.

../../_images/Facial_Hair_IOR_1.4.png

"index_of_refraction"=1.4

../../_images/Facial_Hair_IOR_1.525.png

"index_of_refraction"=1.525

../../_images/Facial_Hair_IOR_1.65.png

"index_of_refraction"=1.65

Although the above images may appear to be in different colors, they all have the same amount of melanin; the only change is in how light reflects inside and through the individual hairs.

Sample usage

A sample index_of_refraction field and its location in the data request

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

{
  "datapoints": [
    {
      "human": {
        "head": {
          "facial_hair": {
            "color_settings": {
              "index_of_refraction": 1.4,
            }
          }
        }
      }
    }
  ]
}

This value will generate hair with a low index of refraction (for hair).