Skylight Component

The skylight component illuminates the entire scene, similar to the ambient light component. There are two main differences:

  1. Objects are illuminated using 6 different colors, one for each main direction (a so called ‘ambient cube’). The ambient light component uses only 2 colors (top and bottom).
  2. The colors are dynamically computed from the scene. If the color of your sky changes, the ambient lighting of objects in the scene will reflect this.


The image above shows some objects lit only with the skylight component. Here the scene uses a skybox with blue sky, which is why the objects appear with a slightly blue tint.

Skylight vs. Ambient Light Component

The ambient light component uses a fixed color for lighting objects. Although you could animate those colors over time, for instance using a property animation (TODO), it is not possible to be directional. Using the skylight component you can have a bit of directional lighting.

In the image below the objects on the left are lit with an ambient light component. Note that the lighting is very flat. The objects on the right are lit with a skylight component. To demonstrate how it illuminates objects directionally, the skybox is set to have red, green and blue faces.

Skylight vs Ambient

Scene Setup

The skylight component continuously makes a 360 degree screenshot of the scene to capture the overall lighting. However, typically you don’t want to capture the entire scene, but only very few elements. Most notably, you want to capture the background sky, e.g. the skybox. You may also want to capture the ground. Finally, if you have distant background geometry, like a city backdrop or mountains, which the player can never reach, you may want to include those in your skylight snapshot as well, especially when that geometry can affect the visibility and thus brightness of the sky.

Therefore, the skylight component requires you to select those few objects and tag them, such that the update of the skylight only includes those objects.

By default the IncludeTags property is already set to SkyLight, which means that only objects with this tag will be used for computing the overall lighting. Consequently, you have to select objects, like your skybox, and assign that tag to them, otherwise the skylight will stay black.

The image below shows the ShowDebugInfo mode. Here the skylight component visualizes the geometry that is used to compute the skylight. In this case the skybox, the floor and the red object were all tagged with SkyLight, and therefore appear in the preview. The green box though, was not tagged and therefore does not affect the result.

Skylight Debug Vis


When you insert the skylight into the scene, it will override existing ambient lighting, and your scene may turn black. That’s because no object in the scene is yet contributing to the skylight. You need to add the proper tag on your sky to get the desired illumination.

Component Properties

See Also