godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.23k stars 21.04k forks source link

Editor FOV Affects Gizmo Size #45814

Open MrGreaterThan opened 3 years ago

MrGreaterThan commented 3 years ago

Godot version:

Godot_v3.2.4-rc1_mono_win64

OS/device including version:

Windows 10 Pro 10.0.19041, GTX1080TI, Ryzen 2700x, GLES3, C#

Issue description:

If the editor FOV is halved editor gizmos become twice as large. With a wide FoV, round objects such as planets will appear stretched into an oblong shape near the edges of the screen. Therefore it is best to narrow the FOV for games that are set in space and occupy large distances. Unfortunately this affects editor gizmos such as the camera icon and makes them obnoxiously large.

It's a low priority and reasonably easy to work around, but editor icon size should be independent of FOV or should be size adjustable.

Steps to reproduce: image image image image

Minimal reproduction project:

Not needed, the concept is visible with pictures.

Calinou commented 3 years ago

I think this is expected to happen when the StandardMaterial3D's Fixed Size property is enabled (which 3D gizmos use). Fixing this would likely require adding yet another property to StandardMaterial3D…

golddotasksquestions commented 3 years ago

From a user perspective this is not at all expected. I expect my editor UI to be independent of my scene. What my scene looks like should not affect the UI/Gizmos, as those are my tools to make changes to the scene. As a user I need to be able to adjust them separately from my scene.

The solution to this would be render Godots viewport UI on top of everything in "it's own world", as a separate pass, just like you would render your game UI in it's own world, not affected by Camera and WorldEnvironments settings of your game. This really needs to be changed.

Also related: https://github.com/godotengine/godot-proposals/issues/2138

Calinou commented 3 years ago

The solution to this would be render Godots viewport UI on top of everything in "it's own world", as a separate pass, just like you would render your game UI in it's own world, not affected by Camera and WorldEnvironments settings of your game. This really needs to be changed.

Even if you render gizmos in a separate pass, you have to use the same FOV in both passes for things to line up correctly. Unless you mean that gizmos should be drawn in 2D and projected over the 3D viewport, but this will prevent them from being occluded by solid materials (which is sometimes desired).

golddotasksquestions commented 3 years ago

If the editor UI is rendered as a separate render pass it means all the occlusion has already has already been applied before the pass is ready to be rendered on top of everything else. Things like icons can be stored as 2D positional value with the top left corner as 0.0 Vector.2 Then placed in 2D and merged before the final UI pass is finished together with the axis, grid or other things the user wants to be occluded by the scene objects. This results in occluded UI that is not affected by WE and UI icons that can have any size the user wants, most importantly however they don't change the size when the user changes the viewport default FOV.

As far as I know this is how render passes worked since the dawn of CGI. I know unlike other engines we don't really have proper render passes in Godot, but I think it sucks and really needs to be changed, not only because it over-complicates and cripples post processing during game development due to spaghetti workflows, but also because it is a showstopper for basic editor usability functionality as this example here and the WorldEnvironment one clearly illustrates.