How can I get 4:3 aspect ratio with all rectangular homogenous pixels?

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
algernon64
Posts: 3
Joined: Sat Jul 25, 2020 1:31 pm

How can I get 4:3 aspect ratio with all rectangular homogenous pixels?

Post by algernon64 »

Hi everyone. I have tried to search for a solution for this but haven't found it.

Old VGA 320x200 games were played in CRT monitors with 4:3 aspect ratio and all the pixels had the same rectangular shape. Is there a way to achieve this in ScummVM? Using aspect ratio correction makes it 4:3 but the pixels are not homogenous (some are square, some are rectangular). The pixel perfect option doesn't seem to help either.

I'm not necessarily asking for sharpness here. For example, I think 5x/6x upscaling to 1600x1200 followed by downscaling to my window resolution using bilinear interpolation would be acceptable.

Thanks
User avatar
Praetorian
ScummVM Developer
Posts: 797
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: How can I get 4:3 aspect ratio with all rectangular homogenous pixels?

Post by Praetorian »

algernon64 wrote: Sat Jul 25, 2020 9:23 pm Hi everyone. I have tried to search for a solution for this but haven't found it.

Old VGA 320x200 games were played in CRT monitors with 4:3 aspect ratio and all the pixels had the same rectangular shape. Is there a way to achieve this in ScummVM? Using aspect ratio correction makes it 4:3 but the pixels are not homogenous (some are square, some are rectangular). The pixel perfect option doesn't seem to help either.

I'm not necessarily asking for sharpness here. For example, I think 5x/6x upscaling to 1600x1200 followed by downscaling to my window resolution using bilinear interpolation would be acceptable.

Thanks
I think for this case, you *don't* want aspect ratio correction and also *don't* choose "stretch to window" from the "Stretch Mode" options.
Maybe it would be worth testing with the "Fit to Window (4:3)" specific "Stretch Mode" option too.

I can't say that I am completely clear as to what all these options do and how they combine for an optimal / faithful to the original image result, but I do believe that there is a combo of these that should do what you want.

Other devs could maybe provide more definite solutions.

There's been some discussions that may be relevant:
viewtopic.php?f=1&t=14460
viewtopic.php?f=2&t=15164
User avatar
criezy
ScummVM Developer
Posts: 950
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Re: How can I get 4:3 aspect ratio with all rectangular homogenous pixels?

Post by criezy »

If you toggle on the aspect ratio correction option, I recommend using the OpenGL graphics mode. This is because when using the OpenGL graphics mode, the aspect ratio correction and stretch are done together.

With any other mode it first does the aspect ratio correction, and then stretch, and the aspect ratio correction step generates pixels of different sizes. Then doing any stretch (including the pixel perfect stretch) will not fix that.

With OpenGL however, you may for example be able to scale to 5x/6x scaling and get perfectly rectangular pixels with all the same size (assuming your screen is capable of displaying 1600x1200). And even if you cannot it should give a better display that other graphics modes.
algernon64
Posts: 3
Joined: Sat Jul 25, 2020 1:31 pm

Re: How can I get 4:3 aspect ratio with all rectangular homogenous pixels?

Post by algernon64 »

criezy wrote: Sun Jul 26, 2020 6:53 pm If you toggle on the aspect ratio correction option, I recommend using the OpenGL graphics mode. This is because when using the OpenGL graphics mode, the aspect ratio correction and stretch are done together.

With any other mode it first does the aspect ratio correction, and then stretch, and the aspect ratio correction step generates pixels of different sizes. Then doing any stretch (including the pixel perfect stretch) will not fix that.

With OpenGL however, you may for example be able to scale to 5x/6x scaling and get perfectly rectangular pixels with all the same size (assuming your screen is capable of displaying 1600x1200). And even if you cannot it should give a better display that other graphics modes.
Thanks.

I can do 1600x1200 on my screen, and using OpenGL with aspect ratio correction and pixel perfect stretch on 1600x1200 I do indeed get perfectly homogenous rectangular pixels, but the pixels are too large for my taste (the image is too blocky). I would rather use a smaller window size (say 960x720), but then I get a mix of square and rectangular pixels :(

EDIT: Adding two images from The Dig to illustrate my point, and in case someone else is interested. Just picked these at random (not sure if they are the best example). The effect can be observed by zooming in on something (like the tree). Yes, the 960x720 one still looks pretty good, but the difference in pixel size is a distortion, which can become apparent in some games depending on what is being shown.

https://imgur.com/isQQJYC
https://imgur.com/8OGHmlx
User avatar
raina
Posts: 237
Joined: Thu Jan 12, 2006 12:31 pm
Location: Oulu, Finland
Contact:

Re: How can I get 4:3 aspect ratio with all rectangular homogenous pixels?

Post by raina »

I succeeded in a thing like this last year: viewtopic.php?p=87055#p87055

Interesting point about the OpenGL+aspect ratio thing. Gonna have to try it too at some point and see if it'd be as good or even better. Usability wise it would be, for sure. My solution is fiddly but worth it for the results.
algernon64
Posts: 3
Joined: Sat Jul 25, 2020 1:31 pm

Re: How can I get 4:3 aspect ratio with all rectangular homogenous pixels?

Post by algernon64 »

raina wrote: Mon Jul 27, 2020 9:12 am I succeeded in a thing like this last year: viewtopic.php?p=87055#p87055

Interesting point about the OpenGL+aspect ratio thing. Gonna have to try it too at some point and see if it'd be as good or even better. Usability wise it would be, for sure. My solution is fiddly but worth it for the results.
Thanks! I was hoping for something simpler but I will definitely try this. I'm curious to see how it looks.
Post Reply