Environment

data class Environment(val indirectLight: IndirectLight? = null, val skybox: Skybox? = null, val sphericalHarmonics: List<Float>? = null)

Indirect light and skybox environment for a Scene

Environments are usually captured as high-resolution HDR equirectangular images and processed by the cmgen tool to generate the data needed by IndirectLight.

You can also process an hdr at runtime but this is more consuming.

  • Currently IndirectLight is intended to be used for "distant probes", that is, to represent global illumination from a distant (i.e. at infinity) environment, such as the sky or distant mountains. Only a single IndirectLight can be used in a Scene. This limitation will be lifted in the future.

  • When added to a Scene, the Skybox fills all untouched pixels.

See also

IndirectLight.Builder
Skybox.Builder

Constructors

Link copied to clipboard
constructor(indirectLight: IndirectLight? = null, skybox: Skybox? = null, sphericalHarmonics: List<Float>? = null)

Properties

Link copied to clipboard
val indirectLight: IndirectLight? = null

IndirectLight is used to simulate environment lighting.

Link copied to clipboard
val skybox: Skybox? = null

The Skybox is drawn last and covers all pixels not touched by geometry.

Link copied to clipboard

Spherical harmonics from the content of a KTX file.