Jump to content
Sign in to follow this  
feersum.endjinn

Paa/pac texture format documentation

Recommended Posts

First, I have to say big thanks to Rom for all his work with paa/pac file format, this brief description is based on his early work...

PAA/PAC file format description:

First 2 bytes are texture format, possible values so far seen are:

01 FF - RGBA5551, DXT1 compressed texture

80 80 - IA88, Black&White texture with 8-bit alpha

44 44 - RGBA4444, RGB with alpha, 4 bits per component.

If you hex edit flashpoint EXE file, you can find strings hinting at some extra texture format besides these. If anyone has seen other texture types than ones listed above, please let us know!

Then comes header data. Header data is composed of 8 byte header tag, 4 byte header length and then header data itself. Note that header names are stored in file backwards, so that OFFSTAGG is stored as "GGATSFFO".

Possible header values seen so far are:

AVGCTAGG Average color of texture in RGBA8888 format (one DWORD). (?)used with with IA88 type textures(?)

OFFSTAGG Offsets to mipmaps in file, one DWORD each. Note that while 16 offsets are always stored, actual number of mipmaps might be smaller. In this case, offset is marked as 0x00000000.

FLAGTAGG Marks if texture contains transparency. Value 1 means basic transparency, 2 means alpha channel is not interpolated.

After last header, two zero bytes are stored.

Next follows mipmap data. For each mipmap, following header data is stored, followed by mipmap data.

Mipmap width - 2 bytes

Mipmap height - 2 bytes

Mipmap length - 3 bytes, length of compressed mipmap data

Next comes actual mipmap data:

- Texturetypes IA88 and RBGA4444 are compressed using same kind of compression as used in PBO files (LZ with 4k sliding window), followed by 4-byte checksum. I'll probably make compression/decompression source code available as soon as I've cleaned up code and tested them properly.

- DXTC1 textures are stored "as is", width*height/2 bytes.

Finally, last mipmap is followed by 5 zero bytes.

And now, OFP scene needs YOU! Since NVidia DXT converter and Photoshop plugin source code is available on Nvidia developer site for free, anyone can write their own PAC tools and Photoshop plugins...

Any volunteers?  tounge_o.gif

Share this post


Link to post
Share on other sites

What exacty are you looking for?

Kegetys's photoshop plugin to do dxt conversion?

Kegetys's Arma tools

Or Feersum's PaaTool?Which does the same thing,but as

a stand alone tool.

PaaTool

I use Paatool for Ofp editing.And have also used PaaPlug.

They convert 32bit Tga's to PAC (DXT1 5:6:5)(Opaque),

or PAA (DXT1 5:5:5:1)(with Alpha channel).

Obviously Kegs Plugin will work with Arma,but so too

should PaaTool.

If I'm wrong,I'm sure I'll be corrected.

Is that what you were looking for?

Or did I misunderstand your request?

smile_o.gif

Share this post


Link to post
Share on other sites

aha.. i have kagety's pack but the paa plug dident have A4R4G4B4 convertion.. & i D/L & tryed paatool11 but it kinda crashes when i try to convert it..???

it (paa plugin) did however (i assume) convert the way i need it.. as it displayed ARGB4444 huh.gif is that the same?

but it (paatool11) just crashed (froze) to be exact.  confused_o.gif

have a look here Vilas helping same prob i think he told me he hexed it, & never mentioned "paatool11".. this is geting confusing..

im just trying to make my zasle work, my other textures work fine, & the zasleh is scripted/animated & working thanks to Vilas, but the damned zasleh shows up black ...??

Share this post


Link to post
Share on other sites

Well Paatool used to crash for me too.

Until I stopped using "autodetect".

Are you selecting the correct option

when doin the conversion?

For Paa use Dxt1 5:5:5:1

For pac use Dxt1 5:6:5

I can't comment on the scripting,or

hex editing,as I don't know why that would

be needed.Maybe it's a problem particular

to Arma.But the fact that your muzzle flash

is showing black,would suggest it could be

with your alpha channel.

I could be wrong,but try using the above

options instead of Dxt1 RGB444.

Seeing as it has transparency,try Dxt1 5:5:5:1.(Paa)

It may not work out,but give it a go.

Sorry I couldn't be of more help.

smile_o.gif

Share this post


Link to post
Share on other sites

Dxt1 5:5:5:1 & mipmap box IT WORKS!! THANKs ...Macser this has been pissing me off for over a week,

this paatool been what ive been looking for! biggrin_o.gif

Share this post


Link to post
Share on other sites

PaaTool doesn't support new texture formats you can use in ArmA like DXT3/4/5 so I would recommend using PaaPlugin instead.

Share this post


Link to post
Share on other sites
Quote[/b] ]PaaTool doesn't support new texture formats you  can use in ArmA like DXT3/4/5 so I would recommend using PaaPlugin instead.

