godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.16k stars 97 forks source link

Make import or baking processes non-blocking #10588

Open Saul2022 opened 2 months ago

Saul2022 commented 2 months ago

Describe the project you are working on

A largue game that has a lot of assets, on lower end machine.

Describe the problem or limitation you are having in your project

When importing/baking navmesh/lightmap the main window of the scene is continously blocked by the progress popup dialog which makes it impossible to do anything in editor aside from waiting for the import to be over, and thus does not give much visual feedback either, just a import glb or scene import, and even gets frozen when clicking on it.

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

The enhancement would be having a bottom tab like at the left from the warning bottom tab that has the notification sprite where when you click a minimize button that will appear at the top right of the progress popup where when clicking it , it gets to the coming import bottom tab like how the warning come at the notification and the central import window dissapears untill you click on the little window of the minimized import tab

More over for imported files or many lightmap/navmesh nodes baked i added the specific number of node/elements, that are currently imported and that are left to import

For better clarity of the idea, i made some concept edit it photos.

Screenshot_20240829_102955~5

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

Not with code, but the theorical implementation of this would be with separating the progress popup dialog window from the main thread and add it onto a sub thread, avoiding that this blocks the editor. For the minimized window, it could work or use code from the warning notification thing,but instead of staying temporaly it stays there unless you click the sprite, which will close it.

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

Doubt it as there's not really a way to unblock the editor from progress popups, and i don't think a few lines will implement this qol improvement.

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

This is core

Calinou commented 2 months ago

As I understand it, resource importing will always need to be blocking as the scene state could get inconsistent otherwise (unless the editor went fully read-only during import and only allowed you to navigate the 2D/3D scene).

Making the editor usable while baking lightmaps might be feasible, but this will need https://github.com/godotengine/godot-proposals/issues/3867 to be really usable. Otherwise, the editor would become very sluggish while it's being used due to the GPU being fully utilized by the lightmapping process. Also, switching scene tabs would most likely not be possible while baking lightmaps (as Godot needs to "see" the nodes in the current scenes for the lightmapper to do its job).

Saul2022 commented 2 months ago

As I understand it, resource importing will always need to be blocking as the scene state could get inconsistent otherwise (unless the editor went fully read-only during import and only allowed you to navigate the 2D/3D scene).

Alright then , though showing what elements are currently imported/left to import might work, no? That would atleast may give visual feedback, along other stuff like specifyng what is being done( ie generating lod/shadow mesh/uv2, or mipmaps and compression, though this is for another proposal. )