Table of Contents

Environments

Environments define the sun light, atmosphere, water coloring and skybox. The configuration is done in .env.lua files and basically look like this:

function data()
  return {
    atmosphere = {...},
    light = {...},
    shadows = {...},
    water = {...},
 
    skyBox = {...},
    useSkyBoxOverwrite = false,
  }
end

Atmosphere

The atmosphere struct contains several properties which are used to simulate the atmospheric light model in the game.

The following properties are adjusted in the simulation

The following properties affect the sun and the moon:

The clouds are configured with the following properties:

The mie model describes the amount of scattered light for aerosols (i.e. particles bigger than the visible wavelength) like fog, droplets, haze, etc. The scattered light is independent of wavelength and affects mostly the horizon. Dry climates tend to have low amounts of such particles.

In the real world, the atmosphere usually has a blue sky at daylight and some red colors in the morning and evening at dawn and sunset. This is caused by the rayleigh scattering phenomena. It describes the amount of scattered light due to air molecules (i.e. particles smaller than the wavelength of light). Its effect is highly dependent on wavelength and affects the entire atmosphere: longer wavelengths (blue-like) are more scattered (this makes the sky blue), while shorter wavelengths (red-like) are more likely to be transmitted (this makes the sunset red).

The ozone model describes the amount of light absorption due to ozone layer. It does not scatter the light.

Additional advanced atmosphere parameters are:

It is recommended to use the ingame debug tools to experiment with the values.

Light

The light struct consists of several properties:

Sky

While most of the sky box is dynamic, there are a few textures used for the elements on the sky:

Water


less and more intense waves

The water effects are adjusted with the properties in the water struct:

Most of the properties for water effects can be controlled with the ingame debug tools too.