godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.05k stars 65 forks source link

Disable non-volumetric fog in editor orthogonal view #9643

Open aXu-AP opened 2 weeks ago

aXu-AP commented 2 weeks ago

Describe the project you are working on

A 3D walking sim / puzzle game set in an abandoned island

Describe the problem or limitation you are having in your project

For placing props I usually use top orthogonal view. However, ever since adding fog to the WorldEnvironment, the view looks like this: kuva It's hard to make out anything on the screen because of the fog.

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

When viewing the scene in orthogonal view, disable the non-volumetric fog temporarily.

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

Screenshot from above would look like this: kuva

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

Workaround is to add a script to the WorldEnvironment which enables fog only runtime, leaving editor entirely without fog.

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

I think it fog doesn't add anything of value in orthogonal view, as everything (in theory) is infinitely far away from the camera.

Calinou commented 2 weeks ago

I don't see a way to implement this in a way that doesn't modify the Environment resource when you save the scene, as the editor is rendered using the Environment resource defined in the current scene's WorldEnvironment node (or the default environment defined in the Project Settings).

It might be possible to add a property to Environment that handles this directly (e.g. different fog density for orthogonal camera), but it sounds a bit too specific to be something you'd need to use in a project, as something editor-only.

As a workaround, you can use the Unshaded debug draw mode in the Perspective/Orthogonal menu.

aXu-AP commented 2 weeks ago

I think @clayjohn's idea from the issue you linked is great and would solve this issue: camera could be positioned at the edge of AABB of the scene. Here's a comparison of current position (y: 2000), camera repositioned at the top of the scene and current position but with fog disabled: Comparison This approach has few bonuses as well: Shadows get rendered at higher quality. No clipping in very large scenes.