Impostor Factory

Impostor Factory

View Stats:
 This topic has been pinned, so it's probably important
Sturmlilie  [developer] 3 Oct, 2021 @ 1:15am
Integer Upscaling Brainstorming
I have prepared some possible scaling options for the scenario of a 1920x1080 monitor (including the currently available ones) in an imgur album, with two intermediate integer scale steps (width 2x height 2x; width 3x height 2x).

(Warning: Might contain story spoilers)
Imgur Album[imgur.com]
Zipped Archive[cdn.discordapp.com]

Best to download and view from your file browser. So my question to you is: is this what you wanted?
Last edited by Sturmlilie; 3 Oct, 2021 @ 1:23am
< >
Showing 1-15 of 53 comments
"2x (intermediate integer upscale to 1280x960)" looks correct

"3:2x (intermediate integer upscale to 1920x960)" is INCORRECT

Explaination:

Integer scaling turns every pixel into a perfect square of this many pixels: 2x2, 3x3, 4x4, 5x5 and so on. The size is chosen in such a way that as much as possible of the screen area is taken up and the rest is filled with black. So for instance a game with 640x480 will be upscaled with 2x2 squares to 1280x960 on a 1920x1080 monitor, since 3x3 squares will result in 1920x1440 and that doesnt fit into a 1920x1080 monitor anymore. However on a 2560x1440 monitor 3x3 squares would work, since 1920x1440 does fit into 2560x1440. In the perfect world the square size should be chosen automatically depending on the monitor. If implementing this is to difficult or not possible then maybe letting the user select the square size by himself would also be OK.

So the mistake with "3:2x (intermediate integer upscale to 1920x960)" is this:

Integer scaling doesn't turn pixels into rectangles which are not perfect squares like for instance 3x2 rectangles, so it doesn't change the aspect ratio.
Of course you can still implement 3x2 rectangles if other users want that but that doesn't count as what people usually call "integer scaling". So this is something I would not vote for if I could. I'd vote for the true "integer scaling".

The word "integer" is actually a bit confusing in this context and easily leads to the misunderstanding that ratios like 3x2 are also acceptable, but it is not actually meant like that. It was just a poor choice of words when people invented the name. Both numbers need to be the same integer numbers.

A game should look as intended by the artist. If the aspect ratio is messed up this is no longer the case. Thus I recommend to comply with the common definition of "integer scaling" and use perfect squares only.
Since people use wide screens nowadays making pixel art games with resolutions wider (but not necessarily taller) than 640x480 might be worth considering for the future. But since the artistic content of this game is already done I recommend keeping it's aspect ratio at 4:3 instead of stretching it and just filling the unusable areas on the far left and far right sides of the monitor with black. Doing it like this was integer scaling's intention right from the beginning and all the three major GPU companies implemented it exactly like that as well.

One of the integer scaling's intentions was to let people use their new big monitors in order to play their old games, which were never designed for aspect ratios like 16:9. So it was known right from the beginning that there will be large unused areas on the left and the right.

Of course the same main idea is applicable not only to old games, but to pixel art games in general, since many old games perfectly fit into the definition of what we call pixel art nowadays.

Out of the three major GPU companies Intel has also implemented the possibility to switch to less restricted nearest neighbor mode to get rid of the thin unused areas on the top and the bottom of the monitor, but they still kept the aspect ratio unchanged. They called it "retro scaling" and it can be switched between the restricted "integer scaling" and the less restricted "nearest neighbor" modes. However if you ask me I'd still prefer "integer scaling", because I want all the small squares to have the same size.

Is was very difficult to convince the GPU companies to implement "integer scaling" and it took many years until they did it. If the dialogue with them was easy then maybe the users would convince them to include more options like for instance more ways to tinker with the restrictions and adding scan-lines. The "true integer scaling" that I have described is just what the most users agreed on at the top priority implementation.
Last edited by derailed_omega_male; 3 Oct, 2021 @ 5:07am
Sturmlilie  [developer] 3 Oct, 2021 @ 5:09am 
Having both square and rectangle "big pixels" in the same Implementation is fairly trivial; I was actually much more curious about the question of how to "walk the last mile" so to speak, ie. which filter to take from 1280x960 to 1440x1080
Originally posted by Sturmlilie:
I was actually much more curious about the question of how to "walk the last mile" so to speak, ie. which filter to take from 1280x960 to 1440x1080
It's not my choice to make, but if you ask me then I'd say:
Keep the squares as perfect as possible, including their sharpness. Of course in order to keep their sharpness bilinear upscaling is out of question.
Atrip3 3 Oct, 2021 @ 7:19am 
Originally posted by Sturmlilie:
Having both square and rectangle "big pixels" in the same Implementation is fairly trivial; I was actually much more curious about the question of how to "walk the last mile" so to speak, ie. which filter to take from 1280x960 to 1440x1080
I would use NN to keep sharpness, but maybe it should be an option in game settings
Originally posted by Atrip3:
I would use NN to keep sharpness, but maybe it should be an option in game settings
NN with the forced aspect ratio but without forcing the exactly same square size everywhere can actually be useful on veeery high resolutions like 4K in order to minimize the wasted area on the top and the bottom of the screen and still look more or less fine. When up-scaling from 640x480 to 4K like this some of the squares will be 4x4 and others will be 5x5. This is still an imperfection of course, but the area reduction between 5x5 and 4x4 (36%) is much less significant in comparison to the area reduction between 2x2 and 1x1 (75%). At higher resolutions the difference becomes even less significant. So that makes some sense. But if I had the choice, I'd still prefer equal size for all squares. Note that even if all squares are forced to have the same size the relative amount of the wasted screen area that needs to be filled with black ALSO becomes smaller at higher screen resolutions.

