Environment

class Environment
property id

The id of the environment.

Type

str, read-only

property name

The name of the environment.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

property group

The group of the environment.

Type

EnvironmentGroup

Raises

ReadOnlyError -- If Database is in read only mode.

property gamma

The gamma value of the environment image.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property saturation

The color saturation of the environment image.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property mapping_type

The projection method for the type of HDRI image.

Type

MappingType

Raises

ReadOnlyError -- If Database is in read only mode.

property inverted

Whether the projection of the environment image is inverted.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property diffuse_exposure

The influence of the exposure of the environment on the diffuse layer of a material.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property lightmap_coloration

The influence of the environment color on the diffusion of the materials using lighting textures.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property specular_exposure

The influence of the exposure of the environment on the specular or reflection layer of a material.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property specular_resolution

The resolution of the image used for adjusting the mirroring in pixels.

Type

Resolution

Raises

ReadOnlyError -- If Database is in read only mode.

property improve_mipmaps_quality

Whether to eliminate whitening and aliasing effects environment reflections on sharp geometries in scenes with very intense areas.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property background_exposure

The influence of the exposure of the environment on the background.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property altitude

The altitude of the background.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property background_resolution

The resolution of the image used for the background.

Type

Resolution

Raises

ReadOnlyError -- If Database is in read only mode.

property alternative_background_map

The high resolution texture in a low dynamic range format (JPG, PNG...) to be used instead of the HDR environment for environment materials or None if there is no map assigned.

Type

Texture or None

Raises

ReadOnlyError -- If Database is in read only mode.

property parallax_correction_type

The proxy surface type used in parallax correction.

Type

GeometryType

Raises

ReadOnlyError -- If Database is in read only mode.

property parallax_correction_aabb_min

The min of the bounding box used in parallax correction.

Type

Vector3

Raises

ReadOnlyError -- If Database is in read only mode.

property parallax_correction_aabb_max

The max of the bounding box used in parallax correction.

Type

Vector3

Raises

ReadOnlyError -- If Database is in read only mode.

property parallax_correction_hemisphere_center

The center of the hemisphere used in parallax correction.

Type

Vector3

Raises

ReadOnlyError -- If Database is in read only mode.

property parallax_correction_hemisphere_radius

The radius of the hemisphere used in parallax correction.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property parallax_correction_surface

The surface used in parallax correction.

Type

Surface

Raises

ReadOnlyError -- If Database is in read only mode.

property is_local_env

Whether the environment is local.

Type

bool, read-only

property local_env_product

The corresponding product id for the local environment.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

property local_env_position

The origin point at which the local environment will be captured by providing the origin's XYZ coordinates.

Type

Vector3

Raises

ReadOnlyError -- If Database is in read only mode.

property local_env_radius

The size of the capture box.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property local_env_resolution

The resolution of the environment texture at a chosen resolution.

Type

Resolution

Raises

ReadOnlyError -- If Database is in read only mode.

property local_env_surfaces_tags

The tag of the surfaces to be ignored by the local environment.

Type

list(str)

Raises

ReadOnlyError -- If Database is in read only mode.

duplicate()

Duplicate this environment.

Returns

The duplicated environment.

Return type

Environment

Raises

ReadOnlyError -- If Database is in read only mode.

orientation_in_product(product)

Get orientation, in degrees, for the current Environment in the Product.

Parameters

product (Product) -- Product in which the environment orientation will be returned.

Returns

The orientation of the environment in degrees.

Return type

Vector3

set_orientation_in_product(product, orientation)

Set orientation, in degrees, for the current Environment in the Product.

Parameters
  • product (Product) -- Product in which the environment orientation will be modified.

  • orientation (Vector3) -- The orientation of the environment, in degrees, overriding the default orientation.

Raises

ReadOnlyError -- If Database is in read only mode.

encoded_data(format, compression=- 1)

Get the encoded data of the environment.

Parameters
  • format (str) -- The file format to encode the image to (exr, hdr).

  • compression (int) -- The compression value to use while encoding. The value to use depend on the format (e.g. 0 to 100 for JPEG, 0 to 9 for PNG). -1 means default compression value.

Returns

The encoded data.

Return type

bytes

export_kev(filename)

Export the environment to a KEV file.

Parameters

filename (str) -- KEV filename.

Raises

FileNotFoundError -- If the destination directory does not exist.

remove(force=False)

Delete this environment

Note

By default, only not used environments can be deleted (InUseError is raised otherwise), use force to force deletion of used environments.

Parameters

force (bool) -- Force the deletion of the environment even if it is in use.

Raises

GeometryType

class GeometryType
NONE = 0

None.

BOX = 1

Box.

HEMISPHERE = 2

Hemisphere.

MappingType

class MappingType
ANGULAR_MAP = 0

Angular Map (Light Probe).

LONGITUDE_LATITUDE = 1

Longitude Latitude.

VERTICAL_CROSS = 2

Vertical Cross.

Resolution

class Resolution
RES_128 = 128

128 x 128 x 6 faces.

RES_256 = 256

256 x 256 x 6 faces.

RES_512 = 512

512 x 512 x 6 faces.

RES_1024 = 1024

1024 x 1024 x 6 faces.

RES_2048 = 2048

2048 x 2048 x 6 faces.

RES_4096 = 4096

4096 x 4096 x 6 faces.

RES_8192 = 8192

8192 x 8192 x 6 faces.