Lower resolution to improve framerate ?

Hello !

Im currently working on a game project that will look like a mix of retro and modern, i know its a bit wierd but im really satisfied by the results so far.
Imagine a ps1 game but that also include dynamic lightning and other modern techs.

Now my problem is that i would love the game to be compatible with many systems as for right now, the game is pretty demanding due to the dynamic lights and volumes all casting shadows.

Scaphandre_0KXWsYfLMS

I also added a post-process adding a pixelization on top of the game.

What im trying to achieve is to replace that “fake” pixelisation with a real one, by greatly reducing the resolution of the game to augment the framerate as much as possible.

Note that i dont really understand how that works, so i might be doing it wrong.

I tried to use console command in game to change the resolution while the game is running (r.setres 800x600w) but that dosent improve my FPS at all, which i found strange.

The other method i tried is to change the screen percentage with : “SetResolutionScaleValue” but that just give me a very blurry result while not improving the framerate at all.

What can i do to truely lower the resolution to get this retro pixelated render without having to rely on a post-process volume while also improving the performances ?

Hi!
That’s a really cool project you’re working on! I totally understand the effect you want to achieve, a mix of retro and modern with the typical PS1 pixelization, but with technologies like dynamic lighting. Now, it seems like an interesting challenge but I would be very careful because you need to optimize everything and more or less meticulously.
Anyway, I would try to operate like this.

Use the r.ScreenPercentage command
The command you mentioned, SetResolutionScaleValue, is correct, but it could be that you set it too low, causing a blurry effect. Try to use a middle value to get a balance between performance and clarity.

You can use the r.ScreenPercentage command in the console, you can use something like this: r.ScreenPercentage 50
This sets the internal rendering to 50% of the resolution, improving the frame rate without compromising too much on the quality. If 50% is too low or too high, you can try values ​​between 50 and 100.

Another tip is to use a custom output resolution, that is, instead of reducing the real resolution of your monitor, you can lower the rendering resolution and keep the UI and other elements at a higher resolution.
You can do this in Unreal’s Rendering Settings:

Go to Project Settings > Engine > Rendering.
In the Screen Percentage section, adjust the value to lower the internal resolution without touching the output resolution.
For -Retro Rendering- I would use a Material like “Pixel Art”
To get a more authentic pixelated effect, you can use a custom material that creates pixelation at the shader level instead of relying on post-processing.

The idea could be to create a custom material that takes the UV values ​​and smoothes them to simulate a low resolution. This will give the game the pixelated look without any blurring, while maintaining a higher frame rate.
In material nodes, you can use a Floor node to approximate the UV coordinates to larger blocks, simulating a lower resolution.
Also try disabling or optimizing dynamic lighting
Dynamic lights and volumes that cast shadows can have a significant impact on performance. Here are some tips for optimizing them:

Try to limit the number of lights that cast dynamic shadows. If your game has a retro look, you may not need many lights that cast real-time shadows.
Use static lights where possible, remember that static lights are much less demanding on performance.
Again, I suggest changing your post-processing method.
Even if you already have a post-process implemented for pixelation, you can try disabling other post-processing features that may be unnecessary for your visual style:
Disable Motion Blur, Anti-Aliasing, Bloom, Lens Flares or other effects that can consume a lot of resources but are not essential for a retro look.
Use Aggressive LOD’s (Level of Detail)
Set more aggressive LOD’s for world objects, reducing the quality of models as they are further away. This will help you maintain high performance without too much visual impact.
This package on Marketplace it might be right for you:
https://www.unrealengine.com/marketplace/en-US/product/pixel-materials-1
Try these options and let me know, cheers.

if you use tsr you gotta disable it in the project options. you can use fxaa or no aa depending on you preference of image clarity. fxaa is blurry. taa works too but is also blurry and has pixel ghosting.

