godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.13k stars 71 forks source link

Add an EditorSettings setting to set `default sun energy` for `Preview Sun` #5349

Open me2beats opened 2 years ago

me2beats commented 2 years ago

Describe the project you are working on

Trying to switch from Godot 3 to 4

Describe the problem or limitation you are having in your project

In Godot 3 I like that you get in the game what you see in the editor, I mean lights and shadows. In Godot 4 each 3D scene seem to have DirectionalLight with shadows by default due to new Preview Sun feature. It is useful but not for every scene imo, so I would prefer the sun to be disabled by default.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Adding an EditorSettings setting to set default sun energy for Preview Sun would solve the problem. I just could set default sun energy to 0 that would mean there are no shadows and lights in scenes without DirectionalLight node. All lights and shadows are mine!

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

default sun energy setting Maybe in editors/3d/preview_sun

If this enhancement will not be used often, can it be worked around with a few lines of script?

Not a few lines, also this would require to make a plugin

Is there a reason why this should be core and not an add-on in the asset library?

A plugin can be made but this feature is useful :) Currently Preview sun settings are hardcoded which is not so flexible

Calinou commented 2 years ago

Click the sun icon at the top of the 3D editor viewport to hide the preview sun:

image

This seems to remain persistent across restarts within a project.

There's the question of whether the preview sun and sky defaults in new projects should be made adjustable via editor settings, but I'm not sure if people would be customizing them often enough for it to warrant the added complexity.