0 votes

I’m looking to simulate a day/night cycle , where during the night there are lights that turn on and look like they are lighting the area around them. Similar to this

How do I achieve the dimming effect of the scene such that the light nodes will act in the way I expect?

in Engine by (1,605 points)

1 Answer

+2 votes
Best answer

There is a node called CanvasModulate and what it does is it tints the whole canvas with the color of your liking. Use it in conjunction with an AnimationPlayer node in order to create your day/night cycle. Give it a gradual blue-ish tint that turns to yellow as the dawns breaks. Also make sure to give your scene the right contrast by lowering and increasing the Light2D's intensity as you see fit.

by (1,848 points)
selected by

What mode should be used for the Light2D node?

I would use either add, to keep more of the contrast, or mix, to keep more of the saturation. It's really up to you and your scene. Experiment with different settings and see wht works best. For a night scene I would choose Add, because I care more about that subtle tinting effect that it offers.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.