Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an editor setting to limit the maximum GPU usage ratio for lightmap baking #3867

Open
Tracked by #56033
Calinou opened this issue Jan 25, 2022 · 5 comments
Open
Tracked by #56033

Comments

@Calinou
Copy link
Member

Calinou commented Jan 25, 2022

Related to #3335, which was about the CPU lightmapper and is now implemented.

Describe the project you are working on

The Godot editor 🙂

Describe the problem or limitation you are having in your project

The GPU lightmapper uses 100% GPU while baking lightmaps. Since modern desktop environments and applications often rely on GPU acceleration, this makes the desktop unresponsive while lightmaps are baking.

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

Add an editor setting to limit the maximum GPU usage ratio for lightmap baking. This is a floating-point value that should be set between 0.1 (10% GPU usage) and 1.0 (100% GPU usage).

Values between 0.6 and 0.8 should make it possible to keep a responsive desktop without slowing down bakes too much.

Additionally, this setting can be used to limit heat/noise emissions when baking lightmaps.

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

This probably involves sleeping between iterations of the GPU lightmapper to ensure the GPU isn't always busy.

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

No, as the lightmapper is part of the engine and its behavior can't be overridden from a script.

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

See above.

@verypleasentusername

This comment was marked as off-topic.

@atirut-w

This comment was marked as off-topic.

@atirut-w
Copy link

Maybe this deserves more attention after all. Baking lightmap for a moderately-large scene on Fedora KDE Spin with RX 6700 XT absolutely cripples the desktop experience. Everything including the cursor lagged down to the single digits, to the point of being unusable. This is a huge problem considering you currently cannot cancel bakes.

Any chance someone will pick this up?

@Calinou
Copy link
Member Author

Calinou commented Apr 25, 2024

Baking lightmap for a moderately-large scene on Fedora KDE Spin with RX 6700 XT absolutely cripples the desktop experience

Are you on X11 or Wayland? If on X11, try disabling compositing by pressing Alt + Shift + F12.

@atirut-w
Copy link

I'm on Wayland

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants