Switching from .png to a more compact file type for textures

Ideas and suggestions for how to improve the Warzone 2100 base game only. Ideas for mods go in Mapping/Modding instead. Read sticky posts first!
User avatar
Shadow Wolf TJC
Regular
Regular
Posts: 1047
Joined: 16 Apr 2011, 05:12
Location: Raleigh, NC

Switching from .png to a more compact file type for textures

Post by Shadow Wolf TJC »

Perhaps we could reduce the amount of data that Warzone 2100's textures take up by switching from .png to a more compact file type, like .jpeg? I doubt that we'd have much to lose, if any, as we don't seem to make any use of such fancy features like alpha values for textures and such.

Or we could just add support for being able to load different kinds of file types.
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
User avatar
Berg
Regular
Regular
Posts: 2204
Joined: 02 Sep 2007, 23:25
Location: Australia

Re: Switching from .png to a more compact file type for text

Post by Berg »

Shadow Wolf TJC wrote: as we don't seem to make any use of such fancy features like alpha values for textures and such.
I think you should look into the use of alpha used in textures.
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Switching from .png to a more compact file type for text

Post by cybersphinx »

We want information... information... information.
User avatar
Shadow Wolf TJC
Regular
Regular
Posts: 1047
Joined: 16 Apr 2011, 05:12
Location: Raleigh, NC

Re: Switching from .png to a more compact file type for text

Post by Shadow Wolf TJC »

@cybersphinx: Would compressing .jpeg files in, say, a .zip or .rar degrade the quality even further?
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Switching from .png to a more compact file type for text

Post by cybersphinx »

No. But it also wouldn't reduce the size any further.
We want information... information... information.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Switching from .png to a more compact file type for text

Post by NoQ »

The same applies to png by the way.
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland

Re: Switching from .png to a more compact file type for text

Post by Emdek »

Shadow Wolf TJC, PNG is one of the best solutions currently available for free, going backwards doesn't make sense. :-)
Also AFAIK data is already optimized using tools like pngcrush.
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
User avatar
aubergine
Professional
Professional
Posts: 3462
Joined: 10 Oct 2010, 00:58

Re: Switching from .png to a more compact file type for text

Post by aubergine »

You've got to remember that while jpeg might save on overall download size (not that download size really matters much these days) the images always get converted to some sort of bitmap format in RAM for use by the OpenGL engine so it won't save (and could actually use more) VRAM.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland

Re: Switching from .png to a more compact file type for text

Post by Emdek »

aubergine, yeah, but user visible changes like potential quality loss would be probably more noticeable. ;-)
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
Jorzi
Regular
Regular
Posts: 2063
Joined: 11 Apr 2010, 00:14

Re: Switching from .png to a more compact file type for text

Post by Jorzi »

I am an artist and I require png :P
Seriously, it's probably the best format out there, fairly compact with all the needed features. I even save raw video data as .pngs.
Only format which is superior is .exr, which certainly isn't smaller :P
ImageImage
-insert deep philosophical statement here-
User avatar
Iluvalar
Regular
Regular
Posts: 1828
Joined: 02 Oct 2010, 18:44

Re: Switching from .png to a more compact file type for text

Post by Iluvalar »

Jorzi wrote:I am an artist and I require png :P
Seriously, it's probably the best format out there, fairly compact with all the needed features. I even save raw video data as .pngs.
Only format which is superior is .exr, which certainly isn't smaller :P
SVG is better when SVG is applicable. A well built, handwritten SVG. Ahh ! :3

Shadow wolf, the PNG files have a nice compression rate considering there is NO LOST in it. It's not rational to increase the texture size if we are about to compress it with JPEG.

However, I never tried yet, but is it possible to use smaller texture files (say 16x16) in a mod ?
Heretic 2.3 improver and proud of it.
Jorzi
Regular
Regular
Posts: 2063
Joined: 11 Apr 2010, 00:14

Re: Switching from .png to a more compact file type for text

Post by Jorzi »

I know a plugin for blender that allowed svg textures, pretty interesting stuff. Obviously, you can't feed it to the gpu though...
An interesting idea for toon style games would be to have textures saved as svg, rendering them on the fly to a predefined resolution when loading the game.
ImageImage
-insert deep philosophical statement here-