How to create a lighting effect like the game Monaco

6

Stats

1,775 visits, 2,199 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 7 Dec, 2019.

Summary

The key to this effect is an interaction between the shadow light object and the source-in blend mode.

We create an image representing darkness and place it above the shadow light object (z-order). These two objects are isolated to their own transparent layer with force own texture on.

Any shadows created by the shadow light object now act as the destination (background) to the source (foreground aka the darkness image).

Source-in blend mode means wherever the destination is visible the source is visible. Wherever the destination is transparent the source is transparent. Therefore wherever there were shadows there is now our image.

Example effect:

Steps to Reproduce

  • Create a transparent layer with force own texture on. This layer should go above everything except your UI.
  • On that layer create an image representing darkness/shadow. In the example above darkness is a schematic of the current level.
  • On the same layer create a shadow light and place it under your darkness image (in terms of z order).
  • Set your darkness image's blend mode to source in.
  • 1 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • I don't suppose you could provide a capx? This seems simple but I can't get it to work.