Screen Percentage settings are still impossible to understand

Hi,

a year later I once again took a whole day just to try to understand how resolution scaling (screen percentage) settings work in UE5, and once again all I got is migraines and anxiety about not being sure what resolution will my game run at, and not knowing how to be sure.

Out of the box, when you create a new UE5 project, this is how all of the scattered settings are set up:
Editor Preferences->General->Performance:


Project Settings->Editor->Performance:

Project Settings->Engine->Rendering:

Settings->Engine Scalability Settings:

Viewport Menu->Screen Percentage:

  1. Editor Preferences->General->Performance:
    We can ignore these by default because thankfully the override is off by default, so these have no effect.

  2. Project Settings->Editor->Performance:
    These should affect just the Editor. If I understand it correctly, these will never affect PIE or Packaged Build.

  3. Project Settings->Engine->Rendering:
    These should be the settings that actually affect what resolution the packaged build runs at.

  4. Settings->Engine Scalability Settings:
    These should affect what resolution PIE runs at, and allow you to preview different scalability levels.

  5. Viewport Menu->Screen Percentage:
    This allows us to override resolution per viewport and also figure out which settings determine the viewport resolution.

Alright, now let’s start stepping through this minefield and start blowing our legs off:

Right off the bat, if you are a new user, there’s a trap prepared for you:


The default scalability settings look like they are set to Epic preset, but they are not. Part of “Epic” scalability settings profile is resolution scale definition, which is not 71% but 100%. Out of the box, UE uses TSR which upscales from render to screen resolution, so you are likely not aware you are running at subsampled resolution both in viewport and in PIE. So you will likely be caught off guard by following mysteries:

  1. Your game runs well in both Editor and PIE, but FPS drops rapidly in packaged build. This is because in packaged build, raw “Epic” quality profile is used, which defines screen percentage at 100%
  2. Your game runs well in editor, but for a seemingly random reason, it suddenly started to run worse in PIE at some point. That’s because if you change the scalability preset to editor, and then revert it back to “Epic”, it won’t revert the Screen Percentage back to 71%, which is the default of the new project, but back to 100%, which is the default of Epic scalability profile:
    ScreenPercentageReset

Now here’s where the real confusion comes:
If we keep the Screen Percentage at 100%, as defined by Scalability Settings, then we are in a situation where both Editor Resolution and Engine Resolution settings are set to same value, called “Based on display resolution”:



YET, for the editor viewport “Based on display resolution” means subsampled image at Epic quality preset:

WHILE for the PIE and packaged build, the setting identically named “Based on display resolution” actually means full desktop resolution:

As it turns out, the Default Screen Percentage settings in the Rendering section of Project Settings are not used by default, and are instead overriden by scalability profiles. In order for them to actually be used, you need to perform a very secret ritual:

  1. Enter PIE
  2. Press F8 to escape the viewport lock
  3. The Scalability Settings will still be frozen because Editor thinks there’s no PIE session going on when you just escaped it.
  4. Click the viewport to re-activate viewport lock. This will re-enter the existing PIE session but won’t lock the mouse.
  5. Move mouse cursor out of the viewport while PIE is active and go to Settings->Engine Scalability Settings.
  6. Finally, click “Default”, which will actually make PIE resolution respect the setting set in Rendering Section of the project setting.

Now, it will stay this way until you step on another mine. Every single time you change scalability settings to preview them, it will reset Screen Percentage back to the 100% stored in scalability profile you you revert to default Epic preset, so you need to repeat the secret ritual every time you want to as little as look in the direction of changing scalability preset.

So now, the obvious solution to make this brutal mess at least a little bit reliable is it edit the scalability presets. Let’s for example decide that for Epic scalability, we want to use Epic settings but for AntiAliasing, we’re fine with rendering at lower resolution and upscaling to 100% using TSR. We can:

  1. Find the BaseScalability.ini in the Config subfolder of engine and open it for the reference
  2. Create DefaultScalability.ini in the Config subfolder of our UE project
  3. Yoink the ResolutionQuality setting and it’s category, modify it to cap resolution at 71% even for high quality presets, and slap it into our scalability config:

This way, I no longer have to be careful about not forgetting to reset screen percentage when toggling different scalability presets in the editor.

But, all of this still doesn’t explain following:

You can try to rationalize some of the confusion above by following statement: “The default screen percentage is used as a fallback, when scalability presets do not define screen percentage scaling. So the “Based on display resolution” setting has no effect since scalability settings contain screen percentage definitions per scalability level.”

This, however, falls apart immediately, because when you modify the Default Screen Percentage section in Rendering Project Settings by setting Mode for Desktop Renderer to Manual and modify the Manual Screen Percentage, now the Default Screen Percentage settings override the ones in scalability presets, instead of being overriden by them. :sob:

You can then take a big hit of copium and say “Well, maybe “Manual” means always use specified manual screen percentage from the Project Settings, while “Based on display resolution” settings actually tells engine to retrieve screen percentages from scalability settings.”

…But this statement also can’t be true, because it would mean the editor viewport would also be retrieving screen percentages from scalability settings when set to “Based on display resolution”, yet it doesn’t.

All this stuff just makes me dizzy :face_with_spiral_eyes: Even if I use all IQ points available to me, I just can’t ever be sure what resolution will my game run at in all the different modes (Editor, PIE Editor, Standalone Game and Packaged Build), so this makes troubleshooting GPU performance issues extremely challenging.

4 Likes

Day 2, still banging my head against the table :frowning:

I still can’t understand why “Based on display resolution” means deriving the resolution from scalability presets for Engine->Rendering settings but it means some arbitrary, scalability-unrelated scaling curve for Editor->Performance settings :confounded:

