Changing Environment

Now that we have multiple levels, and a way to move between levels, it might be interesting to have different lighting and look on some levels.

You may have noticed the icon Environment node at the top of the scene tree. This holds the settings controlling things like the background, some lighting and effects like fog and glow.

Enviroment Node

Environment Value

Now, unless you want to make your Environment changes apply to all your scenes, make sure it’s “unlinked” first.

Make Unique

It should look something like this:

Dark Environment 1

All of the light that we have now is from the Sun directional light node.

The Sun Node

No screenshot necessary. It’s pitch black, right?

Well, at night we don’t really have any light from the sun, so let’s try and bring some light of our own.

Add OmniLight3D

The new light will be placed at the origin of the player. That looks a little wierd, so we’ll move it a bit. As if the light was just in front of the player.

OmniLight3D positioning

Notice how the light moves with the player. This is because we added the light as a child of the player.

Here’s an example how this can look:

Example

While it’s tempting to add lights on the coins, be aware that many light may affect performance. Even on Gamer grade hardware!