Screen Resolution Problems (actually not - and fixed)

Need help running G/Q/ZDoom/ECWolf/Zandronum/3DGE/EDuke32/Raze? Did your computer break? Ask here.

Moderator: GZDoom Developers

Forum rules
Contrary to popular belief, we are not all-knowing-all-seeing magical beings!

If you want help you're going to have to provide lots of info. Like what is your hardware, what is your operating system, what version of GZDoom/LZDoom/whatever you're using, what mods you're loading, how you're loading it, what you've already tried for fixing the problem, and anything else that is even remotely relevant to the problem.

We can't magically figure out what it is if you're going to be vague, and if we feel like you're just wasting our time with guessing games we will act like that's what you're really doing and won't help you.
User avatar
NeoTerraNova
Posts: 153
Joined: Tue Mar 14, 2017 5:18 pm
Location: Western North Southlandia (East Side)

Screen Resolution Problems (actually not - and fixed)

Post by NeoTerraNova »

Greetings, everyone. I never thought I'd have to make a topic like this, but here we are. Recently, I had an issue of my weapon reticles shifting and stretching going between the hardware and software renderers. The entire drama can be seen here (please have a look, it explains a lot):

viewtopic.php?f=7&t=73947

Now, as I said there, I had no idea I was doing something "wrong" in some sense. My issue is.. I have no idea what I'm doing with the video settings. Like, at all. I set the settings to "Force Aspect Ratio" to make the graphics "look right" to me. Apparently, this was a non-standard setting? I don't get it.

What I'm asking for help is.. I don't understand how ELSE to get my video settings adjusted so things "look right" without that forced aspect ratio thing turned on. I mean, I understand that each entry in the video settings does something to adjust the resolution, I'm just trying to figure out what the "right" resolution should be, so that my graphics show up as I intended them to (or close enough), without everything looking distorted, and so that the graphics will look correct in other users' machines.

I have no idea if this is my computer that's causing this all to be wonky.

I have no idea how to set the resolutions "properly" so they're "standard" in some way (like, I don't understand what "standard" is - what the Length x Width @ Ratios would be "standard" for whatever).

I find that 16:9 and ratios like that to be "too tall" looking. I was using a forced ratio at 5:4 but I don't know what the other settings were set at internally, nor do I know if it was actually a true 5:4 and not something else, as it didn't/doesn't tell me explicitly what it's set to when I enable Forced Aspect Ratio. I don't even have any idea if this is something that people do. I just never considered it. I kinda thought that Doom's internal video renderer would somehow automatically adjust things.. I don't know, I'm not a graphics hardware guy.

The enclosed download example weapon in that link should show what I'm talking about, especially if you look at the images further down. You can see how things look on my computer. I have no idea how to "get close" to that with "standard" settings.

Any help is greatly appreciated.
Last edited by NeoTerraNova on Tue Apr 19, 2022 9:25 pm, edited 1 time in total.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48041
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Screen Resolution Problems (and a big one, apparently?)

Post by Graf Zahl »

It's not "too tall". That's just your own subjective opinion. That's just the way Doom looks.

Keep in mind that the game was made for a 320x200 screen resolution with a 4:3 aspect ratio.
That means that for all graphics in the game one pixel is 1.2x as tall as it is wide. This is something you have to keep in mind when creating new assets.
User avatar
nova++
Posts: 177
Joined: Sat Sep 04, 2021 3:13 am

Re: Screen Resolution Problems (and a big one, apparently?)

Post by nova++ »

https://doomwiki.org/wiki/Aspect_ratio

Welcome to the legacy of 1993 VGA hardware! Please enjoy your stay.
User avatar
NeoTerraNova
Posts: 153
Joined: Tue Mar 14, 2017 5:18 pm
Location: Western North Southlandia (East Side)

Re: Screen Resolution Problems (and a big one, apparently?)

Post by NeoTerraNova »

I am aware of these limitations, thank you, though, Nova. I appreciate the comment and pointer.

