Jump to content
The Dark Mod Forums

Inventory icon image file size wastage?


Fidcal

Recommended Posts

I am making some inventory icons and note of the existing ones some are 128 x 128 and some 256 x 256. It seems either stretch to fit the square in the inventory area so presume the 256 x 256 would look better (not tested yet.) But I am intrigued to see that while pretty well all the 256 x 256 use up over 250K there is one, paganorb_icon.tga that does not - it is only around 72K less than a third the file size! I compare its file info with smallbook_icon.tga whose image looks no more complex and probably less complex than the pagan orb.

 

paganorb:

256 x 256

RGB 8 bits channel

layers 1

alpha channels 1

file size : 72K

In RAM : 240K

 

smallbook:

256 x 256

RGB 8 bits channel

layers 1

alpha channels 1

file size : 256K

In RAM : 240K

 

So what is the secret of the pagan orb? And can we save some space? My only clue is that looking closely at the pagan orb I think I see jpg artifacts. Maybe it was saved as a high compression jpg then converted to tga and that saves to disk more efficiently? If so, maybe we should try it with others.

Link to comment
Share on other sites

TGA supports RLE compression (run-length encoding) - it's lossless, but it has a small performance impact, because the data has to be decompressed again before it can be used by D3.

 

For these small images it's probably not worth mentioning, but for the highres textures we chose to save them uncompressed. Maybe this saves a bit of loading time on weaker systems.

Link to comment
Share on other sites

Sometime before release I'll be going through and customizing all of the inventory icons anyway, so I'll look into getting the best filesize to quality ratio then.

Link to comment
Share on other sites

OK - but I think that answers my question :) I just resaved the icon from Paintshop Pro with 'uncompressed' selected and guess what - exactly the same file size. Seems PSPs tga compression is not working.

 

So, if DM is as a general rule avoiding tga compression and if these icons are indicative then the total of all these files is 3 to 4 times the file size. (it may be that icons compress better as they have a lot of border)

Link to comment
Share on other sites

OK - but I think that answers my question :) I just resaved the icon from Paintshop Pro with 'uncompressed' selected and guess what - exactly the same file size. Seems PSPs tga compression is not working.

 

So, if DM is as a general rule avoiding tga compression and if these icons are indicative then the total of all these files is 3 to 4 times the file size. (it may be that icons compress better as they have a lot of border)

 

256x256 icons for inventory sounds a bit overkill to me (I could fit only 6 icons net to each other on my HUGE 1600er resolution :), but then, presumable these pale in comparisation to the rest of the textures.

 

RLE won't work good for photos and/or stuff with lots of colors in it (it can only compress runs of pixels of the same color, like borders).

 

if you want, you can send me the two icons and I can see what I can do to compress them without dropping the quality - sometimes even subtle things like smoothing them, or reducing the number of colors helps.

 

Using 128x128 would mean roughly one quarter of the file size, tho, so maybe just using this would be better :)

 

all the best,

 

Tels

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Yeah, don't bother with compressing TGA's, it just creates more work at load time since they have to be uncompressed to be used by the video card. I'm not sure if we're able to use .dds for the inventory icons...if so, that would be better since they are understood natively by vid cards and do not require any decompression.

Link to comment
Share on other sites

256x256 icons for inventory sounds a bit overkill to me

 

They're not that size on screen. However, D3 images must be saved as powers of two to avoid stretching.

 

if you want, you can send me the two icons and I can see what I can do to compress them without dropping the quality

 

As I said earlier, I'll be going over all the icons when we're closer to the release date. Consider everything a placeholder until then.

 

I'm not sure if we're able to use .dds for the inventory icons.

 

I can't see any reason why not.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
    • nbohr1more

      Trying to be productive on my down-time before Capcom releases Akuma and my son is constantly on my PC playing Street Fighter...
      · 1 reply
    • OrbWeaver

      Finally got round to publishing a tutorial on baking normal maps in Blender, since most of the ones we have are inaccessible or years out of date.
      · 2 replies
    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 4 replies
×
×
  • Create New...