then set the screen percentage to the desired 100/pixel size. like 20% is “5x5” pixels on a 1080p screen. the internal resolution would be 384x216. a lil bit low for ps1 standard. 4x4 looks better. you should eyeball that, honestly. 20% and 25% divide properly on most commen resolutions. i mean it divides into an integer result with no fraction. that’s the core to get the pixel perfection. you want consistent square pixels size not the wobbly rectangle lines inbetween.

to get real pixels you gotta use “r.TemporalAA.Upscaler 0”, set “r.Upscale.Quality 0” to get nearest filtering and “r.Upscale.Softness 0” to not sharpen. this bypasses all the window and fullscreen upscaling.

Thanks for the advices !

One thing that i fail to understand is the following ;
When i play any game, and i try to lower the resolution, i see a massive gain in framerate, its almost 2 times more fps when i divide the resolution by 4, but here, no matter how small i set the resolution, i see ZERO change in the framerate, i keep getting 60-70fps…

There is something i must be missing here, should i maybe change the resolution somewhere in the editor instead of doing it when the game is running or packaged ?

do you perhaps have the framelimit or smooth fps on? you could try to disable those and see if it improves. you should not need more then 60 fps tho. for real retro you should aim for 30 fps, tbh. (don’t take that advice or maybe consider it :))

which shadow method are you using? that’s a time consuming task. shadow maps are rather slow. if you use them you should lower their resolution. you don’t need much. like 256x256 max, maybe. pixelly.

also… i think the resolution math i posted is a lil wrong. on a higher res screen you gotta scale smaller. the common resolution that upscales pixel perfect on 720 1080 1440 and 2160 is 640x360. this is probably the proper internal resolution you should use. or you could do the math internally and give the user an option to scale the pixels. this is a lil iffy tho.

I just checked, and no, i dont have any Framelimit nor smooth Fps.

the thing is, i get 60-70 fps, but i have a good pc with a 3070Ti, i tested on an old laptop and i get 1-2 fps.
on a good laptop i get 20 max…

Dont you think its wierd that i dont improve the framerate at all when reducing the screen percent to 10 percent while having a 800x600 resolution ?

I was hoping to raise it to at least 120fps with theses settings.

okay. what settings are you using? dx11 or dx12? raytracing? vsm? shadow maps? forward rendering or deferred? and which engine version?

have you used the debug stat or visual debugger to check what’s taking alot of time? basic performance troubleshoot.

i think 120 is a lil overkill? what type of game is it? a fps? if not, you don’t need 120 fps. it’s kinda pointless to push fps for average content. you know?!?

i got 5.4 and 5.5 installed. if you would upload a bare project with a “demanding” test room and the settings, or debug build (for developer console support) i could take a looksie on my laptop (3060).

if you do a debug build, please bind the console key to F12. tilde key is not it on qwertz keyboard. F12 gang, here.

DirectX 12
Lumen enabled
Virtual Shadow map : ON
Forward Shading Yes, but Forward rendering, im not sure

Atm all my lights are dynamic, i think the lights take the most of the ressources.

The goal with the framerate is not to have a constant 120 fps, for my type of game 30 would be enough, the problem is that i get 60-70 on my system with a GTX 3070Ti, and the game uses around 8Gb of Vram, so when i test the game on older Pcs, i get 1-2 fps on an old laptop and 15-20 on a good Mac laptop…

I guess i really need to figure out how to optimize, but its way harder that what i thought, because im aiming at a specific and lively art style, im playing at lot with the shadows and i would really like to keep my light as dynamic as well as the Lumen Global illumination, and if i switch them off, some of my mise-en-scene will be ruined.
Really hard to figure a good balance between art-style and the compatibility with non-gaming pcs, i was hoping that the low resolution would help in that sense but apparently i was totally wrong.

this most likely is what comsumes the memory and brings down performance on low end devices. they run out of video memory and swap back and forth to ram if the system allows it. mine for example does not allow that and would not even run your game. (i know that for a fact. when i started my ue5 journey i couldn’t even run the simple demo map without running out of my lil 6GB vram and crashing the editor.) in your case and for backwards compatibility you should use regular shadow maps for a much lower vram footprint and you should lower the shadow map resolution wherever you can. you don’t need highres shadows in a low res game. it will have jaggies sometimes but it saves a ton of performance.