Mr. Zahl, I'm not claiming it isn't my own subjective opinion. I'm not a young man, and I'd rather grown used to the way my settings were set up (my laptop is over 10 years old). I hadn't realized that I was setting things in a non-standard manner/in a way that would "mess up" other people's perception of the graphics that I use, with their own settings, and I accept full responsibility for my own preconceived notions about how GZDoom's graphics engine works/utilizes assets. I'm not even confident enough to call myself barely competent at the most basic functions of ZScript, something I've been casually working with for a few years, now. Let alone comprehend how the graphics engine works. I was educated to be a website developer and hardware troubleshooter in my youth, programming wasn't something I got into.

I am, however, trying to figure out how to get away from using Forced Aspect Ratio to "solve" my "problem," as you suggested in the previous thread. The graphics "look right" under my own settings, as demonstrated by my screen shots. I had no idea, as I said, that things would look that radically different under different settings, and am trying to figure out, first, if I can find a "standard" resolution and setting to make the graphics I created "look okay" and then go from there. I'm following your advice, sir, I'm just asking for help from the community to point me in the right direction - if there's some way to get things to look right, or close enough, through the video settings I seem to have inadvertently adjusted in such a way as to be so nonstandard as to have caused my original issue.

If you're advising that I adjust the graphics images themselves to a 1.2:1 ratio, to make THEM look "right" at different video ratio settings, then I'll give it a go. I didn't actually realize that this was how things scaled, since I'd never seen it before (again, due to the way I had the video settings, set up). I appreciate your input.

I'm still going to want to see if anyone else would like to chime in and give me pointers, so I don't make such a mistake again, and can get my video settings to "look right" (or at least close enough).

So, thank you, Mr. Zahl for your advice. I will see what I can do.
User avatar
Enjay
 
 
Posts: 26416
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Screen Resolution Problems (and a big one, apparently?)

Post by Enjay »

Although this doesn't help you hugely, it may give you a bit of an idea of how pronounced the 1:1.2 ratio thing is.

In this image, the crate on the left is a standard crate made from Doom sectors. It doesn't look particularly weird to an experienced Doomer but, if you look closely at it and consider that it is meant to be 64x64x64, it is clearly taller than it is wide.

The crate on the right is a model. GZDoom does not automatically apply the 1:1.2 scaling to models. However, with the rest of the world using 1:1.2, the model crate looks strangely squat despite being 64x64x64.



In this second image, I am using the MAPINFO instruction of "PixelRatio = 1.0" to force a 1:1 pixel ratio. Again, it looks weird to a Doomer's eye but this is exactly the same map as the first picture with no other changes and you can see that the left crate (and the rest of the world) have become shorter-looking and now match the model crate.



And, its all because Doom ran at a pixel resolution of 320x200 on 4:3 monitors (which ideally would have had a ratio of 320x240 if it was possible). So stretching the 200 to the same height as 240 makes everything 1.2 times taller.
User avatar
NeoTerraNova
Posts: 153
Joined: Tue Mar 14, 2017 5:18 pm
Location: Western North Southlandia (East Side)

Re: Screen Resolution Problems (and a big one, apparently?)

Post by NeoTerraNova »

That makes sense to me. I think I read the article about this ages ago, but I really appreciate having this spoonfed to me. It's just not something I really paid attention to/thought was important. I do have an additional question, though, Enjay: The pistol sprites in both images are the same size. This is what I'm trying to achieve - make the player weapon-held sprite be the size I want it to. I don't care too much about the other things, it's that representative sprite there for the pistol (and in my case, for a number of custom weapons) that I'm wanting to keep the "right size."

Is the "PixelRatio = 1.0" notation what's doing it, or something else?

Thank you for your help.
User avatar
nova++
Posts: 177
Joined: Sat Sep 04, 2021 3:13 am

Re: Screen Resolution Problems (and a big one, apparently?)

Post by nova++ »

Unfortunately the aspect ratio for weapon sprites is pretty much baked into the engine. You can mess with it a bit by manually scaling each and every sprite frame but it's a huge pain in the ass. I spent a while trying to de-scale-ify the engine a while back and while I was successful, it sucked to do and is scattered in a number of locations throughout.