thanks freesum but  confused_o.gif  it dose work perfectly, when i do what macser told me, no hexing or anything....

& thats for my muzzle flash as (DxT1 in texview) but i have been trying to use paaplugin for weeks to get texture working properly, with no luck, Vilas told me he had to hex his.. so im not sure whats going on but using paatool11 works for me. (no errors or conflicts)

-------------------------------------------------------

UPDATE

the paaplugin however did work great for unit icons & flags etc.. but not main textures for me.

Share this post


Link to post
Share on other sites

Just in case you and others may be wondering

what the difference is with DXT compression,I

found this bit of info.

Quote[/b] ]

Which DXT Compression to Use?

Obviously, there are some trade-offs between the different formats which make them better or worse for different types of images. Some general rules of thumb for good use of DXT textures are as follows:

1. If your image has no alpha, use DXT1 compression. Using DXT3/5 will double your image size over DXT1 and not gain anything.

2. If your image has 1-bit (on or off) alpha information, use DXT1 with one-bit alpha. If the DXT1 image quality is too low and you don't mind doubling image size, use DXT3 or DXT5 (which one doesn't matter, they'll give the same results).

3. If your image has smooth gradations of alpha (fading in/out slowly), DXT5 is almost certainly your best bet, as it will give you the most accurate transparency representation.

4. If your image has sharp transitions between multiple alpha levels (one pixel is 100%, the next one is 50%, and another neighbor is 12%), DXT3 is probably your best bet. You may want to compare the alpha results in DXT1, DXT3 and DXT5 compression, however, to make sure.

DXT1,it seems,will work.But the newer compression

types that Arma supports,offer more in terms of quality.

Of course,if you get what you wanted using DXT1,and

it causes no problems,then use it.

smile_o.gif

Also,about Paaplug,try doing as you do with paatool,

don't use "autodetect".I've had probs with that before.

Although I can't use them in Ofp,I don't have any

problems converting to any DXT format,using Paaplug.

Share this post


Link to post
Share on other sites

Hey dood i cant thank you enough! thumbs-up.gif but im not happy with my end product, could you possibly help me refine the my sysytem some?

1st I take paa for muzzle flash (128x64) right click

& open with photoshop8 with Kagety's paa plugin.

2nd save as TGA 32bit.

3rd open TGA in Photoshop again, if u closed PS8, &

edit RGB & Alpha1, then save as TGA 32bit again &

exit PS8.

4th open edited TGA with paatool11 (TODO) hit select

select the edited TGA & make sure destination format is

DXT1 5551, mipmap box, sharpen effects none, &

dithering off, hit convert & put in game to test.

it works but realy jaggedy, not nice n smooth.. & i cant seem to figure out how to get DXT5 working.. banghead.gif sorry i know im retarded.. been trying for days (cry)

can you or some one advise?

Share this post


Link to post
Share on other sites

Hello again Iron+Cross,

Well,I can't see what you're doing wrong with

regard to DXT5 compression.Myself,when using

PaaPlug,I've just gone with the default settings.

And it saves without problems.Haven't had the

opportunity to test em ingame though.

As far as Dxt1 5:5:5:1 in Paatool goes.When you say

"jaggedy",do you mean the annoying white edges

that show up?If that's the case,try checking the

"no alpha filtering" box,see if that helps.

If you simply mean the edges are physically

jagged,as in very square looking,perhaps you're

using too hard a brush.Or you're using a pencil

brush.If so use a relatively soft "paintbrush".

Look,if your still havin problems with it,send me

the texture in 32bitTga form.Then I'll try to do

the conversion and send it back.If nothing else

you may have the texture you want.If that's

successful,then that would indicate the problem

is particular to your method,or with Photoshop

itself.

smile_o.gif

Share this post


Link to post
Share on other sites

HI

Well i reinstalled PS8 with plugin & when i use DX5 after

1st taking the paa for muzzle flash (128x64) right click

& open with photoshop8 with Kagety's paa plugin.

2nd save as TGA 32bit.

3rd open TGA in Photoshop again, if u closed PS8, &

edit RGB & Alpha1, then save as TGA 32bit again &

4th save as kagety's PAAPLUGIN make sure destination format is

DXT5, mipmap box, sharpen effects none, &

dithering off, hit convert & put in game to test,

all this time in photoshop.. now this is almost same procedure as when i use "paatool11" to convert it but when i convert it back to paa using kagety's Paaplugin on DXT1,DXT1a, or even DXT5 they all show as if the Alpha channels aint working I.e i see the whole color range of RGB as if there was no over lay of an Alpha channel.. (YET)

it all looks fine in texview I know im a pain but

Quote[/b] ]Haven't had the

opportunity to test em ingame though.

could be somthing you need to try ...? (Arma 1.0-1.5)

confused_o.gif

yours kindly Mike thumbs-up.gifnotworthy.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×