FighterHud Alpha

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
JeffBTX
---- E L I T E ----
---- E L I T E ----
Posts: 366
Joined: Sun Dec 27, 2009 2:23 pm
Location: Abilene Texas

FighterHud Alpha

Post by JeffBTX »

I wanted two minor tweaks done to the Fighter Hud (Mk II, the most recent). After one experiment, I'm sure that I can do one of the tweaks myself (widescreen).

This just leaves transparency. The hud panel is just too transparent for me (I can still use it as is, but I would like to lower the transparency). The alpha for hud.png (the panel equipment itself) is already at 1.00

I tried increasing overall alpha up from 0.60... even when increased to 1.00, there doesn't seem to be that much of an effect. MAYBE it is a little less transparent... hard to tell.

I wouldn't mind if the hud panel was completely opaque (I have enough practice in combat and cargo scooping now... it can be opaque without causing problems - and it seems to me it would be more "realistic").

I analyzed hud.png in PaintShopPro 5.1. It is just a one-layer image. One potential problem... if the overall alpha was DRASTICALLY boosted (somehow), DRASTICALLY lowering transparency, would the white background on hud.png cause obscuration... or does Oolite know to ignore that white on HUD OXPs?

===== ===== ===== ===== =====

The other of 2 tweaks:

For WideScreen... this might help others. The default FighterHud when playing Oolite in 1680x1050 is fine, but the left/right edges of the equipment panel do not meet the left/right edges of the screen.

