Author Topic: HUD questions  (Read 2964 times)

0 Members and 2 Guests are viewing this topic.

Offline gloowa

  • 25
Hello,

Sorry if this is wrong board for this sort of question but it seemed appropriate.

Now, the question: is there a way to make all HUD items less (or not at all) transparent? I have terrible eyesight (5+ dioptries and rising :/) and reading some gauges is near-impossible in combat, especially in higher resultion.

This also binds with another question: is it possible to add some sort of background to the text (communications in-mission)? Whatever color i set it to, there will be something big in mission that will make it unreadable when it's "behind" the text.

And third, and hopefully last question: Is there a way to disable 2d radar blob from drawing? i prefer the 3d radar, but there are 2 problems with fully enjoying it: 1st, if i set it near-black, it's still there, and painfully visible on some backgrounds. 2nd, some mods (hello BP) use radar color for custom gauge color (for instance Signal Strength meter in 2nd mission of Tenebra) which makes black 2d radar a no-go in that missions. Alternatively, is there a way to make it (2d radar) non-transparent black blob?
Adm. Petrarch: For your excellent record of confirmed kills, you reached status of Ace.
Laporte: Dude, WTH are you doing in Indus briefing room?

  

Offline Aardwolf

  • 211
  • Posts: 16,384
    • Minecraft
Well there's a control that toggles them between two brightnesses, which by default is L.

 

Offline Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Minecraft
    • Steam
    • Something
Some of these might be possible by editing the HUD image files, though I'm not sure exactly how much versatility the engine currently supports in that regard.  Hopefully someone who's more familiar with that side of things pops in here, so that we can figure out what can be done to help you out. :)

 

Offline Axem

  • 211
The HUD contrast can help, but the trend of big bright backgrounds and unscaled hud gauges still make it really hard to read your hud. And editing the hud files probably won't help because the game just draws anything as transparent grayscale for the hud. (Talking heads being an exception with a special flag)

It directly led me to the drawing method for my scripted message gauge.

http://www.hard-light.net/forums/index.php?topic=87791.0

Basically I draw the gray scale gauge with transparency, then draw the gauge again with the monochrome drawing function so the gauge retains that the desired color, but there is a dark gray background behind it which I have found makes reading things so incredibly more easy.

Could something maybe be done in the code like that?

 

Offline gloowa

  • 25
http://www.hard-light.net/forums/index.php?topic=87791.0

(...)

Could something maybe be done in the code like that?

