OpenArena Message Boards

Other projects => Pointless => Topic started by: andrewj on April 23, 2008, 05:46:19 AM



Title: [OQ+] qpakman tool
Post by: andrewj on April 23, 2008, 05:46:19 AM
QPakMan is an all-singing all-dancing Quake1 pak/mip tool.

Package with Windows and Linux binaries is here:
http://glbsp.sourceforge.net/files/qpakman-062b.zip (http://glbsp.sourceforge.net/files/qpakman-062b.zip)

What it can do:
1) list pak / wad contents
2) create a pak file
3) unpack a pak file
4) create a miptex wad
5) create a pic wad (GFX.WAD)
6) unpack a wad (pics or miptex)
7) extract miptex from pak / bsp

What it cannot do (yet) :
1) convert LMP images
2) convert Quake2's WAL images
3) sing or dance

Special file names for miptex creation:
"plus_" prefix will become '+'
"star_" prefix will become '*'
"_fbr" suffix allows use of fullbright colors in the palette

Manual and Source now included :)


Title: Re: qpakman 0.52
Post by: fromhell on April 23, 2008, 03:27:28 PM
Than you I will give this a try to night!


Title: Re: qpakman 0.52
Post by: fromhell on April 27, 2008, 12:31:48 AM
I lied. I'm finally going to try it today. I'll let you know of anything that goes awry.

I've adjusted my texture filenames and made qpakman part of the build process in a different .bat file, this is good  :)


Title: Re: qpakman 0.52
Post by: fromhell on April 27, 2008, 01:14:18 AM
BUG NOTOICED!

The sky textures don't really seem to keep their index 0 transparency, for some reason. This is me trying it on my starry, blue clouded sky i am so fond of


Title: Re: qpakman 0.52
Post by: andrewj on April 27, 2008, 07:08:23 AM
Please post a link to the sky image itself.

Does the sky image use actual transparency (alpha channel in PNG talk) or a special color (if so, what color) ?

Lastly I assume only textures which begin with "sky" get the special treatment, so let me know if that's not right.


Title: Re: qpakman 0.52
Post by: fromhell on April 27, 2008, 11:36:44 AM
http://mancubus.net/svn/hosted/fsfps/oqplus/textures/wad/fromhell/skydark_fbr.png

The sky uses Color index 0 for black and transparency. Some textures get transparency from 0 rather than 255 (like conchars, skies, and conchars, and don't forget skies)

QPakman remaps this to Color index 48 and breaks it.


Title: Re: qpakman 0.52
Post by: andrewj on April 29, 2008, 01:30:26 AM
New binary with the sky fix:
http://glbsp.sourceforge.net/files/qpakman_055.zip

Extracting the miptex will use Alpha transparency for the sky images.
Miptex packer supports both Alpha (any image) and the color black (left half of "sky" images).

Conchars seems to be PIC format instead of MIPTEX format, even though it is tagged as miptex in Quake's "gfx.wad" file.  Doesn't matter just now as I don't support PIC yet.


Title: Re: qpakman 0.52
Post by: fromhell on April 29, 2008, 01:35:18 AM
well conchars can always be raw opened (128x128x8) but that's not an idiotproof process. Hexen II has a TINYFONT (128x64) and a big conchars (256x256) so it'll be tougher 'detecting' those. Maybe go by their file size.


Title: Re: qpakman 0.52
Post by: fromhell on May 02, 2008, 01:08:44 AM
Maybe an 'exclude' feature would work so I wouldn't have the .svn files get paked.


Title: Re: qpakman 0.52
Post by: andrewj on May 02, 2008, 03:00:07 AM
I will fix the PAK creation to ignore any file/directory starting with a dot.
That will solve the .svn problem.

For CONCHARS and TINYFONT, packing is no problem, just convert PNG
to a block of raw pixels where index #0 means transparent.

Unpacking them: guess the dimensions based on lump size, or FAILURE
when the lump size is weird.  That is enough for me (packing is the most
important thing).


Title: Re: qpakman 0.52
Post by: fromhell on May 03, 2008, 12:51:08 AM
Maybe a parm to use an external palette lmp would be cool too


Title: Re: qpakman 0.52
Post by: andrewj on May 03, 2008, 04:10:44 AM
External palette would be easy to support.


Title: Re: qpakman tool
Post by: andrewj on June 29, 2008, 06:13:33 AM
UPDATE:

Made PAK creation ignore files beginning with a dot, like ".SVN".
Untested so feel free to swear at me if it doesn't work.
Download link is in the very first post.


Title: Re: qpakman tool
Post by: fromhell on July 02, 2008, 02:56:55 PM
Thanks, i'll give this a try later


Title: Re: qpakman tool
Post by: fromhell on August 22, 2008, 11:15:40 PM
Awesome, now the pak is 6.76mb and takes a fraction of a second to make! This is motivating.


Title: Re: qpakman tool
Post by: andrewj on August 24, 2008, 08:30:23 AM
:-)

I'm in the mood to work on QPakman this week, been playing Quake II and wanna poke around its pak file.


Title: Re: qpakman tool
Post by: fromhell on August 24, 2008, 09:55:41 AM
that's good because i'm editing oqplus this week as well


Title: Re: qpakman tool
Post by: andrewj on August 30, 2008, 08:54:27 AM
OK version 0.62 is done (link in first post)

New stuff:
+ can create and unpack GFX.WAD
+ documentation!!
- built-in palettes for Hexen II and Quake II
- support custom palettes
- can do MAKETEX (make texture wad from paks/bsps)


Title: Re: qpakman tool
Post by: fromhell on October 15, 2008, 01:10:54 AM
odd, when creating a haktoria pak0 it still includes the SVN folder

my arguments:
qpakman.exe models/* maps/* sound/* gfx/* gfx.wad default.cfg hexen.rc end.bin end2.bin -o pak0.pak


Title: Re: qpakman tool
Post by: andrewj on October 15, 2008, 01:52:32 AM
I guess "models/*" under windows will include files/folders that start with a dot.
[linux does not do that]

Try: models/*.*  gfx/*.*  maps/*.*   [etc....]

[EDIT] Better yet, don't use '*' at all:  qpakman models gfx sound maps ..... -o foo.pak



Title: Re: qpakman tool
Post by: andrewj on October 24, 2008, 05:10:00 AM
NEWER VERSION

Haktoria palette is built in: -game haktoria
Converts LMP lumps to/from PNG images
Error diffusion for Miptex creation
Converts palette.lmp to/from palette.txt
Converts fontsize.lmp to/from fontsize.txt
Can make these lumps: invpal.lmp, tinttab.lmp, tinttab2.lmp, 16to8.dat

Note: I'm not sure tinttab.lmp (the one for particles) is generated correctly, the one in H2Demo is just weird, as if particles were using their own (different) palette.

WILL DO SOON:
Analysis and generation of colormap.lmp, colormap.pcx and player.lmp
Conversion of gfx/menu/conchars.lmp to/from PNG


Title: Re: qpakman tool
Post by: fromhell on November 06, 2008, 02:48:23 AM
tried it, its nice having red blood  particles again :D
there's no source in this one btw