Option to change aspect ratio of menu background images

Moderator: GZDoom Developers

User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Option to change aspect ratio of menu background images

Post by Nash »

@ Graf: someone was puzzled about this addition because apparently "widescreen images have always worked" for them.

It turns out that said person was using a 1920x1080 TITLEPIC replacement, which doesn't squash the image to 4:3.

I downscaled the image to 356x200 and the picture gets squashed.

Was it meant to be like that? As in, if the image is high res, it doesn't get squashed?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Option to change aspect ratio of menu background images

Post by Graf Zahl »

I never added such a thing so I cannot say.
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Option to change aspect ratio of menu background images

Post by Nash »

I won't be surprised if said mod was relying on undefined behaviour/code then.
User avatar
Tormentor667
Posts: 13530
Joined: Wed Jul 16, 2003 3:52 am
Contact:

Re: Option to change aspect ratio of menu background images

Post by Tormentor667 »

Graf Zahl wrote:Aaaand...
It's finally done. :)
Awesome :) Is there already a wiki entry describing how it is implemented or defined?
Matrix
Posts: 15
Joined: Sat Nov 23, 2019 12:08 pm

Re: Option to change aspect ratio of menu background images

Post by Matrix »

Glad this has been resolved.

Is there a specific setting to enable it though?

I downloaded the most recent GZDoom release and the behavior appears to be the same as previously.

When I have the "video mode" settings set to 16:9 forced aspect ratio and 1920x1080 pixel scaling the initial start menu and stat screens between levels backgrounds still have black bars.


Also, when did the settings font get changed? Is there a way to change it back to the DOOM font?

Thank you.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: Option to change aspect ratio of menu background images

Post by drfrag »

You need a GAMEINFO flag:

Code: Select all

Due to backwards compatibility needs and for flexibility this needs to be controlled by a gameinfo setting (fullscreenautoaspect):

0: Treat all images as having an aspect ratio of 4:3, this is the default for compatibility reasons
1: Scale all images to fit the screen, i.e. either pillarbox or letterbox them.
2: Scale all images to fill the screen.
3: Scale all images so that the center 4:3 area is always fully visible. This is the recommended mode for 16:9 images designed to be shown with the sides being cropped on narrower displays.
And wide pics of course, and a recent devbuild.
About the generic font, since 4.0.0 i believe. LZDoom still uses the Doom font.
Gez
 
 
Posts: 17833
Joined: Fri Jul 06, 2007 3:22 pm

Re: Option to change aspect ratio of menu background images

Post by Gez »

Question: does the "center 4:3 area" take aspect ratio correction into account or not?

Because technically a 21:9 at Doom's resolution will be 560x200 stretched to 560x240. But if aspect ratio correction is not taken into account, the 4:3 area in the image will be detected to be 266⅔x200.

We might need additional fullscreenautoaspect values for this.
Matrix
Posts: 15
Joined: Sat Nov 23, 2019 12:08 pm

Re: Option to change aspect ratio of menu background images

Post by Matrix »

drfrag wrote:You need a GAMEINFO flag:

Code: Select all

Due to backwards compatibility needs and for flexibility this needs to be controlled by a gameinfo setting (fullscreenautoaspect):

0: Treat all images as having an aspect ratio of 4:3, this is the default for compatibility reasons
1: Scale all images to fit the screen, i.e. either pillarbox or letterbox them.
2: Scale all images to fill the screen.
3: Scale all images so that the center 4:3 area is always fully visible. This is the recommended mode for 16:9 images designed to be shown with the sides being cropped on narrower displays.
And wide pics of course, and a recent devbuild.
About the generic font, since 4.0.0 i believe. LZDoom still uses the Doom font.
Thanks. I will wait for this to make it's way to a public build then.

Are there plans to implement this in LZDoom as well?
User avatar
Chris
Posts: 2940
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Option to change aspect ratio of menu background images

Post by Chris »

Gez wrote:Question: does the "center 4:3 area" take aspect ratio correction into account or not?

Because technically a 21:9 at Doom's resolution will be 560x200 stretched to 560x240. But if aspect ratio correction is not taken into account, the 4:3 area in the image will be detected to be 266⅔x200.

We might need additional fullscreenautoaspect values for this.
This would definitely be relevant to the Nash's widepix project. If they take the original 320x200 (5:4) image and extend the sides so it's 560x200, will the center 320x200 pixels still fill a 4:3 display (with the full image fitting a 21:9 display despite being 14:5)? Or would it need to be stretched to 560x240 for the 320x240 pixels to fit a 4:3 display and the whole thing to fit a 21:9 display?
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Option to change aspect ratio of menu background images

Post by Nash »

There's an open ticket for this right now. I'd typically expect it to work like this: if you have a very wide picture (say 560) open in Photoshop, but the canvas is only 320 at first. There's a bunch of hidden content that's outside of the canvas borders. Then when I extend the canvas to 426 (16:9), some of the hidden content is shown. And when I extend the canvas to 560 (21:9), even more content is shown. I expected it to just reveal the parts outside of the current frame without modifying the "center portion".

However, what's really happening right now is it's doing some scaling that I don't understand the inner workings of.

viewtopic.php?p=1141919#p1141919
User avatar
Chris
Posts: 2940
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Option to change aspect ratio of menu background images

Post by Chris »

Nash wrote:However, what's really happening right now is it's doing some scaling that I don't understand the inner workings of.

viewtopic.php?p=1141919#p1141919
That does appear to be roughly in-line with what I'd expect from not considering the original aspect ratio. The original 320x200 image is normally "corrected" to fit a 320x240 area. Without that correction, it appears squished vertically or stretched horizontally. Basically, you're taking the original 320x200 (5:4) image and extending the sides so it's 560x200 (14:5), and that is then scaled up to fill the screen maintaining the image's 14:5 aspect ratio. The engine would have to apply the correction (stretch the 560x200 image to fit a 560x240 area, i.e. 14:5 -> 21:9) to make it appear correct.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Option to change aspect ratio of menu background images

Post by Graf Zahl »

The drawer only autocorrects 320x200 and 640x400. Everything else gets used in its native aspect ratio.
Gez
 
 
Posts: 17833
Joined: Fri Jul 06, 2007 3:22 pm

Re: Option to change aspect ratio of menu background images

Post by Gez »

So could there be a mode that's basically 3 + vertical stretching by 20%; or should TEXTURES be used to rescale all images first?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Option to change aspect ratio of menu background images

Post by Graf Zahl »

I think with a height of 200 we can generally assume that it needs to be stretched. For anything higher, even 400, I wouldn't.
Locked

Return to “Closed Feature Suggestions [GZDoom]”