Making 2D Stage Dark and lighting?

Godot Version

Godot 4.2.2

Question

Hi all,

Up to this point all my stages have been the same using default lighting for a stage, so, everything is clear and easy to see.

But now I would like to make a 2D platform stage that is basically in a cave think “Donkey Kong Country” caves but without the cool graphics :grin:. But I have no idea how to make a stage “dark” and to use light sources, eg, fire torches and spot lighting and the like to create the light in the stage and or reflecting/light emitting sources as well. First of all, is this even possible to do this in 2D in Godot? I started only with the Brackeys tutorial, so, still a lot to learn about Godot’s features.

And seeing as this is a quite involved process and cannot be answered clearly in a post do you know of any tutorials, websites, YouTube videos that discuss/teach this topic.

As always any help/tips/advice is greatly appreciated!

Regards.

This is actually quite simple :slight_smile:

Add a CanvasModulate and change the modulate property to something near black. Then, add PointLight2D or DirectionalLIght2D.

1 Like

Right - I did not expect it to be that easy :astonished:.

I get onto that first thing tomorrow and see what damage I can do - should be fun :rofl:.

Thankyou for posting!!!

2 Likes

How about a screenshot of the damage you do? :laughing:

1 Like

First point of damage: do not make the CanvasModulate the root node for the scene :rofl:, I had no idea.

Second point of Damage: I thought a point light would have a colour (correct spelling), a luminosity value and a radius value. But you also need a texture(???) need more time to work on that.

3rd point: No idea how a directional light works - I am flying blind here in the dark :stuck_out_tongue:.

You can use any image for the texture…I use these for point light sources - it’s just the same image resized. Feel free to download and use. :smile:

light_ball_32
light_ball_128

I played with directional lighting but it was more work than I was interested in at the time. :laughing:

I wasn’t sure what to do there!

downloaded and … THANKYOU!!!

1 Like

You’re absolutely welcome. :smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.