Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Swifty on January 05, 2011, 01:55:35 pm

Title: PNG/JPG/TGA support for HUD bitmaps
Post by: Swifty on January 05, 2011, 01:55:35 pm
It would be nice if the Freespace Open engine didn't need to take in those beleaguered 4-bit indexed color PCX files that are a pain to make. It would be great if someone could allow the engine to take in EFFs comprised of PNG, JPG, or TGA.

Ideally, a user would just have to specify an image and the engine would convert the image to grayscale regardless of color palette. And instead of limiting our HUD bitmaps to just 16 shades of gray, we should have access to 256 shades.

Oh wait! It turns out recently someone has committed a change to Trunk that will allow that!

Code: [Select]
r6924 | Swifty | 2011-01-05 02:54:14 -0600 (Wed, 05 Jan 2011) | 1 line
Changed paths:
   M /trunk/fs2_open/code/bmpman/bmpman.cpp
   M /trunk/fs2_open/code/graphics/gropengltexture.cpp

Support for PNG/JPG/TGA based EFFs for the HUD and other graphics that previously required ANI/PCX.

Title: Re: PNG/JPG/TGA support for HUD bitmaps
Post by: headdie on January 05, 2011, 02:10:00 pm
 defiantly earns a :yes:
Title: Re: PNG/JPG/TGA support for HUD bitmaps
Post by: Spoon on January 05, 2011, 02:20:17 pm
Who is this someone? He deserves a lot of praise!
Title: Re: PNG/JPG/TGA support for HUD bitmaps
Post by: Angelus on January 05, 2011, 03:39:52 pm
Who is this someone? He deserves a lot of praise!

Swifty.
and yeah, great job there!
Title: Re: PNG/JPG/TGA support for HUD bitmaps
Post by: Spoon on January 05, 2011, 03:59:02 pm
Thanks master of the obvious  :p
Title: Re: PNG/JPG/TGA support for HUD bitmaps
Post by: Angelus on January 05, 2011, 04:01:36 pm
Hey, it's the internet. You never know...
Title: Re: PNG/JPG/TGA support for HUD bitmaps
Post by: ssmit132 on January 05, 2011, 06:33:08 pm
This is great news! :yes:
Title: Re: PNG/JPG/TGA support for HUD bitmaps
Post by: Shivan Hunter on January 05, 2011, 06:37:38 pm
OH MY GOD YES

THIS WILL BE A GREAT BOON TO a certain something that is currently being um kind of worked on well um

I won't say more

other than that swifty is AWESOME <3
Title: Re: PNG/JPG/TGA support for HUD bitmaps
Post by: pecenipicek on January 05, 2011, 06:59:18 pm
It would be nice if the Freespace Open engine didn't need to take in those beleaguered 4-bit indexed color PCX files that are a pain to make. It would be great if someone could allow the engine to take in EFFs comprised of PNG, JPG, or TGA.

Ideally, a user would just have to specify an image and the engine would convert the image to grayscale regardless of color palette. And instead of limiting our HUD bitmaps to just 16 shades of gray, we should have access to 256 shades.

Oh wait! It turns out recently someone has committed a change to Trunk that will allow that!

Code: [Select]
r6924 | Swifty | 2011-01-05 02:54:14 -0600 (Wed, 05 Jan 2011) | 1 line
Changed paths:
   M /trunk/fs2_open/code/bmpman/bmpman.cpp
   M /trunk/fs2_open/code/graphics/gropengltexture.cpp

Support for PNG/JPG/TGA based EFFs for the HUD and other graphics that previously required ANI/PCX.


gawddammit, now i need to recompile again :p





as a side note, could it be made arbitrary (aka modders choice) wheter to convert to grayscale by default or to keep the colors? i for one would like to prevent people from modifiying colors for my TC :D
Title: Re: PNG/JPG/TGA support for HUD bitmaps
Post by: Spoon on January 05, 2011, 07:05:51 pm
But since the game puts a color overlay on it, it would look wierd wouldn't it?
Title: Re: PNG/JPG/TGA support for HUD bitmaps
Post by: pecenipicek on January 05, 2011, 07:11:59 pm
i'd be happy if that could be... optional.
Title: Re: PNG/JPG/TGA support for HUD bitmaps
Post by: Swifty on January 05, 2011, 07:14:57 pm
All HUD gauges are using color blending bitmap render functions. It's going to require a case by case basis to revise each HUD gauge and their rendering functions to allow support for both color blending and full color support. Full color HUD rendering isn't going to be implemented anytime soon I'm sorry to say.
Title: Re: PNG/JPG/TGA support for HUD bitmaps
Post by: pecenipicek on January 05, 2011, 07:21:39 pm
okay then. i'll figure something out as i go along then.
Title: Re: PNG/JPG/TGA support for HUD bitmaps
Post by: Droid803 on January 05, 2011, 09:40:37 pm
YES YES YES YESYESYESYESYESYESY!!!!!111111!!!1111one
No more snowflakes on people's face woot.
Title: Re: PNG/JPG/TGA support for HUD bitmaps
Post by: Nuke on January 06, 2011, 08:55:47 am
so we can use the full grayscale range now?
Title: Re: PNG/JPG/TGA support for HUD bitmaps
Post by: Shivan Hunter on January 06, 2011, 09:50:22 am
so we can use the full grayscale range now?

... And instead of limiting our HUD bitmaps to just 16 shades of gray, we should have access to 256 shades.

Oh wait! It turns out recently someone has committed a change to Trunk that will allow that!

:)
Title: Re: PNG/JPG/TGA support for HUD bitmaps
Post by: Goober5000 on January 06, 2011, 03:26:15 pm
It would be nice if someone would completely test this feature before removing the explicit prohibition against it in the code. :p

PM sent.
Title: Re: PNG/JPG/TGA support for HUD bitmaps
Post by: Droid803 on January 06, 2011, 04:47:17 pm
hm...doesn't seem to be working for HEAD anis...
Title: Re: PNG/JPG/TGA support for HUD bitmaps
Post by: Herra Tohtori on January 08, 2011, 03:55:37 pm
This is made of win.

On a related topic, is it feasible to ask for HUD alpha intensity option? Either an additional slider on the HUD config screen, or something like the current HUD contrast toggle between high and low contrast (the HUD would thus switch between high opacity and lower opacity options).
Title: Re: PNG/JPG/TGA support for HUD bitmaps
Post by: Nuke on January 08, 2011, 09:10:55 pm
has anyone tested shield icons yet?
Title: Re: PNG/JPG/TGA support for HUD bitmaps
Post by: Kusanagi on January 09, 2011, 02:46:07 am
This is supposed to work for shields icons and command briefing icons, right? Does it also work for weapon loadout screens when weapons aren't used?