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

Display real FPS in the 3D editor instead of estimating based on CPU/GPU time #75512

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Mar 30, 2023

This reverts to the 3.x method for displaying FPS in the View Frame Time panel. This has two consequences:

  • The reported FPS will no longer go past V-Sync or framerate limiters.
  • Unfocusing the window will display a low framerate (10 FPS by default), since the FPS is actually being limited by the engine's low-processor mode. In general, in this situation, the current FPS estimate can't be expected to be accurate as the GPU will often downclock as a result of the low GPU utilization.

Constant redrawing is still forced while the panel is visible, so there's no risk of having low-processor mode interfere.

The engine's FPS readout is updated less smoothly than the current method, but this will be improved if #63356 is merged.

On the images below, the actual FPS (and GPU power consumption) is identical, but since I use a 120 Hz display with V-Sync enabled, the engine cannot go past 120 FPS:

Before After
Screenshot_20230331_003918 Screenshot_20230331_003858

Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Can you confirm that in that same test scene with vsync off you still report 312 FPS?

As a note for the future, we bikshedded this feature a lot a few months back and never settled on something we were happy with.

In the end, I agree that it is best to not try to show "potential maximum FPS based on GPU usage". Users are interested in actual FPS and expect to see the amount limited by vsync.

@Calinou
Copy link
Member Author

Calinou commented Mar 31, 2023

Can you confirm that in that same test scene with vsync off you still report 312 FPS?

With V-Sync disabled and Update Continuously enabled, the reported FPS is lower as the editor's redrawing cost is also included (instead of only counting the 3D viewport):

image

However, it might be argued that this value is more representative of the running project in fullscreen (which implies a larger viewport resolution than a maximized editor, even if the editor is fullscreen). When running the project (without the editor in the background), I get 250 FPS in fullscreen with the same camera angle as the editor.

@Riteo
Copy link
Contributor

Riteo commented Mar 31, 2023

@Calinou

However, it might be argued that this value is more representative of the running project in fullscreen

IMO the non-problem factor is even higher. TBH, if I read 274 FPS I expect to see 274 FPS, indipendently of whether this is a technically slightly lower value than a "pure" game instance due to the editor drawing. One could argue also that even just having the editor in the same screen of the game (or anything else, tbf), will naturally lower FPS as there is more competition for resources, so IMO a real value is wayyy more useful and expected than an estimated value.

@clayjohn
Copy link
Member

clayjohn commented Apr 6, 2023

However, it might be argued that this value is more representative of the running project in fullscreen (which implies a larger viewport resolution than a maximized editor, even if the editor is fullscreen). When running the project (without the editor in the background), I get 250 FPS in fullscreen with the same camera angle as the editor.

Small Viewport + Editor redraw isn't a good metric for "FPS if viewport was fullscreen" as editor drawing potentially has very different performance characteristics to the running scene. Juan's original intention with this FPS value was to communicate "here is what FPS would be if this scene was running on its own and GPU was the bottleneck".

I'm not sure that overall editor performance is actually a metric that we should be reporting here

@Ansraer
Copy link
Contributor

Ansraer commented Apr 7, 2023

Maybe we could rename "FPS:" to "Editor FPS:"?

@YuriSizov YuriSizov modified the milestones: 4.1, 4.2 Jun 14, 2023
…GPU time

This reverts to the 3.x method for displaying FPS in the View Frame Time panel.
This has two consequences:

- The reported FPS will no longer go past V-Sync or framerate limiters.
- Unfocusing the window will display a low framerate (10 FPS by default),
  since the FPS is actually being limited by the engine's low-processor mode.

Constant redrawing is still forced while the panel is visible, so there's
no risk of having low-processor mode interfere.
@Calinou
Copy link
Member Author

Calinou commented Aug 1, 2023

Maybe we could rename "FPS:" to "Editor FPS:"?

Done (not shown on the above screenshots).

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

Successfully merging this pull request may close these issues.

8 participants