you also gotta check light complexity/overlap in the debug layers. you can’t have alot of that if you need the performance.

lumen gi should be fine as it even runs in dx11 and has good performance.

another thing is texture memory. i gotta ask how you texture the world. do you use low res textures and nearest filtering or a floor / mod whatever shader to create the pixel look? this will hamper performance too. the nearest filter is what you should use.

that’s all i can think of, atm.

hope it helps optimize your project atleast a lil bit. :slight_smile:

In theory you should be able to obtain nice visuals, as in dynamic lights and shadows, and even more so if you aim for that pixelated look.
Lumen is also customizable, and for the type of game I think you can lower the quality a lot without that being visible.
Modern games spend a lot of resources to avoid that look: High resolution display, high res textures, trilinear/anisotropic filtering, AA, and so on.

I will repeat what has been said above, you should make sure you are using low res textures, low res shadows, fairly low poly objects. I’m guessing you are not using nanite, but it’s worth asking.

No im not using Nanites, my mesh are pretty lowpoly too and my texture never exeed 64x64.

I tried to lower the shadow resolution in a specific light options with : the “Shadow Resolution Scale” at 0,125 (minimum) but i haven’t seen any change visually, do you know how it works ?

I will also try to un-activate the “virtual shadow maps” but i saw that this requires some baking and i still have to figure how it works.

I have also read online that when you have dynamic light, it good to avoid overlaps in their “light radius” to avoid having cascade shadows.

I think it will be a lot of small optimizations here and there to gain a few FPS but its a lot of things to figure and im only a beginner so i dont really understand how the rendering works…

UnrealEditor_LQK5tAFKAX

Its a hard choice, because i want to build the athmosphere and some of the gameplay around shadows, and i feel like no matter what i do, it will mean that the game would require a good computer to run properly…

I remember many years ago I had a low frame rate project and in one test I set the rendering resolution to 100px x 100px with no boost in frame rate like you experienced. I even used the “show” flags to stop rendering all static meshes and stop rendering all lights, with still no significant boost in performance. Turns out most of my rendering time was being used by skeletal mesh animations. I’m not saying that’s what’s going on in your case, just that you need to narrow down the issue.

Have you tried using the “stat unit” command yet? This will show you the overall rendering time for GAME thread (CPU), GPU thread (GPU), and DRAW/RHI thread (CPU). At low resolutions your GPU is probably taking a vacation and waiting for the CPU to catch up. Draw calls are the main limiting factor on the CPU, so that would be a combination of unique meshes in the scene and dynamic shadows.

If you’re targeting compatible platforms, try enabling Nanite on all non-translucent meshes. In most cases it will increase performance. It’s not just about handling mega huge polycounts. It also consolidates draw calls to be per-material and not per-material-per-mesh. It is also designed to play nicely with Virtual Shadows and Lumen.

You can also use Unreal Insights to profile your game. You can then dissect every frame and see what aspects are taking the longest to render.

One of the best thing you could do is to isolate everything, or try to isolate and find out how the performance changes. Like the above advice try with “stat unit” as well, but if you are a beginner you should try things in a simplified mode.
I mean it’s difficult for a beginner to find out what’s wrong - in a complex level with all objects present, lighting and all effects.

But it’s easier if all or most objects are stopped, or hidden, and have only let’s say a textured cube present. Or the ground. Or let’s say we suspect the shadows are using too much power. What if you stopped the generation of shadows all together ? Does to FPS jump up ? Do they double ? Or maybe the FPS remain mostly the same ? That would indicate the problem lies elsewhere.

If you want 120 fps, in what conditions do you get that ? What do you need to stop to get 120 fps ? The lighting ? or part of the objects ? The textures ? Shading ?