feature request: PNG support

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
SargeBaldy
Posts: 366
Joined: Tue Jul 15, 2003 3:49 pm
Location: Oregon
Contact:

feature request: PNG support

Post by SargeBaldy »

PNG support for textures would vastly reduce the size of a wad with a lot of new textures. a 256x256 BMP is 193k. a PNG of that same image would only be 20 or 21k. with high res textures, a zdoom wad can easily balloon up to a fairly considerable size. is PNG support at all practical?
User avatar
Chris
Posts: 2971
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Post by Chris »

This, and .wad.gz/.wgz support would rule muchly. *nodnods* zlib even comes with gzio routines which supposedly mirror stdio FILE routines, I think.
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Operating System Version (Optional): Tumbleweed x64
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany
Contact:

Post by Hirogen2 »

/me points to bz2lib.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49228
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Chris wrote:This, and .wad.gz/.wgz support would rule muchly. *nodnods* zlib even comes with gzio routines which supposedly mirror stdio FILE routines, I think.

I think it would be more efficient to compress single lumps instead of the whole WAD at once. Unless the .gz format has some very sophisticated searching features this could seriously affect the performance of the game.
User avatar
Enjay
 
 
Posts: 26983
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

Whilst I agree, using png would almost certainly be smaller than the current format, I'm pretty sure the current format is not BMP. You may be using BMPs as your source image, but your editing tool will be converting them to Doom format graphics for the WAD.

As for the actual benefits, versus disadvantages of this. Meh! I dunno. I am bothered about file download size. Once I have a file on my HD, I don't really care how big it expands/unzips to. I also wouldn't like anything that hits Zdoom performance.
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Operating System Version (Optional): Tumbleweed x64
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany
Contact:

Post by Hirogen2 »

PNG can have more than 8 bit color, and has various compression settings. "DoomBMP" has none of this.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49228
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Enjay wrote:Whilst I agree, using png would almost certainly be smaller than the current format, I'm pretty sure the current format is not BMP. You may be using BMPs as your source image, but your editing tool will be converting them to Doom format graphics for the WAD.
If there is an 8-bit format without a palette, yes. Otherwise for small graphics you'll get a significant increase in size due to the added palettes.
As for the actual benefits, versus disadvantages of this. Meh! I dunno. I am bothered about file download size. Once I have a file on my HD, I don't really care how big it expands/unzips to. I also wouldn't like anything that hits Zdoom performance.
Packing every lump with ZLib doesn't significantly hit performance. If a lump has to be read in there is so much system overhead that the decompression time hardly matters.
User avatar
randomlag
Posts: 405
Joined: Thu Jul 17, 2003 10:10 pm

Post by randomlag »

All depends what you want to believe :P

Ignoring the 32 bit stuff (we've gone over the huge file sizes here before - PNG or no PNG), it's really not that different for 8-bit. All depends on the image color contents/variation of course since that determines how well it will compress -a cartoon is the best and real life pictures the worst.

Here's a comparison of 2 8-bit images in PNG vs DOOM format that use a fairly wide color range (198 colors the KingTut mask):

PNG = 3707 (PSP, Photoshop was much larger even with various options 5000 or so)

DOOM = 4680 (always this size if not transparent - transparent of course saves a LOT more)

ZIP (of BMP) = 4083

Even it is 1/2 on the average (don't remember, but I think that's what I figured out a long time ago for JDOOM - not the figure Bald gave, in fact the same test image for 256x256, 24bit is 196kb for BMP and 104kb for PNG, not even close to what was claimed . If you zip the BMP, file size is 134kb hardly worth it.

Besides, as far as file size goes, not an issue. If you ZIP the PWAD, you get basically the same size reduction as for PNG (in the graphics).

File size is all about bandwidth concerns ( storage and download). Download size is no different (when zipped) and the first is not even close to the issue it was 3 years ago. IOW, filesize is a 2nd or 3rd level concern.

And since encoding increases the program memory resource footprint - that's a negative aspect :idea:

There are much better things to do then put all that effort into native PNG (or ZIP) support in ZDOOM. KISS has many advantages.
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Post by randi »

PNG support is planned. So is a truecolor software renderer.

Take that for what it's worth.
User avatar
SargeBaldy
Posts: 366
Joined: Tue Jul 15, 2003 3:49 pm
Location: Oregon
Contact:

Post by SargeBaldy »

yay true color :) that will be awesome as well.
zarcyb
Posts: 28
Joined: Wed Jul 16, 2003 3:12 am
Location: Edinburgh/Dundee, Scotland
Contact:

Post by zarcyb »

When can we expect to see truecolour and PNG support? :) Can't wait!
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Post by randi »

zarcyb wrote:When can we expect to see truecolour
How long has there been a bit depth option in the video modes menu? :-) Though playing Enjay's NJMA01 makes me want to actually spend time writing it. The new palette used there looks really good, and I think Doom could look very nice if it wasn't restricted by a 256 color palette.

I will probably also add support for JPEG textures whenever I write the truecolor renderer. Maybe DXTC/S3TC compressed textures, too.
User avatar
Zell
Posts: 791
Joined: Thu Jul 24, 2003 7:47 am
Location: IN A GODDAMN BOX[In Erie.]

Post by Zell »

randy wrote:
zarcyb wrote:When can we expect to see truecolour
How long has there been a bit depth option in the video modes menu? :-) Though playing Enjay's NJMA01 makes me want to actually spend time writing it. The new palette used there looks really good, and I think Doom could look very nice if it wasn't restricted by a 256 color palette.

I will probably also add support for JPEG textures whenever I write the truecolor renderer. Maybe DXTC/S3TC compressed textures, too.
OMG! ARE YOU SAYING THAT WE CAN MAKE GREAT LOOKING THINGS? :D
Cyb
Posts: 912
Joined: Tue Jul 15, 2003 5:12 pm

Post by Cyb »

hooray!
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Don't get your hopes up guys. Knowing Randy's schedule, this won't happen until 2005. :)
Locked

Return to “Editing (Archive)”