This please. Or 5th slider in HUD config screen that would represent HUD gauge alpha.
I know (i've been reading HLP forums for 4+ years) that HUD gives some trouble when it comes to modifying it (double-hud bug :P) but in my opinion it's the only part of Freespace that remains fairly unconfigurable (as of SCP configurability standards) for player (it is moddable apparently as mods add custom gauges).

In perfect world, HUD config screen would get additional options for each gauge: alpha, background, scale, position and draw/nodraw toggle.
I would be beyond extatic for any 2 of those.

Anyway, just a hope :P
Adm. Petrarch: For your excellent record of confirmed kills, you reached status of Ace.
Laporte: Dude, WTH are you doing in Indus briefing room?

 

Offline niffiwan

  • 211
  • Eluder Class
http://www.hard-light.net/forums/index.php?topic=87791.0

(...)

Could something maybe be done in the code like that?

This please. Or 5th slider in HUD config screen that would represent HUD gauge alpha.

This would be pretty cool, but maintaining retail compatibility makes it hard to alter the existing retail interface like this (since we can't easily modify the retail bitmaps used to draw the current 4x bars). Adding an option to add dark gray backgrounds would be a lot simpler though.

Although... and just having an idea here... maybe the hud config screen could be altered to display a programatically generated context menu when a gauge is clicked on, and that menu has at least some of the new options you mention...
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
As for retail compatibility, why can't some sort of approach similar to how FS2O handles FS1 music tables work?

Goober basically made it so that all (non - retail FS2 compatible)  code was prefaced by a comment which would cause any version earlier than the one that could handle the new code to not execute those lines.

;;FSO 3.7.2;; {code}
Or something similar.

Dunno if that would work in this situation but anyways..

 

Offline gloowa

  • 25
Excuse my ignorance here, but how does adding alpha control break retail compability? Assuming this can be done without altering retail hud resources, it's just one more float passed to drawHUD (or whatever that function is called) that changes the way the elements are being drawn...
Adm. Petrarch: For your excellent record of confirmed kills, you reached status of Ace.
Laporte: Dude, WTH are you doing in Indus briefing room?

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Excuse my ignorance here, but how does adding alpha control break retail compability? Assuming this can be done without altering retail hud resources, it's just one more float passed to drawHUD (or whatever that function is called) that changes the way the elements are being drawn...

The problem is that there is no control for this on the retail artwork for the HUD options screen. We are somewhat constrained regarding additional controls there, since doing so would mean that we have to distribute the additional interface art in some way that can ensure that everyone can use it.

As for retail compatibility, why can't some sort of approach similar to how FS2O handles FS1 music tables work?

Goober basically made it so that all (non - retail FS2 compatible)  code was prefaced by a comment which would cause any version earlier than the one that could handle the new code to not execute those lines.

;;FSO 3.7.2;; {code}
Or something similar.

Dunno if that would work in this situation but anyways..

That sort of version commenting was and is a bad idea that does not work on a fundamental level. It's slated for removal post-3.7.2, as it introduces more problems than it ever fixed.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline gloowa

  • 25
The problem is that there is no control for this on the retail artwork for the HUD options screen. We are somewhat constrained regarding additional controls there, since doing so would mean that we have to distribute the additional interface art in some way that can ensure that everyone can use it.

Hmm, i see now where the problem is.

How about -hud_alpha launch parameter then? (applied for all hud items)

Also, did anyone ever check how feasible it is to change HUD transparency code-wise? (also, i remember a thread some months ago about new HUD code or somethin' [or is it my memory behaving])

[EDIT]
hmmm, looks like there is some hud alpha code already in?
Code: [Select]
void HUD_init_colors()
{
(...)
saturate(&HUD_color_alpha, 0, HUD_COLOR_ALPHA_USER_MAX);

gr_init_alphacolor( &HUD_color_debug, 128, 255, 128, HUD_color_alpha*16 );
(...)
}
But is this what really controls transparency of gauges?
« Last Edit: July 23, 2014, 07:34:25 am by gloowa »
Adm. Petrarch: For your excellent record of confirmed kills, you reached status of Ace.
Laporte: Dude, WTH are you doing in Indus briefing room?

 

Offline gloowa

  • 25
Sorry for bumping this (really hate doing that), but i would really appreciate an answer: can hud alpha be modified as-is or are changes in source code needed? (by some config changes?)
Adm. Petrarch: For your excellent record of confirmed kills, you reached status of Ace.
Laporte: Dude, WTH are you doing in Indus briefing room?

 

Offline niffiwan

  • 211
  • Eluder Class
I'm pretty sure code changes will be needed to let a modder define the HUD alpha e.g. extending the hud parsing code to accept three or four values after colour (and replace the hard-coded 255 with the 4th value/alpha - this is just from a quick look so I may be wrong here):

Code: (void parse_hud_gauges_tbl(const char *filename)) [Select]
if ( optional_string("$Color:") ) {
stuff_int_list(colors, 3);

check_color(colors);
gr_init_alphacolor(&hud_color, colors[0], colors[1], colors[2], 255);
hud_clr_p = &hud_color;
}

Letting a player change the alpha...  hmm... so there are 4 silders in the hud config screen.  And they can read files like this (see the left & right arrows on the bottom left), so can you already set gauges alpha? Within certain limits, since the slider doesn't go all the way to zero.

Code: (hud_1.hcf) [Select]
+Gauge: lead indicator
+RGBA: 201 187 40 144

+Gauge: target orientation
+RGBA: 146 22 0 144

+Gauge: closest attacking hostile
+RGBA: 146 22 0 144

+Gauge: current target direction
+RGBA: 146 22 0 144

+Gauge: mission time
+RGBA: 84 102 112 255

+Gauge: reticle
+RGBA: 84 102 112 255

+Gauge: throttle
+RGBA: 84 102 112 255

+Gauge: radar
+RGBA: 84 102 112 255

+Gauge: target monitor
+RGBA: 84 102 112 255

+Gauge: center of reticle
+RGBA: 84 102 112 255

+Gauge: extra target info
+RGBA: 84 102 112 255

+Gauge: target shield
+RGBA: 201 187 40 144

+Gauge: player shield
+RGBA: 201 187 40 144

+Gauge: power management
+RGBA: 201 187 40 144

+Gauge: auto-target icon
+RGBA: 146 22 0 144

+Gauge: auto-speed-match icon
+RGBA: 146 22 0 144

+Gauge: weapons display
+RGBA: 146 22 0 144

+Gauge: monitoring view
+RGBA: 84 102 112 255

+Gauge: directives view
+RGBA: 84 102 112 255

+Gauge: threat gauge
+RGBA: 84 102 112 255

+Gauge: afterburner energy
+RGBA: 146 22 0 144

+Gauge: weapons energy
+RGBA: 146 22 0 144

+Gauge: weapon linking
+RGBA: 84 102 112 255

+Gauge: target hull/shield icon
+RGBA: 201 187 40 144

+Gauge: offscreen indicator
+RGBA: 84 102 112 255

+Gauge: comm video
+RGBA: 84 102 112 255

+Gauge: damage display
+RGBA: 84 102 112 255

+Gauge: message output
+RGBA: 84 102 112 255

+Gauge: locked missile direction
+RGBA: 146 22 0 144

+Gauge: countermeasures
+RGBA: 146 22 0 144

+Gauge: objective notify
+RGBA: 84 102 112 255

+Gauge: wingmen status
+RGBA: 84 102 112 255

+Gauge: offscreen range
+RGBA: 201 187 40 144

+Gauge: kills gauge
+RGBA: 84 102 112 0

+Gauge: attacking target count
+RGBA: 84 102 112 255

+Gauge: warning flash
+RGBA: 84 102 112 255

+Gauge: comm menu
+RGBA: 84 102 112 255

+Gauge: support gauge
+RGBA: 84 102 112 255

+Gauge: lag gauge
+RGBA: 84 102 112 255

And here's some constants which look interesting:

Code: [Select]
#define HUD_NUM_COLOR_LEVELS 16
extern color HUD_color_defaults[HUD_NUM_COLOR_LEVELS];

// extern globals that will control the color of the HUD gauges
#define HUD_COLOR_ALPHA_USER_MAX 13 // max user-settable alpha, absolute max is 15
#define HUD_COLOR_ALPHA_USER_MIN 3 // min user-settable alpha, absolute min is 0

#define HUD_COLOR_ALPHA_MAX 15
#define HUD_COLOR_ALPHA_DEFAULT 8

#define HUD_BRIGHT_DELTA 7 // Level added to HUD_color_alpha to make brightness used for flashing

Interesting, I don't have time to dig further right now but maybe that'll give you some ideas / places to look?

edit: typo!
« Last Edit: July 30, 2014, 05:02:13 pm by niffiwan »
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...