'How to darken/lighten a part of a mesh in babylon js

I’m developing a minigame where you have to point the spotlights to the center of the painting and then the not dark image will show up. The thing I want to do is: first of all have the image darken (with overlayColor or with another mesh above with opacity), but the difficult part here and the thing I don’t know how to do is to show the part of the picture that is darkened in full colour where the spotlight points to. This spotlights can rotate obviously. I attach the current minigame to show the idea i want to do. Any idea is welcomed.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source