background

The background object defines the background of the scene. When you select a background, you are defining not only the image that appears behind the actor, but also which ambient light sources are casting light on your scene, such as lamps, light bulbs, or the sun.

The background object contains the following fields. You can click on a field to learn more about it:

"background": {
  "id": //The UUID of the specific background that you want to place in the scene
  "transparent": //Whether the background is visible or transparent
  "rotation": //The orientation of the background relative to the camera and the actor
}

Note

The background object is required for all datapoints that depict a visual-spectrum image. It should be left out if your datapoint depicts an image under near-infrared lighting.


id

string

The id field selects a background from Datagen’s catalog of available backgrounds. The background that you choose provides not only an HDRI background image, but also an appropriate collection of light sources. For example, if your background image includes the sun, we will define a light source at that location and model the effects of direct sunlight on the scene, including reflections and shadows; the same is true for streetlamps, light bulbs, and other types of lighting that may appear in the image.

Tip

Datagen offers a unique background with lighting that simulates cross-polarization photography. To generate a datapoint with this background, enter the value 151c5b4a-3022-49a6-91f0-8749958e7ab7 into the id field.

Tip

To download a CSV with a complete list of background UUIDs, click here

Backgrounds are categorized…

by time of day

Morning

To download a CSV with a complete list of available of backgrounds with morning lighting, click here

Evening

To download a CSV with a complete list of available of backgrounds with evening lighting, click here

Night

To download a CSV with a complete list of available of backgrounds with nighttime lighting, click here

by location

Indoor

To download a CSV with a complete list of available of indoor backgrounds, click here

Outdoor

To download a CSV with a complete list of available of outdoor backgrounds, 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": [
    {
      "background": {
        "id": "101a0478-03e7-4e93-a33d-9bc22f6dbdbn4",
      }
    }
  ]
}


transparent

Bool

The transparent field defines whether the background is visible behind the actor or not. If you make the background transparent, all background-associated light sources (such as the sun or streetlamps) will still cast light on the scene, but the actor’s head will be the only visible physical object.

Sample usage

A sample transparent field and its location in the data request

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

{
  "datapoints": [
    {
      "background": {
        "transparent": false,
      }
    }
  ]
}

This value will generate a scene with a visible background.


rotation

64-bit float

The rotation field sets the orientation of the background relative to the actor in the scene.

When you select a background using the id field above, you are selecting a full background image and series of light sources that wrap 360° around your actor. The rotation field is useful for ensuring that a specific part of the background is directly behind the actor, or ensuring that the sun casts shadows in a specific direction, or ensuring that light sources are in specific locations relative to the camera lens.

../../_images/Rotation_15.png

"rotation"=15.0

../../_images/Rotation_0.png

"rotation"=0.0

../../_images/Rotation_-15.png

"rotation"=345.0

In the above examples, notice how the rotation of the background affects the following:

  • The angle between the actor and the fence behind her

  • The different locations of the darker green segment of the tree behind her.

  • Subtle shifts in the shadows on the actor’s skin, particularly noticeable on the right cheek and left collarbone

  • The changing location of a light source behind the camera, which can be seen reflected in the actor’s eyes

Sample usage

A sample rotation field and its location in the data request

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

{
  "datapoints": [
    {
      "background": {
        "rotation": 235.0
      }
    }
  ]
}

This value will generate a background that has been rotated by 235 degrees.