**This is an old revision of the document!**

Layer Effects

This is a new feature that will be available in the next version of GDevelop.

You can add effects to the layers of your scene. These effects allow to quickly changes the atmosphere and rendering of your game. For example, here is the sepia effect added to the isometric-game example:

Multiple effects are bundled with GDevelop and in the future, you'll be able to install new ones from extensions.

Adding an effect to a layer

In the scene editor, open the Layers Editor.

Find the Base Layer, or another layer, and click on “Add Effect” button.

The next window is showing the effects currently applied on the layer - none of now. Click on “Add an effect”.

A new effect called “Effect” is created. This name will be useful later for modifying the parameters of the effect during the game.

Choose the type of the effect. Click on the selector and choose one.

The window now shows the parameters for the effect - these parameters depends on the effect type that was chosen.

You can let the default parameters or change them now. Values of parameters usually go from 0 (deactivated) to 1.

Try the game with the effect

Launch a preview to see the effect applied. The effect is applied on the whole layer, so all the objects on the layer will be part of the effect.

If you have multiple layers, you can add the same effect to all of your layers.

For example, if you have a Background layer, the base layer and a UI layer (showing the interface of the game), you might want to add effects to the Background layer and the base layer - but not to the UI one
The background color of the scene cannot have any effect applied. If you want to have an effect applied on it, use a Tiled Sprite (using an image with a single color, or some other background image) that you position behind the other objects, with the size of the game window.

Changing effect parameters during the game

Using events, you can manipulate the parameters during the game. It can be useful for different situations: a day-night cycle, a flashback effect, etc…

First, check out the name of the effect and the name of the parameter to change in the Layers Editor. For this, open the Layers Editor, then edit the effects of a layer. Note the name of the effect and the name of a parameter.

In this example, a night effect is called “Effect” and has two parameters “opacity” and “intensity”:

You can then add an event with an action called “Effect Parameter”:

  • Enter first the layer name (don't forget the quotes). For the base layer, enter an empty string ("").
  • Enter the name of the effect, for example "Effect".
  • Enter the name of the parameter, for example "opacity" or "intensity".
  • Finally, enter the new value to be set for this parameter.
All of these names are case sensitive. In particular the parameter names are lowercased. Be sure to double check the name of your effect and parameters.

Here is an example of an action to change the opacity of an effect called “Effect” on the base layer: