[Dan] [2.0.8] Unable to set custom UI scale

DgotsMots
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Oct 23, 2024 7:31 am
Contact:

[Dan] [2.0.8] Unable to set custom UI scale

Post by DgotsMots »

Playing on 2.0.8 (build 79416, mac-arm64)

When trying to change UI scale to 80% for example (or any number), it snaps back to 75% or 100%.
I remember it was possible previously and popup says it too.
popup.png
popup.png (37.21 KiB) Viewed 788 times
goes back to 75%.png
goes back to 75%.png (31.91 KiB) Viewed 788 times

I want it to be bigger than 75% and smaller than 100% because, the letters are too small to read on 75%, and logistic system storage goes off the screen on 100%, so a middle ground would be perfect.
logistic system storage off screen.png
logistic system storage off screen.png (3.4 MiB) Viewed 788 times

P.S. Posting for the first time, and wanted to say thank you for all the hard work you are doing!
Attachments
factorio-current.log
(6.67 KiB) Downloaded 13 times
DgotsMots
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Oct 23, 2024 7:31 am
Contact:

Re: [Dan] [2.0.8] Unable to set custom UI scale

Post by DgotsMots »

Also just noticed, in the "Tips and tricks" I can't see bottom border of the window, and can't click mark as read.
I think this is the same problem with UI scaling.
no border.png
no border.png (458.1 KiB) Viewed 743 times
User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 3234
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: [Dan] [2.0.8] Unable to set custom UI scale

Post by BlueTemplar »

For that last one, it would help if you also specified your virtual and/or real screen resolutions.

I'm guessing that it might be due to ending up with less than 720 effective lines, which is not supported ?
(FYI Steam Deck is 800 lines, Nintendo Switch is 720, and older PCs tend to be 768.)
BobDiggity (mod-scenario-pack)
DgotsMots
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Oct 23, 2024 7:31 am
Contact:

Re: [Dan] [2.0.8] Unable to set custom UI scale

Post by DgotsMots »

BlueTemplar wrote: Wed Oct 23, 2024 4:05 pm For that last one, it would help if you also specified your virtual and/or real screen resolutions.
My resolution is 2560 × 1600
MacBook Air M1, 2020
User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 3234
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: [Dan] [2.0.8] Unable to set custom UI scale

Post by BlueTemplar »

