• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

PNG to BLP conversion makes texture 5x bigger !!!

Status
Not open for further replies.
Level 12
Joined
Jan 30, 2020
Messages
875
Hello guys.

I have this texture I remade to update my scrolling text panels that display scrolling messages on the map floor using a special model with 100 basic plane geosets and 100 animations (1 per letter).
Each Geoset points to a letter using TVertices.

Anyways, to improve the quality as well as displaying more possible characters (it was originally designed for 9x9 so 81 characters, I completely recreated the texture, and when everything was perfect and well aligned, I exported the 2048x2048 texture in PNG :
MacadamiaFont.png


This PNG File only weights 190Kb

Now, in order to use it for my model, I converted it to BLP with BLP Lab 5.0. Gave it 6 MipMap levels as I doubt more would be of any use (are 6 miipmap levels even necessary nowadays ?). Chose 40% quality to compress the size as much as I could without making the result horrible.

Surprisingly, the obtained BLP weights 1 289Kb !!!!

(attached the BLP to this message)

How can this be ? Don't tell me 6 mipmap levels can make such a difference ?

PNG has only lossless compression, how can it compress more than a 40% JPEG compression ?

This defeats me....


Anyone would have an idea ? I doubt switching to DDS would ever produce a smaller image.

Note for fun, I tried to use the 256-color palette option, and it made a BLP file of 10Mb :D

Note that this is a problem because my previous version of the texture with a 9x9 letter Grid was 1024x1024 pixels, had 11 mipmap levels and only weighted 161Kb in BLP. (attached it too), here is the PNG version :
MacadamiaFont.png
 

Attachments

  • MacadamiaFont.blp
    1.3 MB · Views: 37
  • MacadamiaFont.blp
    160.7 KB · Views: 39
Level 12
Joined
Jan 30, 2020
Messages
875
Update :

In the end of the day, I gave up the idea of upgrading the model itself.
It ends up the few extra characters are hardly ever used, and the quality difference is, I believe, not worth the difference of filesize.

I have decided to just remake the old font texture, with an intermediate resolution of 1280x1280.
 
Level 12
Joined
Jan 30, 2020
Messages
875
Update !!!:

This is an important update for anyone who needs to convert a PNG texture to BLP with only white as "color" (also works with textures anti-aliased with alpha channel.), like the ones I posted above.

To end up with a much smaller BLP file, all you have to do is alter the color range this way : (tested with Photoshop, should work with GimP and others)
- in Brightness/Contrast first set contrast to minimum and brightness to maximum (the idea is to reduce artifacts on the white textures)
- In Levels, move the left input levels slider as far right as you can (range should go from 253 to 255)
- Do the same with output levels sliders (255 to 255)
- save to PNG


Once converted to BLP, the filesize should be drastically smaller, with no quality loss.

I think this can be useful for everyone making white textures, those that can easily be changed ingame by vertex coloring natives.
 
Status
Not open for further replies.
Top