About the only thing you can do for just working on the assets themselves then, beyond compensating for it just by visualizing it as you make it, is to find something where you can work in a native 1.2x vertical scale - this is what was done back in the original id software days, their art programs used the same aspect as the game, so it matched up. But that's kinda hard to come by, nowadays.
User avatar
SanyaWaffles
Posts: 764
Joined: Thu Apr 25, 2013 12:21 pm
Graphics Processor: nVidia with Vulkan support
Location: Disappointment Island

Re: Screen Resolution Problems (and a big one, apparently?)

Post by SanyaWaffles »

Actually recently this was added to the weapon class

Code: Select all

    Weapon.WeaponScaleX value (development version 410c35b only)

    The horizontal scale multiplier of the weapon's HUD sprite.
    Default is 1.0.

    Weapon.WeaponScaleY value (development version 410c35b only)

    The vertical scale multiplier of the weapon's HUD sprite.
    Default is 1.2.
I dunno if it effects the software mode, but it could be worth a shot.
User avatar
NeoTerraNova
Posts: 153
Joined: Tue Mar 14, 2017 5:18 pm
Location: Western North Southlandia (East Side)

Re: Screen Resolution Problems (and a big one, apparently?)

Post by NeoTerraNova »

Sanya - Thank you very much. I had no idea these additions had been added. Whenever I manage to get a computer better capable of running the latest GZD builds, I'll cross back over and test it. If it works as it should, this would answer ALL my problems.

Nova - I figured that might be the route I'd have to go. I mean, my sprites look just fine in Forced Aspect Ratio 5:4 and okay enough for government work at 4:3 (though they'd need to be adjusted left and right a bit, the "scale" they're at looks fine). It's when I go into like 16:9 or something, the weapon-in-HUD sprites appear too tall and the resulting aim-down-sights are misaligned from point-of-impact.

Hence why I asked the question of how Enjay's screen shots have the pistol-hand looking identical when they stated they were using different aspect ratios in the example pictures, if that's a code trick or something else.
User avatar
NeoTerraNova
Posts: 153
Joined: Tue Mar 14, 2017 5:18 pm
Location: Western North Southlandia (East Side)

Code Calamity Most Foul!

Post by NeoTerraNova »

..yeah, okay, that's a G.I. Joe reference, whatever. I'm happy.

The solution to my problem has been right in front of my face the entire time. The TEXTURES lump. By manually defining the scale, position and offset, the player sprites "look right." More importantly, they're at the "proper visual scale" and can be manually aligned via text input in the TEXTURES lump to aim true (player point-of-aim at the visual center of the reticle will match point-of-impact if the FIRE offsets are set to 0,0).


THIS thread gave me a hint:
viewtopic.php?f=3&t=32288

Here's a simple, single line of code that I used to align the Aim-Down-Sights for this example, placed in a TEXTURE lump.

Code: Select all

sprite M17SA0, 420, 300 {XScale 0.8 Yscale 1.0 Offset 82, 23}
Now, no matter what I do with the Video Options, I can't get the Sprite to "look wrong."* The only drawback is that I have to go back and create a TEXTURE lump for my main project.. but I'd rather have work I know I can do, rather than a mystery driving me batty.

THANK YOU EVERYONE for your patience with me. I apologize if my problem caused anyone any frustrations or aggravations. I'm trying not to be a problem, here.. heh.

* - For some strange reason, the 5:4 Ratio in Hardware mode still contorts the Sprite, but that's as simple as advising anyone playing, not to use that Ratio.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48041
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Code Calamity Most Foul!

Post by Graf Zahl »

NeoTerraNova wrote: * - For some strange reason, the 5:4 Ratio in Hardware mode still contorts the Sprite, but that's as simple as advising anyone playing, not to use that Ratio.
That one would qualify as a bug then. 5:4 is not supposed to do that. I guess the problem here is that this is pretty much an obsolete aspect ratio these days and nobody ever tested it.
User avatar
NeoTerraNova
Posts: 153
Joined: Tue Mar 14, 2017 5:18 pm
Location: Western North Southlandia (East Side)

Re: Screen Resolution Problems (actually not - and fixed)

Post by NeoTerraNova »

I also forgot to explicitly state that my player weapon graphics went into the HIRES folder, in combination with what I did above, and I'm using placeholders in the SPRITES folder, just so everything's clear to someone in the future that might read this.

Thank you all again.

Return to “Technical Issues”