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:
-
Editor Preferences->General->Performance:
We can ignore these by default because thankfully the override is off by default, so these have no effect. -
Project Settings->Editor->Performance:
These should affect just the Editor. If I understand it correctly, these will never affect PIE or Packaged Build. -
Project Settings->Engine->Rendering:
These should be the settings that actually affect what resolution the packaged build runs at. -
Settings->Engine Scalability Settings:
These should affect what resolution PIE runs at, and allow you to preview different scalability levels. -
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:
- 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%
- 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:
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:
- Enter PIE
- Press F8 to escape the viewport lock
- The Scalability Settings will still be frozen because Editor thinks there’s no PIE session going on when you just escaped it.
- Click the viewport to re-activate viewport lock. This will re-enter the existing PIE session but won’t lock the mouse.
- Move mouse cursor out of the viewport while PIE is active and go to Settings->Engine Scalability Settings.
- 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:
- Find the BaseScalability.ini in the Config subfolder of engine and open it for the reference
- Create DefaultScalability.ini in the Config subfolder of our UE project
- 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.
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 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.