But the screenshot is 2880x1800..?
(Ah, I guess that's where the 75% comes in ??)
(Wait, no, that's 0.88.. ?!?)
BobDiggity (mod-scenario-pack)
DgotsMots
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Oct 23, 2024 7:31 am
Contact:

Re: [Dan] [2.0.8] Unable to set custom UI scale

Post by DgotsMots »

BlueTemplar wrote: Wed Oct 23, 2024 4:19 pm But the screenshot is 2880x1800..?
Resolution of a screenshot is higher because of Retina Display and how Mac renders things, I am a no expert so... I don't really know, but settings are on Default
Screenshot.png
Screenshot.png (216.93 KiB) Viewed 700 times
User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 3234
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: [Dan] [2.0.8] Unable to set custom UI scale

Post by BlueTemplar »

So maybe that's 900x75% = 675 < 720 ?
(Or is the 75% the other way around ?)

I guess need to wait for someone that has used a Mac in the last two decades... :P
BobDiggity (mod-scenario-pack)
posila
Factorio Staff
Factorio Staff
Posts: 5409
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [Dan] [2.0.8] Unable to set custom UI scale

Post by posila »

UI scale is possible to set only in multiples of 25% since the last UI redesign which was in (I think) 0.17. So there is no bug here, as far as I can tell (except for the GUI going off the screen)
DgotsMots
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Oct 23, 2024 7:31 am
Contact:

Re: [Dan] [2.0.8] Unable to set custom UI scale

Post by DgotsMots »

BlueTemplar wrote: Wed Oct 23, 2024 4:37 pm So maybe that's 900x75% = 675 < 720 ?
(Or is the 75% the other way around ?)
So to be clear the problem of windows going over the bottom border is only on 100% scale.
pix
ergzay
Inserter
Inserter
Posts: 46
Joined: Fri Mar 25, 2016 8:49 pm
Contact:

Re: [Dan] [2.0.8] Unable to set custom UI scale

Post by ergzay »

DgotsMots I have the same computer and your problem is twofold.

First off, as you say, your native screen resolution is 2560x1600, but because you have your resolution scale set at "Default" instead of doing what it should be doing and rendering at at the native screen resolution of 2560x1600 for a "point resolution" of 1280x800, it instead has to render your entire system at 2880x1800 to create the point resolution of 1440x900 and then downscale that to 2560x1600. You'd make your life way simpler if you just set your Mac to render at a proper retina resolution. To do that you should select one down from Default. (I have an earlier OS version but it should be similar to what you see.)
10-23-2024, 23-57-46.png
10-23-2024, 23-57-46.png (461.26 KiB) Viewed 647 times
It should say "Looks like 1280 x 800" when you mouse over the selection. Apple calls this "Scaled" but it's not scaled at all and is actually the correct resolution for your monitor. This was a major mistake on Apple's part because they skimped out on display hardware when they shipped the Macbook M1 by not shipping something with a higher resolution for the Air but they tried to cover it up by forcing all the UI elements to just be smaller.

This is where BlueTemplar's confusion originates, because well, it actually is confusing.

Secondly, in your factorio settings you've disabled the checkbox for rendering at your native resolution which makes the game all pixelated. This makes small text hard to read.
10-23-2024, 23-58-53.png
10-23-2024, 23-58-53.png (165.22 KiB) Viewed 647 times
The checkbox labeled "Render in native screen resolution" should be ticked, but on your system you've apparently turned this off. If you do this text should be come significantly clearer in game. You need to restart your game after checking this.

So to summarize, what you're doing right now is rendering the game at 1440x900, which is then being upscaled to 2880x1800 by the OS, and then downscaled to 2560x1600 by the OS. If you don't lower the resolution to match your actual screen resolution and have that checkbox clicked, it'll spend a bunch of extra GPU cycles rendering at 2880x1800 and then your OS will simply throw away a bunch of them to downscale it to your screen resolution of 2560x1600. So you need to change your system settings and the checkbox together, otherwise you'll just have poor performance.
DgotsMots
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Oct 23, 2024 7:31 am
Contact:

Re: [Dan] [2.0.8] Unable to set custom UI scale

Post by DgotsMots »

ergzay wrote: Thu Oct 24, 2024 7:00 am DgotsMots I have the same computer and your problem is twofold.
WOW! Ergzay you are my hero!
I've done what you said and everything looks amazing! No windows going beyond the border and game runs in 60fps!
Previously I tried by myself to tick "Render in native screen resolution" but than fps/ups become unstable to 30-45fps and it was unpleasant this way. But! With changing the Mac screen settings now everything runs super smoothly in 60fps and UI scaled perfectly as intended + no unreadable pixelated texts and graphics looks fantastic!
Thank you so much! I really appreciate that you found time and wrote me what is the reason behind the problem and how to solve it!
ergzay
Inserter
Inserter
Posts: 46
Joined: Fri Mar 25, 2016 8:49 pm
Contact:

Re: [Dan] [2.0.8] Unable to set custom UI scale

Post by ergzay »

DgotsMots wrote: Thu Oct 24, 2024 7:31 am
ergzay wrote: Thu Oct 24, 2024 7:00 am DgotsMots I have the same computer and your problem is twofold.
WOW! Ergzay you are my hero!
I've done what you said and everything looks amazing! No windows going beyond the border and game runs in 60fps!
Previously I tried by myself to tick "Render in native screen resolution" but than fps/ups become unstable to 30-45fps and it was unpleasant this way. But! With changing the Mac screen settings now everything runs super smoothly in 60fps and UI scaled perfectly as intended + no unreadable pixelated texts and graphics looks fantastic!
Thank you so much! I really appreciate that you found time and wrote me what is the reason behind the problem and how to solve it!
Thank you for the appreciation! Glad I could help!

Also this was probably hitting you on other games as well, so this should've improved performance on other games if you were running them at full screen and full screen resolution. It'll also help when playing videos in web browser as it doesn't need to upscale as much. It's honestly a really dumb default that Apple set up.

It's made worse with Factorio though as they just naively trust that the resolution that the OS reports isn't in fact higher than the resolution of your monitor. They also don't show what resolution the game is running at unless you go into the debug menus. They should probably hardcode an exception for Macbook Air computers to not render above the screen resolution. There's probably a whole lot of Macbook Air users out there suffering worse performance than they need to for literally no gain.
posila
Factorio Staff
Factorio Staff
Posts: 5409
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [Dan] [2.0.8] Unable to set custom UI scale

Post by posila »

ergzay wrote: Thu Oct 24, 2024 7:00 amSo to summarize, what you're doing right now is rendering the game at 1440x900, which is then being upscaled to 2880x1800 by the OS, and then downscaled to 2560x1600 by the OS. If you don't lower the resolution to match your actual screen resolution and have that checkbox clicked, it'll spend a bunch of extra GPU cycles rendering at 2880x1800 and then your OS will simply throw away a bunch of them to downscale it to your screen resolution of 2560x1600. So you need to change your system settings and the checkbox together, otherwise you'll just have poor performance.
Ooooh, I did not know about this. I was confused about why changing OS scaling would have an impact on performance of rendering the game in native resolution. Thank you for explaining it.
ergzay wrote: Thu Oct 24, 2024 8:09 am It's made worse with Factorio though as they just naively trust that the resolution that the OS reports isn't in fact higher than the resolution of your monitor. They also don't show what resolution the game is running at unless you go into the debug menus. They should probably hardcode an exception for Macbook Air computers to not render above the screen resolution. There's probably a whole lot of Macbook Air users out there suffering worse performance than they need to for literally no gain.
I don't know if that is possible with Metal, but we still use OpenGL and I don't know how to achieve that. We could upscale the image to size of the backbuffer at the end, which would still save lot of GPU work, but added extra upscale, making the final image probably worse.
DgotsMots
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Oct 23, 2024 7:31 am
Contact:

Re: [Dan] [2.0.8] Unable to set custom UI scale

Post by DgotsMots »

ergzay wrote: Thu Oct 24, 2024 7:00 am Thank you for the appreciation! Glad I could help!

Also this was probably hitting you on other games as well, so this should've improved performance on other games if you were running them at full screen and full screen resolution. It'll also help when playing videos in web browser as it doesn't need to upscale as much. It's honestly a really dumb default that Apple set up.
Yeah for sure will test it out at later times ;)
Right now Space Age awaits!
ergzay wrote: Thu Oct 24, 2024 7:00 am It's made worse with Factorio though as they just naively trust that the resolution that the OS reports isn't in fact higher than the resolution of your monitor. They also don't show what resolution the game is running at unless you go into the debug menus. They should probably hardcode an exception for Macbook Air computers to not render above the screen resolution. There's probably a whole lot of Macbook Air users out there suffering worse performance than they need to for literally no gain.
So true, I wasn't aware of the problem for over 3 years until now, when decided to write here after playing Factorio, and so happened to get your help. You can only wonder how many other players don't know about this.
ergzay
Inserter
Inserter
Posts: 46
Joined: Fri Mar 25, 2016 8:49 pm
Contact:

Re: [Dan] [2.0.8] Unable to set custom UI scale

Post by ergzay »

posila wrote: Thu Oct 24, 2024 8:23 am
ergzay wrote: Thu Oct 24, 2024 7:00 amSo to summarize, what you're doing right now is rendering the game at 1440x900, which is then being upscaled to 2880x1800 by the OS, and then downscaled to 2560x1600 by the OS. If you don't lower the resolution to match your actual screen resolution and have that checkbox clicked, it'll spend a bunch of extra GPU cycles rendering at 2880x1800 and then your OS will simply throw away a bunch of them to downscale it to your screen resolution of 2560x1600. So you need to change your system settings and the checkbox together, otherwise you'll just have poor performance.
Ooooh, I did not know about this. I was confused about why changing OS scaling would have an impact on performance of rendering the game in native resolution. Thank you for explaining it.
This is because Apple (almost?) always (at least as far as I'm aware) renders all elements at 2.0 (described as "Retina") or 1.0 scaling. So when you change the OS scaling it's actually increasing or decreasing the native rendered resolution of the entire system. This eases UI development as you don't need to make everything capable of dynamic scaling. It's either Retina, or they're both exact integer multiples of each other.

So to take my system for an example, without using a third party addon (which I do use, which gives access to more modes and even higher resolutions, including rendering at non-Retina 2560x1600 which some games need) on my M1 Macbook I can select from: "Looks like 1024 x 640", "Looks like 1280 x 800", "Looks like 1440 x 900", and "Looks like 1680 x 1050". At the lowest example it's rendering the desktop at 2048x1280 and then upscaling to 2560x1600, and at the highest example its rendering the desktop at 3360x2100 and downscaling to 2560x1600.

Any screenshots you take though will be at the rendered resolution as that's the pixel resolution everything on the system is working at. The screenshots will have Image DPI set at 144 dpi/ppi though instead of the normal image dpi/ppi of 72 so they still display correctly in a Retina environment. So that may cause some confusion when you're looking at screenshots from Mac users.
ergzay
Inserter
Inserter
Posts: 46
Joined: Fri Mar 25, 2016 8:49 pm
Contact:

Re: [Dan] [2.0.8] Unable to set custom UI scale

Post by ergzay »

posila wrote: Thu Oct 24, 2024 8:23 am
ergzay wrote: Thu Oct 24, 2024 8:09 am It's made worse with Factorio though as they just naively trust that the resolution that the OS reports isn't in fact higher than the resolution of your monitor. They also don't show what resolution the game is running at unless you go into the debug menus. They should probably hardcode an exception for Macbook Air computers to not render above the screen resolution. There's probably a whole lot of Macbook Air users out there suffering worse performance than they need to for literally no gain.
I don't know if that is possible with Metal, but we still use OpenGL and I don't know how to achieve that. We could upscale the image to size of the backbuffer at the end, which would still save lot of GPU work, but added extra upscale, making the final image probably worse.
I don't even know how OpenGL knows about Retina resolutions, but there's a checkbox for it so it works somehow. I know in other non-Metal games you can set the game resolution, for example setting it to 2560x1600 manually (which would just result in the OS upscaling that to 2880x1600 and then back down to 2560x1600 with little performance issues). If you can't cause the system resolution to change (there should be a way of doing this?) then you should at least be able to detect Macbook Air users I would think based on the resolution. It's the only Mac computer shipping currently and in the past with a 2560x1600 resolution monitor at 2880x1800 resolution and you can show them a popup saying they should change their system settings.
User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 3234
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: [Dan] [2.0.8] Unable to set custom UI scale

Post by BlueTemplar »

Yeah, integer scaling is really the best... if you can do it !
https://dewt.org/posts/crispy-pixels-an ... den-ratio/
(Which might require running with black bars, as there are only so many standard resolutions to choose from.)

I was wondering for a while about subpixel-layout specific optimizations, like ClearType, which would also in theory allow optimized ratios featuring 1/3rds or 2/3rds on at least one direction on some specific (but very common) LCDs and LEDDs ?
Image
(Ought to work even better with Macs, considering how standardized they are.)

Still, from what I've heard, non-exact-ratioed scaling still looks fairly decent on screens around UHD-1 resolution (because they just have so many more pixels to work with), while not looking good on FullHD-like screens, and downright terrible on HD screens ?
BobDiggity (mod-scenario-pack)
Oleg_7777776
Inserter
Inserter
Posts: 27
Joined: Wed Oct 23, 2024 6:01 am
Contact:

Re: [Dan] [2.0.8] Unable to set custom UI scale

Post by Oleg_7777776 »

ergzay wrote: Thu Oct 24, 2024 7:00 am DgotsMots I have the same computer and your problem is twofold.

First off, as you say, your native screen resolution is 2560x1600, but because you have your resolution scale set at "Default" instead of doing what it should be doing and rendering at at the native screen resolution of 2560x1600 for a "point resolution" of 1280x800, it instead has to render your entire system at 2880x1800 to create the point resolution of 1440x900 and then downscale that to 2560x1600. You'd make your life way simpler if you just set your Mac to render at a proper retina resolution. To do that you should select one down from Default. (I have an earlier OS version but it should be similar to what you see.)10-23-2024, 23-57-46.png

It should say "Looks like 1280 x 800" when you mouse over the selection. Apple calls this "Scaled" but it's not scaled at all and is actually the correct resolution for your monitor. This was a major mistake on Apple's part because they skimped out on display hardware when they shipped the Macbook M1 by not shipping something with a higher resolution for the Air but they tried to cover it up by forcing all the UI elements to just be smaller.

This is where BlueTemplar's confusion originates, because well, it actually is confusing.

Secondly, in your factorio settings you've disabled the checkbox for rendering at your native resolution which makes the game all pixelated. This makes small text hard to read. 10-23-2024, 23-58-53.png

The checkbox labeled "Render in native screen resolution" should be ticked, but on your system you've apparently turned this off. If you do this text should be come significantly clearer in game. You need to restart your game after checking this.

So to summarize, what you're doing right now is rendering the game at 1440x900, which is then being upscaled to 2880x1800 by the OS, and then downscaled to 2560x1600 by the OS. If you don't lower the resolution to match your actual screen resolution and have that checkbox clicked, it'll spend a bunch of extra GPU cycles rendering at 2880x1800 and then your OS will simply throw away a bunch of them to downscale it to your screen resolution of 2560x1600. So you need to change your system settings and the checkbox together, otherwise you'll just have poor performance.

you figured out this problem coolly, but at the same time understanding this situation did not save you from the problem with FPS when zooming, right?
Post Reply

Return to “Assigned”