As it turns out, the instructions call for replacing hud.plist with hud1440x900.plist for WideScreen. NO CHANGE. I compared the files. The default hud.plist and hud1440x900 are IDENTICAL (I PM'd CaptKev on this). On a whim, I tried the other two supplied resolution plists. One = no change (1024x768), the other = messed up (1280x1024) = no way (aspect = 1.25).

The native resolution for my 22 inch LCD monitor is 1680x1050, and I am playing Oolite in that resolution with no problems. That is an aspect of 1.6, versus 1.333333333.

I changed the hud.png section in hud.plist (the default hud.plist); changing the default width from 640 to 768; this gives me my aspect of 1.6 (480x1.6=768):

Code: Select all

<key>image</key>
<string>hud.png</string>
<key>width</key>
<real>768</real> ; < - THIS is changed from 640
<key>height</key>
<real>480</real>
<key>x</key>
<integer>0</integer>
<key>y</key>
<integer>0</integer>
<key>alpha</key>
<real>1.00</real>
... and it works. The left/right edges of the hud EXACTLY meet the left/right edges of my screen now. The bottom / top is fine (doesn't "drop off" the bottom, the top doesn't seem to protrude too "up").

The little contrast disk in the middle of the reticle is now slightly elliptical rather than circular, but it is still accurate... I left the station, moved some distance away from the nav bouy, positioned the buoy EXACTLY in the little crosshair in the middle of the little (now oval) contrast disk, and fired; pinpoint accuracy!

The other displays (fuel, speed, compass, etc) STILL line up just fine vertically, but they are displaced horizontally ... easy fix, I will just apply a 1.6 factor to the x-coords of all of them. If that doesn't work for some reason, I will tweak and tweak again until it is right.

When this is finished, I will make a hud1680x1050.plist and archive it, offer it to CaptKev for inclusion into his FighterHud.
Sword, thy name is Cobra. And Cobra has fangs!
User avatar
JeffBTX
---- E L I T E ----
---- E L I T E ----
Posts: 366
Joined: Sun Dec 27, 2009 2:23 pm
Location: Abilene Texas

Post by JeffBTX »

I flipped the overall alpha back and forth a few times from the default 0.60 to 1.00; the only thing that I notice is that the contrast disk is slightly more visible.
Sword, thy name is Cobra. And Cobra has fangs!
User avatar
JeffBTX
---- E L I T E ----
---- E L I T E ----
Posts: 366
Joined: Sun Dec 27, 2009 2:23 pm
Location: Abilene Texas

Post by JeffBTX »

To advance the "tutorial" value; in this situation, all I have to do is to multiply the old x value of a hud object by 1.2 (whether it is positive or negative x); the difference between 1.6 and 1.333333333.

It works perfectly... I just repositioned the compass, it is exactly where it should be. It has a SLIGHT elliptical appearance, but not much... the difference between 1.33 and 1.6 does not adversely effect shape so much. There is no "width" key for the compass anyway. The not-perfectly-circular shape is barely noticible. I will experiment to see if I can IMPOSE a width key... it may or may not work. If it doesn't, no big deal.

EDIT: I've altered the x values of all items from the Station Aegis (the first item) down through the compass; applying a 1.2 factor. Still works perfectly fine. Whenever an item as a WIDTH key, I apply a 1.2 factor.

For the compass, there was no default width... a comment in the plist references \Images\compass.png, but there is no such file in my Oolite installation (otherwise I could DERIVE a correction for width, and add a width key). No big deal... it's hard to tell... it MIGHT still be circular, it is just that the "detent" in the "instrument panel" is now slightly elliptical. I took the ship and and flew some, the compass is just fine.

===== ===== ===== ===== =====

I still need to know how to make the instrument panel less transparent, though, if anyone has ideas.

===== ===== ===== ===== =====

AND done... except for the excessive transparency. I PM'd CaptKev.

My WideScreen version of FighterHud works flawlessly.
Sword, thy name is Cobra. And Cobra has fangs!
User avatar
Corny
---- E L I T E ----
---- E L I T E ----
Posts: 363
Joined: Sun Dec 20, 2009 11:50 am
Location: (northern) Germany

Re: FighterHud Alpha

Post by Corny »

JeffBTX wrote:
I wouldn't mind if the hud panel was completely opaque (I have enough practice in combat and cargo scooping now... it can be opaque without causing problems - and it seems to me it would be more "realistic").
If you have a workaround for that, please post it here. I don't know if I have enough practice to get around with that, but I really would like to have the HUD opaque.

Oh, found one. Works, btw.
another_commander wrote:
DeepSpace wrote:
Is it possible to make the dashboard solid? I've tried altering the alpha value but it never achieves full solidity, it always has a transparency to it.
For no transparency, you will need to add the key overall_alpha in hud.plist and give it a value of <real>1.0</real>. By default Oolite uses an alpha of 0.75 because it looks better on the standard HUD.
[Edit: Fixed my English]
User avatar
JeffBTX
---- E L I T E ----
---- E L I T E ----
Posts: 366
Joined: Sun Dec 27, 2009 2:23 pm
Location: Abilene Texas

Post by JeffBTX »

Corny... it didn't work for me.

As noted above (1st post) the Fighter Hud plist has an overall alpha value, default 0.60. I changed it to 1.00. The alpha for hud.png is also at 1.00.

So... in Resources\Config, I changed THAT hud.plist (I guess we call that the "master hud plist"; at the end of the file there is also an overall alpha constant, default 0.75, and I changed it to 1.00. It DIDN'T help.

(I flushed the cache while loading a few times to make sure. I can still see through the dashboard panel)
Sword, thy name is Cobra. And Cobra has fangs!
User avatar
JeffBTX
---- E L I T E ----
---- E L I T E ----
Posts: 366
Joined: Sun Dec 27, 2009 2:23 pm
Location: Abilene Texas

Post by JeffBTX »

Ah - maybe an answer (as to why this isn't working). An extract from a post by CaptKev (author of FighterHud) in another thread:
CaptKev wrote:
I deliberately made the cockpit slighty transparent, so you could see the cargo being scooped, I'll upload one with no transparency.
... this was concerning the FIRST version of Fighter Hud - not the current "Mk II" version.

"uploading one with no transparency" isn't discussed again...

I have a PM in the system to CaptKev about it, maybe he will get back to me.

In the meantime, I analyzed hud.png from FighterHud Mk II... it is a single layer image with no alpha channel?

EDIT: Okay, yes... I am just not used to working with layers / channels / masks. The problem is that the FighterHud hud.png is inherently transparent.

When I look at layers in PaintShopPro 5.03 (again - something I am not used to... I don't fully understand layers, channels, masks); apparantly there is only one layer.

When I invoke "Image Information"; number of layers = 1, number of alphas = 1. Memory used in RAM: image = 2304K, Masks & Alpha Channels = 769K. THEN I figured out how to specifically look at the transparancy mask, or alpha (which shows up in greyscale). The *entire* PNG is equally transparent - the transparancy mask covers the entire image. So the problem is that if I "got rid of the transparency" (assuming I could figure out how), then the ENTIRE PNG would probably become opaque... NOT just the instrument panel.

Oh well.
Sword, thy name is Cobra. And Cobra has fangs!
User avatar
JeffBTX
---- E L I T E ----
---- E L I T E ----
Posts: 366
Joined: Sun Dec 27, 2009 2:23 pm
Location: Abilene Texas

Post by JeffBTX »

I did one more tweak... I widened the SPD, FUEL, CAB, TEMP and ALT bars so that they were wider and took up more space in that section of the HUD (otherwise they were a bit "too short", even after scaling based on an aspect of 1.6 for a 1680x1050 wide screen). Of course I had to move the x-position a bit when I did that.

Here are some pictures:

(1) Just a nice shot of the HUD, just a starry background. Oolite is running at 1680x1050 (aspect 1.6), the native resolution of my LCD monitor. The Flickr site resized the screenshots from 1680x1050 to 1024x640 upon uploading, but that resolution is still 1.6, so the appearence / scale of these screenshots is correct:
http://farm3.static.flickr.com/2690/426 ... 6063_b.jpg

(2) A planet, moon and a buoy in the foreground. I wish I could decrease the transparency of the instrument panel, or hopefully make it completely opaque:
http://farm5.static.flickr.com/4046/426 ... e313_b.jpg

(3) A station in the foreground. You can JUST see the contrast disk in the reticle area against a shadowed part of the station. On a more lighted area, the contrast disk can't be seen. I suppose it is a necessary trade-off:
http://farm3.static.flickr.com/2684/426 ... 4c2e_b.jpg

... and I just noticed one minor thing, the pylon indicators should probably go a little bit more to the left, towards "ORD".
Sword, thy name is Cobra. And Cobra has fangs!
User avatar
JeffBTX
---- E L I T E ----
---- E L I T E ----
Posts: 366
Joined: Sun Dec 27, 2009 2:23 pm
Location: Abilene Texas

Post by JeffBTX »

OKAY... problem solved (sort of), and subject closed... but maybe this thread can help any newbies that try to do what I tried...

The problem definitely WAS with the PNG.

I quickly learned about things in PaintShopPro that I had never messed with before; masks, alpha channels; and how to EDIT them.

I figured out how to "remove" the transparency from PART OF the image (the instrument panel). I successfully edited the alpha channel of FighterHud hud.png. This resulted in the instrument panel being COMPLETELY opaque in the game. It was EXACTLY the effect that I was looking for.

And BTW my guess was right... I figured out how to just remove the alpha channel altogether... I saved the PNG as a BMP, loaded the BMP, and resaved it as a PNG (losing the mask layer). It DID completely obscure the upper area of the screen with pure white... that answered the question "Does Oolite know to ignore white in these HUD OXPs that add dash panels?" Answer = no it doesn't.

Anyway, one small problem with the mask-edited PNG. In the middle of the dash panel at the top edge there is something that looks like a hinge for a flip-up display. Part of that obscures part of the last line of text - like a small notch up into the last line of the text area. So when the game is started, instead of seeing "Load Previous Commander? (Y/N)", you see "Load P___________________(Y/N)". And actually part of the P in Previous is obscured. Messages in space are obscured... "Front View" and so forth is obscured in the middle.

I could just make that part of the panel semi-transparent I suppose.

But I am working on my own HUD idea, if I can figure out a couple of things.

At least I learned a few things today.
:)
Sword, thy name is Cobra. And Cobra has fangs!
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

JeffBTX wrote:
Corny... it didn't work for me.

As noted above (1st post) the Fighter Hud plist has an overall alpha value, default 0.60. I changed it to 1.00. The alpha for hud.png is also at 1.00.
The problem you might have there is that hud.png is already defined as semi-transparent. Do edit it using a semi-decent graphic editor (free ones: The Gimp, cross platform or paint.NET, windows only afaik).

Just in case you feel stuck after loading the png inside your graphic editor: the easiest way of increasing the 'solidity' of a picture is to duplicate the original layer. The more identical semi-transparent layers there are, the more solid the final picture will be.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
JeffBTX
---- E L I T E ----
---- E L I T E ----
Posts: 366
Joined: Sun Dec 27, 2009 2:23 pm
Location: Abilene Texas

Post by JeffBTX »

Kaks; thanks...

You must have just gotten up...
:lol:

... I pretty much covered that in my previous post "Problem solved (sort of)..."

Anyway, thanks, what you said (duplicating layers) makes sense...
... this particular PNG, though, reads as 1 layer in Paint Shop Pro (5.03), with a "mask", used as an alpha channel. KIND of a layer I suppose. Terminology might be different between paint applications.

I learned a lot from the experience, and I will just make my own hud.
Sword, thy name is Cobra. And Cobra has fangs!
User avatar
Corny
---- E L I T E ----
---- E L I T E ----
Posts: 363
Joined: Sun Dec 20, 2009 11:50 am
Location: (northern) Germany

Post by Corny »

JeffBTX wrote:
Corny... it didn't work for me.

As noted above (1st post) the Fighter Hud plist has an overall alpha value, default 0.60. I changed it to 1.00. The alpha for hud.png is also at 1.00.
Ah damnit, sorry. I only tried it with the Deepspace-HUD and it worked. Didn't read your post properly after that...
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

You must have just gotten up...
Yep! Still a bit groggy, but I thought I'd help! - or hinder! :P
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
JazHaz
---- E L I T E ----
---- E L I T E ----
Posts: 2991
Joined: Tue Sep 22, 2009 11:07 am
Location: Enfield, Middlesex
Contact:

Post by JazHaz »

JeffBTX wrote:
I did one more tweak... I widened the SPD, FUEL, CAB, TEMP and ALT bars so that they were wider and took up more space in that section of the HUD (otherwise they were a bit "too short", even after scaling based on an aspect of 1.6 for a 1680x1050 wide screen). Of course I had to move the x-position a bit when I did that.
Image

I like these changes. I have widescreen too, so this is something I might like to have on a HUD.

One thing about this, it might be better to move the energy banks to the section where the Cobra is depicted and perhaps move the shield indicators to where the energy banks are now. Get rid of the Cobra graphic!! That area is bigger and would help when you fly a ship with more energy banks (my Python has 7!).


BTW Jeff, I would like to add you as a contact on Flickr! And anyone else from here who is on it!! Here's my profile link on there: http://www.flickr.com/people/jazhaz/
JazHaz

Gimi wrote:
drew wrote:
£4,500 though! :shock: <Faints>
Cheers,
Drew.
Maybe you could start a Kickstarter Campaign to found your £4500 pledge. 8)
Thanks to Gimi, I got an eBook in my inbox tonight (31st May 2014 - Release of Elite Reclamation)!
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

I've just added you as a contact as Flickr (I don't use it much at the moment put plan on using it more)
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
ClymAngus
---- E L I T E ----
---- E L I T E ----
Posts: 2514
Joined: Tue Jul 08, 2008 12:31 am
Location: London England
Contact:

Post by ClymAngus »

If it helps feel free to hack apart medusa.HUD

:D
JeffBTX wrote:
OKAY... problem solved (sort of), and subject closed... but maybe this thread can help any newbies that try to do what I tried...

The problem definitely WAS with the PNG.

I quickly learned about things in PaintShopPro that I had never messed with before; masks, alpha channels; and how to EDIT them.

I figured out how to "remove" the transparency from PART OF the image (the instrument panel). I successfully edited the alpha channel of FighterHud hud.png. This resulted in the instrument panel being COMPLETELY opaque in the game. It was EXACTLY the effect that I was looking for.

And BTW my guess was right... I figured out how to just remove the alpha channel altogether... I saved the PNG as a BMP, loaded the BMP, and resaved it as a PNG (losing the mask layer). It DID completely obscure the upper area of the screen with pure white... that answered the question "Does Oolite know to ignore white in these HUD OXPs that add dash panels?" Answer = no it doesn't.

Anyway, one small problem with the mask-edited PNG. In the middle of the dash panel at the top edge there is something that looks like a hinge for a flip-up display. Part of that obscures part of the last line of text - like a small notch up into the last line of the text area. So when the game is started, instead of seeing "Load Previous Commander? (Y/N)", you see "Load P___________________(Y/N)". And actually part of the P in Previous is obscured. Messages in space are obscured... "Front View" and so forth is obscured in the middle.

I could just make that part of the panel semi-transparent I suppose.

But I am working on my own HUD idea, if I can figure out a couple of things.

At least I learned a few things today.
:)
Post Reply