[Added] Option to change aspect ratio of menu background images

Moderator: GZDoom Developers

Re: Option to change aspect ratio of menu background images

Postby Nash » Sun Mar 15, 2020 6:02 am

@ 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
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Option to change aspect ratio of menu background images

Postby Graf Zahl » Sun Mar 15, 2020 8:53 am

I never added such a thing so I cannot say.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Option to change aspect ratio of menu background images

Postby Nash » Sun Mar 15, 2020 9:23 am

I won't be surprised if said mod was relying on undefined behaviour/code then.
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Option to change aspect ratio of menu background images

Postby Tormentor667 » Mon Mar 16, 2020 2:40 pm

Graf Zahl wrote:Aaaand...
It's finally done. :)


Awesome :) Is there already a wiki entry describing how it is implemented or defined?
User avatar
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany

Re: Option to change aspect ratio of menu background images

Postby Matrix » Wed Mar 25, 2020 11:39 pm

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.
Matrix
 
Joined: 23 Nov 2019

Re: Option to change aspect ratio of menu background images

Postby drfrag » Thu Mar 26, 2020 3:11 am

You need a GAMEINFO flag:
Code: Select allExpand view
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.
User avatar
drfrag
I.R developer, I.R smart
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Github ID: drfrag666

Re: Option to change aspect ratio of menu background images

Postby Gez » Thu Mar 26, 2020 3:22 am

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.
Gez
 
 
 
Joined: 06 Jul 2007

Re: Option to change aspect ratio of menu background images

Postby Matrix » Thu Mar 26, 2020 2:57 pm

drfrag wrote:You need a GAMEINFO flag:
Code: Select allExpand view
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?
Matrix
 
Joined: 23 Nov 2019

Re: Option to change aspect ratio of menu background images

Postby Chris » Thu Mar 26, 2020 4:15 pm

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
Chris
 
Joined: 17 Jul 2003

Re: Option to change aspect ratio of menu background images

Postby Nash » Thu Mar 26, 2020 4:21 pm

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
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Option to change aspect ratio of menu background images

Postby Chris » Thu Mar 26, 2020 4:42 pm

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
Chris
 
Joined: 17 Jul 2003

Re: Option to change aspect ratio of menu background images

Postby Graf Zahl » Thu Mar 26, 2020 5:09 pm

The drawer only autocorrects 320x200 and 640x400. Everything else gets used in its native aspect ratio.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Option to change aspect ratio of menu background images

Postby Gez » Thu Mar 26, 2020 5:12 pm

So could there be a mode that's basically 3 + vertical stretching by 20%; or should TEXTURES be used to rescale all images first?
Gez
 
 
 
Joined: 06 Jul 2007

Re: Option to change aspect ratio of menu background images

Postby Graf Zahl » Fri Mar 27, 2020 12:58 am

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Previous

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: Semrush [Bot] and 3 guests