Maybe it's not a bad idea to let the user choose what he considers to be the lesser evil. That's what Intel did as well.
But then again giving the user to much choices is not always user friendly.
But then again it's possible to create "advanced graphical options menu" and move all the complicated stuff that inexperienced users do not want to be confused by in there.
Last edited by derailed_omega_male; 3 Oct, 2021 @ 7:57am
When using the minimalist approach it could look something like this:

The user get the choice between "smooth scaling" (actually bilinear) and "sharp scaling" (actually NN) with small pictures near the choice buttons that instantly show the user the difference between the two options. And if the user selects "sharp scaling" he gets the additional option to "force all the pixels to have the same size" (should be enabled by default IMHO).
Last edited by derailed_omega_male; 3 Oct, 2021 @ 8:10am
Atrip3 3 Oct, 2021 @ 8:13am 
Originally posted by derailed_omega_male:
When using the minimalist approach it could look something like this:

The user get the choice between "smooth scaling" (actually bilinear) and "sharp scaling" (actually NN) with small pictures near the choice buttons that instantly show the user the difference between the two options. And if the user selects "sharp scaling" he gets the additional option to "force all the pixels to have the same size".
IMHO, I would scrap entirely bilinear and make choose between NN and perfect pixel size. Your osservations are correct btw
Also I'm not sure how much control this particular game engine gives the developers. But according a new topic name I just saw in this forum this game seems to be OpenGL based. In OpenGL it is possible to easily switch the texture sampling method between bilinear and NN. A frame can be moved to texture memory and then be upscaled with bilinear or NN from there by simply rendering the texture containing the frame to the screen as a flat 2D object. The same size for all the pixels can be enforced by choosing a correct size for this 2D object.
But as I said I do not know whether this game engine allows all this.
Last edited by derailed_omega_male; 3 Oct, 2021 @ 8:22am
Sturmlilie  [developer] 3 Oct, 2021 @ 8:24am 
Originally posted by derailed_omega_male:
Also I'm not sure how much control this particular game engine gives the developers. But according a new topic name I just saw in this forum this game seems to be OpenGL based. In OpenGL it is possible to easily switch the texture sampling method between bilinear and NN. A frame can be moved to texture memory and then be upscaled with bilinear or NN from there by simply rendering the texture containing the frame to the screen as a flat 2D object. The same size for all the pixels can be enfoced by choosing a correct size for this 2D object.
But as I said I do not know whether this game engine allows all this.

I'm the author of the engine, and yes, it's trivially possible, I just need to determine a feature set before I get down to work.
Originally posted by Sturmlilie:
I'm the author of the engine, and yes, it's trivially possible, I just need to determine a feature set before I get down to work.
Oh, I'm sorry. I thought it's still the good old RPGMaker engine.
I didn't play the game yet, except opening it for a couple of minutes.
Last edited by derailed_omega_male; 3 Oct, 2021 @ 8:29am
Marisa Reset 4 Oct, 2021 @ 5:36pm 
Is it possible to do a 3x render downscaled to the fixed aspect ratio? If not I'd take the option for the 2x bilinear (more options are always nice).

I personally played the game with Lossless Scaling to force it to 3x 1920x1080 widescreen with the black areas cropped off. I know this causes a few issues with the dialog boxes (and probably your vision for the game as well), but I loved the sharp look compared to the blurry default fullscreen scaling. These pixels deserve to be seen!

https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2619728436
https://gtm.steamproxy.vip/ugc/1624102172384188337/4303600B35548A4B3DAFBC5FAB5D3F7AD450C96D/?imw=5000&imh=5000&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false
Last edited by Marisa Reset; 4 Oct, 2021 @ 5:39pm
Sturmlilie  [developer] 4 Oct, 2021 @ 9:10pm 
Originally posted by Banana Tea:
Is it possible to do a 3x render downscaled to the fixed aspect ratio? If not I'd take the option for the 2x bilinear (more options are always nice).

I personally played the game with Lossless Scaling to force it to 3x 1920x1080 widescreen with the black areas cropped off. I know this causes a few issues with the dialog boxes (and probably your vision for the game as well), but I loved the sharp look compared to the blurry default fullscreen scaling. These pixels deserve to be seen!

https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2619728436
https://gtm.steamproxy.vip/ugc/1624102172384188337/4303600B35548A4B3DAFBC5FAB5D3F7AD450C96D/?imw=5000&imh=5000&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false

Wait, so you want it integer-upscaled to a larger size than is displayable, and then downsampled again?
ackwell 5 Oct, 2021 @ 11:09am 
I know crap all about this but just by looking at those pictures I'd agree that 2x (intermediate integer upscale to 1280x960) looks better.

Would this work for 2560x1440 resolutions as well? Looked kinda off when I ran it in fullscreen. Bit blurry and huge black borders both on the sides and on the top and bottom.
https://i.imgur.com/VtVfwbS.jpg
Sturmlilie  [developer] 5 Oct, 2021 @ 11:15am 
Originally posted by ★︎ ackwell:
Would this work for 2560x1440 resolutions as well? Looked kinda off when I ran it in fullscreen. Bit blurry and huge black borders both on the sides and on the top and bottom.
https://i.imgur.com/VtVfwbS.jpg

Yes it would work for any Nx
Last edited by Sturmlilie; 5 Oct, 2021 @ 11:15am
< >
Showing 1-15 of 53 comments
Per page: 1530 50