Forum > Software Development

[TOOL]  A new BLP Converter

(1/3) > >>

relaxok:
Hi all -

I had been previously been trying to rely on some combination of two versions of BLPConverter and BLPLab to convert every blp in the MPQ tree to a png for use in non blizz things.  Unfortunately while they are pretty good there are still certain file types and methods that these tools fail on, making it pretty much impossible to have a toolchain where an engine doesn't complain that stuff is missing.   I'm sure if you have been hardcore into anything with BLPs you'll know how most of the 4-bit alpha textures do not work with the converters available, for example.

Anyway, I got pretty fed up yesterday and wrote a BLP Converter.. it seems to handle all the texture types correctly with my testing so far..  I'd like to release a version of it to the community as a very simple CLI tool.. blah.exe infile outfile, maybe with some options.  Currently I have it writing out to my own .TXR format with mipmaps included.

If you were to have a tool like this, what are the primary outputs you'd want, say besides PNG?  Is that good enough?  What about the other mipmaps beyond the base level?  What about other features?

FYI I'm only testing it with WOTLK data, except for Interface data which is whatever's the latest on bnet.  It seems to work with the newer uncompressed A8R8G8B8 types as well so it might work for all MoP stuff, not sure.   If someone wants to try let me know.  I"d like to find out what bugs might exist as currently I'm just going around the world seeing if anything looks off.  One thing that might need testing is clothing type textures...

Curious about going in the other direction as well (? to BLP).. what do you all use for that and is it okay for your purposes? The above tools seem to work okay for that but I don't do that much.

Would be glad to share the code as well if anyone is interested, PM me.. it's very very small/short/easy.

relaxok:
Alright, here is the code.. it's part of my general converter app now but I will put it in its own executable soon and link it here soon.

In the meantime..

.cpp:
http://pastie.org/private/d9tmw7lpcuolmsrcv9yha

.h:
http://pastie.org/private/icm2cexrxcovcljsasjmrq

Sorry, I use tabs spacing so none of the paste sites look right with the code.

Gamh:

--- Quote from: "relaxok" ---If you were to have a tool like this, what are the primary outputs you'd want, say besides PNG?  Is that good enough?  What about the other mipmaps beyond the base level?  What about other features?
--- End quote ---

PNG should be enough for anyone interested :) And for WoW modding I don't think people care about mipmaps.

relaxok:

--- Quote from: "Gamh" ---
--- Quote from: "relaxok" ---If you were to have a tool like this, what are the primary outputs you'd want, say besides PNG?  Is that good enough?  What about the other mipmaps beyond the base level?  What about other features?
--- End quote ---

PNG should be enough for anyone interested :) And for WoW modding I don't think people care about mipmaps.
--- End quote ---

That's what I figured...

Just basically finished it now.. i've got .BLP to .PNG or .TGA, and i've got anything stb_image loads to .BLP.

Currently I am outputting DXT5 .BLPs.. but I don't really think the BLP settings should matter very much.. there's no reason now to use crappier settings unless you're worried about disk space with your modding.. maybe it should even output uncompressed.

relaxok:
I've done some more research on this.  DXT compression is natively used in modern GPUs and only uncompressed at a very late stage in the pipeline.  Overall it is faster performance to use them, not just smaller size.  And for something like terrain or models, you can't tell the difference between them visually.

Learn something new everyday..

I am working on moving the texture conversion features to my main converter app which I would like to release very soon.  I will make another thread on it with d/l link when it is available.

Navigation

[0] Message Index

[#] Next page

Go to full version