🔒 Question on HUD scaling.

1 Guest is here.
66453eddac202
BinkQuote
I've tried both variations on the option, and only specifying a resolution works. Entering a number doesn't appear to scale the HUD at all. I'm running at 1440x900... And I just realized that it doesn't do anything because 480 only goes into 900 once. Is that why it doesn't work or is there some other issue I might be having?
66453eddac449
voodoo47Quote
yeah, to use d3d_disp_scaled_2d_overlay 2, your vertical resolution must be at least 960. you are at 900, so all you can do is specify it manually. it seem like it just works this way.
66453eddacaa0
bluemessQuote
@Simplex: You are going to far. From all the issues that are discussed here, aspect ratio distortion in widescreen is definitely not one of them. Engine will always show UI properly in every aspect ratio, by moving UI elements to screen edges, not by stretching it out of proportion. This two screens explain it:

4:3:
Image: http://i.imgur.com/c5UYlHC.png
16:9:
Image: http://i.imgur.com/cigtO0q.png

It seems to me that people here are entering some values at random without the idea how it works. This UI scaling is pretty confusing at first. It took a moment for me before I wrapped my head around it. I'll try to explain how it works:

d3d_disp_scaled_2d_overlay with two parameters:

For example: game is running at 1024x768 resolution and d3d_disp_scaled_2d_overlay 768 576 is set. This is what happens:

Step 1 – the game interface was originally designed to fit 640x480 resolution. This is the base from which scaling begins. (Image 1)

Step 2 – engine takes a virtual screen with 768x576 resolution. Then it's placing the UI elements by moving them to screen edges. No scaling is applied yet. UI is still in its original size, but moved around a little bit. (Image 2)

Step 3 – The resulting image from step 2 is now stretch to actual screen resolution, which is 1024x768. This is where scaling happens and it's what we finally see on the screen. (Image 3)

It comes down to that UI will be 768 (screen height) / 576 (virtual screen height) = 1.33 times upscaled. If we would like to have 1.5 times upscaled UI, we would have to set d3d_disp_scaled_2d_overlay to (1024 / 1.5) (768 / 1.5) = 683 512.

d3d_disp_scaled_2d_overlay with one parameter:

For example: game is running at 1920x1440 resolution and d3d_disp_scaled_2d_overlay 2 is set. This means that engine will try to fit two times upscaled UI in the screen. It is essentially equivalent to setting d3d_disp_scaled_2d_overlay to (1920 / 2) (1440 / 2) = 960 720. For d3d_disp_scaled_2d_overlay 3 engine will try to fit UI 3 times upscaled and its equivalent to (1920 / 3) (1440 / 3) = 640 480.

If we set it to 4, engine will not be able to fit UI 4 times because (1920 / 4) (1440 / 4) = 480 360, so the “virtual screen” would have to be smaller that original 640x480 UI size, and it wouldn’t fit in. In this case, engine will choose maximum value that fits, which is 3. Same would happen if we set it to 64. 1280x960 is the lowest resolution that can fit UI two times: (1280 / 2) (960 / 2) = 640 480, so it's the lowest resolution for d3d_disp_scaled_2d_overlay 2 (or 64) to have any effect.
Acknowledged by: Briareos H
66453eddad0c0
SimplexQuote
That's a really great and detailed analysis. Thanks for that.


Quote by bluemess:
@Simplex: You are going to far.
In what sense? I  do not understand what you meant.

I am mostly concerned about the "pixel perfectness" of the scaling, i.e. to avoid uneven scaling. The only way to do it is to scale by even multipliers, i.e. 2 or 3, etc. So from 640x480 the only pixel perfect enlargements would be 1280x960, 1920x1440, 2440x1920, etc. This means that for my 1920x1080 resolution the only acceptable option is hud scaled to 1280x960, if I am not mistaken? (I recall that 960x540 was also suggested, which is exactly half of 1920x1080).

So thanks for your post, because it confirmed my assumptions.
66453eddadabf
bluemessQuote

Quote by Simplex:
That's a really great and detailed analysis. Thanks for that.


Quote by bluemess:
@Simplex: You are going to far.
In what sense? I  do not understand what you meant.
Perhaps I expressed myself a bit unfortunately. What I meant was that any scaling/blurring problems are not related to widescreen/aspect ratio. Engine do proper scaling of UI elements without stretching regardless of aspect ratio. I think this is a wrong place to look for issues, in this case anyway.


Quote by Simplex:
I am mostly concerned about the "pixel perfectness" of the scaling, i.e. to avoid uneven scaling. The only way to do it is to scale by even multipliers, i.e. 2 or 3, etc. So from 640x480 the only pixel perfect enlargements would be 1280x960, 1920x1440, 2440x1920, etc. This means that for my 1920x1080 resolution the only acceptable option is hud scaled to 1280x960, if I am not mistaken? (I recall that 960x540 was also suggested, which is exactly half of 1920x1080).
Precisely. The only pixel perfect scaled UI that “fit in” 1920x1080 is x2. It can be accomplished by setting d3d_disp_scaled_2d_overlay to 2 or 960 540 (16:9) or 720 540 (4:3) – all three ways will have the same effect: UI will be scaled from 640x480 to 1280x960, and its elements will be aligned to screen edges to fit nicely in 1920x1080.


Quote by Simplex:
So thanks for your post, because it confirmed my assumptions.
Thanks and you're welcome.

Legal stuff

Privacy Policy & Terms of Service Contact