Interact with the sky#

All 3D scenes include a sky that can be configured at run-time using the Web dashboard (or sphinx-cli).

Three main modes are available:

  • Static

  • Dynamic clouds

  • HDRI

Also, when activating intense lights mode, the lights are managed in a more physical way, making possible to reach high contrasts between shaded and sunny areas.

Here is the reference to all exposed parameters.

How to use static#

This is the default mode used for almost all 3D worlds. This mode uses the default sky provided by Unreal Engine for better performances. To set the sky mode to static, all you need to do is set the parameter mode to static.

Here is the command line example:

sphinx-cli param -m world sky/sky mode static

How to use dynamic clouds#

In this mode, the sky is filled with volumetric clouds, whose aspect is highly configurable by adjusting the parameters through the Web dashboard. It is activated when the parameter mode is set to dynamic.

The parameter weather_map takes the names of the texture representing the distribution of the clouds. These are the available distributions:

  • T_WeatherMap

  • T_WeatherMap_2

  • T_EV_DustPanner_01

  • T_soft_smoke

  • uniformclouds

  • TilingNoise05

Note

The parameters are correlated, you may need to find a suitable set of parameters for each texture.

Here is a command line example:

sphinx-cli param -m world sky/sky mode dynamic
sphinx-cli param -m world sky/sky clouds/weather_map TilingNoise05
sphinx-cli param -m world sky/sky clouds/clouds_coverage 2.25

before

=>

after

How to use HDRIs#

This mode allows you to display an HDR (high dynamic range) panoramic image all over the whole top hemisphere of the world. To activate this mode, you need to set the parameter mode to hdri.

The parameter hdri_texture takes the name of the HDR image to be used. Here is a command line example:

sphinx-cli param -m world sky/sky mode hdri
sphinx-cli param -m world sky/sky hdri/hdri_texture  cloudy_sun01
_images/hdri_texture.jpg

Below are listed the available images:

_images/cloudy_sun_01.jpg

cloudy_sun01#

_images/cloudy_sun_02.jpg

cloudy_sun02#

_images/cloudy_sun_03.jpg

cloudy_sun03#

_images/cloudy_sun_04.jpg

cloudy_sun04#

It is also possible to load external HDRI textures from png or jpg files. In that case, a configuration file needs to be passed to the UE4 application using the option -config-file=<file.yaml>.

parrot-ue4-empty -config-file=</path/to/file.yaml>

A configuration file could look like this:

Hdris:
  - Name: 'MyAwesomeHdri'
    FilePath: '/path/to/MyAwesomeHdri.png'
  - Name: 'MyEvenMoreAwesomeHdri'
    FilePath: '/path/to/MyEvenMoreAwesomeHdri.jpg'

The HDRI texture must contain not only the sky (i.e. the upper half of the sphere), but also the bottom half of the sphere, which should be set to a fully transparent alpha channel. Below is an example of such a texture.

_images/hdri_example.png

About the environment parameters#

Warning

The environment parameters affect both modes, HDRI and dynamic clouds but it has no effects on the static mode.

Adjust sun position#

We can set the elevation and the azimuth of the sun. By doing that you change the directions and size of the shadows.

sphinx-cli param -m world sky/sky environment/sun_elevation 10
_images/sun_elevation.jpg

Adjust sun size and brightness#

When using the dynamic mode, it is possible to change the size and the brightness of the sun by editing the parameters sun_size and sun_brightness.

sphinx-cli param -m world sky/sky environment/sun_size 10
sphinx-cli param -m world sky/sky environment/sun_brightness 20
_images/sun_brightness.jpg

Switching to ‘intense lights’ mode#

To activate this mode, you need to set the parameter use_intense_lights to true.

Once activated, the light intensity is physically calculated according to the sun position (elevation and azimuth). That implies that the lights will get really intense when the sun is located as high as possible.

intense_off

=>

intense_on

Below is a sunset ambiance when setting a low sun elevation:

_images/forest_sun_set.jpg

Sunset scenario in the world forest#

Reset action#

To set all sky parameters back to their initial values, you can:

  • either trigger the reset action belonging to the sky parameters.

  • or, simply perform a world reset.

sphinx-cli action -m world sky/sky reset

Advanced#

You can create your own lighting scenario by adjusting the different sky parameters. Keep in mind that all parameters are correlated, so you need to find a suitable set of parameters that allows you to create your own scenario (sunrise, sunset, night …).

Here is for example a recipe to create a night scenario.

sphinx-cli param -m world sky/sky mode dynamic
sphinx-cli param -m world sky/sky clouds/clouds_coverage 0
sphinx-cli param -m world sky/sky environment/sky_light_intensity 5
sphinx-cli param -m world sky/sky environment/sun_elevation -45
sphinx-cli param -m world sky/sky environment/use_intense_lights true
_images/forest_night_leds.jpg

Night scenario with leds activated#