And for that matter, how should I modify scalability settings so that they don’t override the screen percentage but instead use that same curve as Editor->Performance settings use. And why are they different by default.

All I want is to have the resolution behaving same in Editor, PIE and Packaged builds, but it seems impossible.

I can set the PIE resolution to “Default”, which will then use “Based on display resolution” from Engine->Rendering which uses same resolution scaling curve as Editor->Performance, BUT then I won’t get the same resolution in Packaged build, which will always use the resolution defined in the scalability preset.

I can also edit the scalability preset to use specific resolution scaling I want, BUT then I can not in any way force Editor viewport to use screen percentage settings from scalability preset, because editor always uses that scaling curve from “Based on display resolution”…

I can either have:

  1. Editor & PIE same resolution scaling, Packaged build different resolution scaling
  2. PIE and Packaged build same resolution scaling, Editor different resolution scaling

I am going insane… I just want to know what resolution my game renders at reliably, in all 3 modes… :face_with_spiral_eyes:

Ok, so it’s going even crazier…

I still can not find the source of what “Based on display resolution” does. When used, it will always subsample any given default display resolution. It will never use native resolution. This implies it’s probably meant to be used with TSR, as TSR is expensive but can be offset by upscaling from lower res.

BUT what if I want to use “Based on display resolution” scaling with TAA? For TAA, I would still want to subsample for lower scalability presets, but use 100% sampling for the high quality ones. Since I don’t where the “Based on display resolution” resolution scaling curve comes from, I am unable to edit it, therefore I can’t use this resolution scaling mode with anything else than TSR.

1 Like

More experiments done, still impossible to understand. I can not believe that the hardest Unreal Engine problem I ever had to solve is figuring out how to determine what resolution the game will run at in editor viewport, PIE and standalone game.

SO!:


[ScalabilitySettings]
; This is the screen percentage for the resolution quality, corresponding to 25% pixels, 50% pixels, 75% pixels, and 100% pixels
PerfIndexValues_ResolutionQuality="50 71 87 100 100"

These are SCALABILITY settings. They contain resolution multipliers for scalability presets 0 to 4. Epic and Cinematics are same 100% scale.

They CAN be used in PIE as long as the Screen Percentage slider is set by switching the Scalability Presets in the Scalability Groups panel:

In EDITOR VIEWPORT:
Scalability Resolution presets can NOT be used. Editor viewport will always ignore them regardless of what scalability level you have set.

In EDITOR PIE:
Scalability Resolution presets are used when switching the scalability levels manually in the Scalability Groups, where they will modify the Screen Percentage slider by loading the value from PerfIndexValues_ResolutionQuality.

In STANDALONE GAME:
They are always used. There is no way to use “Based on Display Resolution” setting in the Standalone Game.


Based on display resolution


This setting is available on two separate places:
Project Settings->Editor->Performance
Project Settings->Rendering->Default Screen Percentage

In EDITOR VIEWPORT:
Setting defined in Project Settings->Editor->Performance (Based on display resolution by default) is ALWAYS used. It is not possible for Editor Viewport to respect scalability resolution multipliers.

In In EDITOR PIE:
Setting defined in Project Settings->Rendering->Default Screen Percentage (Based on display resolution by default) is used in fresh new Unreal project as default. BUT it will only be used until the user touches the Scalability buttons in Scalability Groups panel at least once. As soon as those are touched, they will snap the Screen Percentage slider to the value defined in PerfIndexValues_ResolutionQuality.

In STANDALONE GAME:
There is no way for Standalone Game to use Based on display resolution. This means that despite the setting being defined in Project Settings->Rendering->Default Screen Percentage, this setting has NOTHING to do with the the state of the standalone/packaged game and is only relevant in the editor.


I know the two lists above are pretty much mirroring each other, but what this means in practice is that:

Scalability Level resolution presets can be used in:
Viewport: NO
PIE: YES
Standalone Game: YES

Scalability Level resolution presets are defined in and can be modified in:
BaseScalability.ini

Based on display resolution setting can be used in:
Viewport: YES
PIE: YES
Standalone Game: NO

Based on display resolution setting is defined and can be modified in:
I can not figure out where.


Key takeaways:

  1. There is no setup that I know of which can ensure the game resolution is same across Editor Viewport, PIE and Standalone Game, which makes performance randomly jump around confusing me.

  2. The only way to ensure consistent resolution is to set all Scalability Preset resolution multipliers to 100 and set both Screen Percentage settings to “Manual”, but this negates the benefit of having dynamic resolution downsampling based on scalability, which in turns gimps the TSR effectivity.

  3. Default Screen Percentage Mode for Desktop renderer setting set to “Based on Display resolution” will mean:

A: In PIE, Based on Display resolution scaling (which is impossible to find definition of) will be used as long as Screen Percentage Scalability Groups slider is set to 0
B: In Standalone Game, PerfIndexValues_ResolutionQuality values from the ini file will be used.

This means this very same setting which is defined as non editor specific in Project Settings->Rendering is either:
A: Is editor specific
B: Is not editor specific but has different meaning/functionality in PIE vs Standalone Game


If someone understands it better than me then please help me. It’s driving me crazy that after weeks of research, I still can’t figure out how UE5 handles resolution… I just want to know what resolution my game runs at :frowning:

4 Likes

I absolutely despise this feature.

what a mess - thanks for sharing your journey, it may have saved me from taking the same one.

The engine is slowly becoming unusable with each update. Screen percentage is the perfect example . :smiling_face_with_tear:

Thanks for sharing

1 Like