Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Last Chaos Texture format??

Get your graphics formats figures out here! Got details for others? Post here!
fatduck
mega-veteran
mega-veteran
Posts: 315
Joined: Wed Aug 02, 2006 10:07 pm
Has thanked: 10 times
Been thanked: 94 times

Last Chaos Texture format??

Post by fatduck »

Could anyone help me to figure out the texture format of "Last Chaos".
The data doesn't look like compressed but something more than standard RGBA!?

Thanks!
You do not have the required permissions to view the files attached to this post.
db.
beginner
Posts: 21
Joined: Wed Oct 10, 2007 3:12 am

Post by db. »

http://gustavobraga.com/english/?cat=9

i came across this. dunno if it will heplp.

im guessing a program called txmake was made to convert it from its original state.
fatduck
mega-veteran
mega-veteran
Posts: 315
Joined: Wed Aug 02, 2006 10:07 pm
Has thanked: 10 times
Been thanked: 94 times

Post by fatduck »

Thanks db., so Last Chaos use renderman own texture *.tx ??

I can't found the format of .tx neither, and I don't think txmake is free as well !?

Any more help?
db.
beginner
Posts: 21
Joined: Wed Oct 10, 2007 3:12 am

Post by db. »

ill look into a secondary program but they have a trials
https://renderman.pixar.com/products/tools/index.htm
db.
beginner
Posts: 21
Joined: Wed Oct 10, 2007 3:12 am

Post by db. »

hmm, looked into it and as far as i can tell so far its only done in rendermans .

http://www.2shared.com/file/2392037/28b ... ntree.html hopefully that will help.
fatduck
mega-veteran
mega-veteran
Posts: 315
Joined: Wed Aug 02, 2006 10:07 pm
Has thanked: 10 times
Been thanked: 94 times

Post by fatduck »

Hi db., none of your programs work, I can only get error message!

Anyway, here is what I know about this texture format:

it is basically uncompressed RGB(A)?? full colored image with different mipmap together.

I use hw_bu_000.tex as example:

Header are 0x2C bytes then image size follow(yellow color in the image), so at 0x2C->00020000 = 128X128X8
Second image size at 0x20030->0x8000 = 64X64X8

Red color in the image are red(?) layer, and green color for green(?) layer. But blue and alpha didn't look correct?? (the texture with every 6th byte as blue color show in the image below)

Any help please!
You do not have the required permissions to view the files attached to this post.
db.
beginner
Posts: 21
Joined: Wed Oct 10, 2007 3:12 am

Post by db. »

do you think they could of used renderman, then compressed it? so far this is the only lead i ended up with tracking down .tex formats.
NKCSS
advanced
Posts: 76
Joined: Mon Oct 08, 2007 10:19 pm
Location: Leiden, The Netherlands
Contact:

Post by NKCSS »

db. wrote:do you think they could of used renderman, then compressed it? so far this is the only lead i ended up with tracking down .tex formats.
With such obvious patterns, I'd doubt it's compressed to be honest...
db.
beginner
Posts: 21
Joined: Wed Oct 10, 2007 3:12 am

Post by db. »

NKCSS wrote:
db. wrote:do you think they could of used renderman, then compressed it? so far this is the only lead i ended up with tracking down .tex formats.
With such obvious patterns, I'd doubt it's compressed to be honest...
the exe in command promt has compression available and a few other commands, but from what ive seen , it wants to use tiff files, dunno if it uses any others.[ just saying theres an option for it]

im rather stummped :\
fatduck
mega-veteran
mega-veteran
Posts: 315
Joined: Wed Aug 02, 2006 10:07 pm
Has thanked: 10 times
Been thanked: 94 times

Post by fatduck »

Could anyone expert take a look at these texture!?
I had decoded the 3D model files, but without texture, they are useless!
You do not have the required permissions to view the files attached to this post.
Rheini
Moderator
Posts: 652
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 46 times
Contact:

Post by Rheini »

This doesn't really look like uncompressed RGB(A). Maybe it's compressed or they use a palette.
EDIT: Though there wouldn't be such repetitions with compression.
Most likely it uses a palette.
fatduck
mega-veteran
mega-veteran
Posts: 315
Joined: Wed Aug 02, 2006 10:07 pm
Has thanked: 10 times
Been thanked: 94 times

Post by fatduck »

One of my friend found out that the header is actually "Serious Sam" format. You can compare _TAG_ef.tex with any SS tex for sure!

Unfortunately most of these tex's header(Last Chaos) are encrypted! But they seem only headers are encrypted(same for the 3D models part).

If you take a closer look on those format. Sometimes they have mip-map. I guess the format should be something like these:

Code: Select all

0x24-0x27 (char[4])    file type FRMC = have mip-map, FRMS = single image
0x28-0x2B (dword)     size of whole image (all mip-map together)
..
{
 dword    mip-map size
 word     col Red
 word     col Green
 word     col blue
 word     col Alpha
}
..
for examples

Code: Select all

:_TAG_ef.tex
 
    00000000h: 54 56 45 52 04 00 00 00 54 44 41 54 0D 00 00 00 ; TVER....TDAT....
    00000010h: 00 04 00 00 00 04 00 00 07 00 00 00 04 00 00 00 ; ................
    00000020h: 01 00 00 00 46 52 4D 43 D4 0A 00 00 00 08 00 00 ; ....FRMC  ......

0x2C-0x2F -> 0x800 which is 16 * 16 * 8(8 bytes each color)
mip-map 1 @ 0x002C 16*16*8
mip-map 2 @ 0x0830 8*8*8
mip-map 3 @ 0x0A34 4*4*8
mip-map 4 @ 0x0AB8 2*2*8
mip-map 5 @ 0x0ADC 1*1*8
mip-map 6 @ 0x0AE8 1*1*8
mip-map 7 @ 0x0AF4 1*1*8 
0x28-0x2B (dword) ->0xAD4, after offset 0x2C + 0xAD4 = 0xB00
which is footer "ANIMADAT"

:hw_bu_000.tex
    00000000h: 54 56 45 52 04 00 01 00 54 44 41 54 3E 3f 14 12 ; TVER....TDAT>?..
    00000010h: 81 80 57 55 C4 C1 9A 98 0D 06 DD DB 4E 49 20 1E ; ?WU鐘?..椳NI .
    00000020h: 8C 8C 63 61 46 52 4D 53 E0 AA 02 00 00 00 02 00 ; ?caFRMC鄋......
 
0x2C-0x2F -> 0x20000 which is 128 * 128 * 8 !!!
mip-map 1 @ 0x0000002C 128*128*8
mip-map 2 @ 0x00020030 64*64*8
mip-map 3 @ 0x00028034 32*32*8
mip-map 4 @ 0x0002A038 16*16*8
mip-map 5 @ 0x0002A83C 8*8*8
mip-map 6 @ 0x0002AA40 4*4*8
mip-map 7 @ 0x0002AAC4 2*2*8
mip-map 8 @ 0x0002AAE8 1*1*8
mip-map 9 @ 0x0002AAF4 1*1*8
mip-map 10 @ 0x0002AB00 1*1*8
0x28-0x2B -> 0x2AAE0, after offset 0x2C + 0x2AAE0 = 0x2AB0C
again which is footer "ANIMADAT"
Each color pixel is 8 bytes(sometimes 16 bytes eg: hw_face_000.tex). for the format I am guessing, I have R and G correct. So I am really confused if they use palette!

Any help is appreciated!
No more Fatduck, no more FatImporter, Byebye everyone!
spintz
ultra-n00b
Posts: 2
Joined: Thu Jun 19, 2008 4:02 am

Re: Last Chaos Texture format??

Post by spintz »

The texture data looks like DDS Compressed texture data, like DXT1, DXT3 or DXT5
TinyGuy
ultra-n00b
Posts: 4
Joined: Tue Mar 24, 2009 11:43 am
Been thanked: 6 times

Re: Last Chaos Texture format??

Post by TinyGuy »

Hello.
I know this thread is very old, but I've done some research about Last Chaos file formats recently.

Here's my notes about Last Chaos *.TEX file format:
char version_chunk[4] : "TVER"
int version : 0x00010004 (this version has encoded header data)
char data_chunk[4] : "TDAT"
unsigned int enc_width : texture width; decode with XOR 0x12143D3E
unsigned int enc_shift : Value for Bitwise Right-Shift; decode with XOR 0x55578081
unsigned int enc_height : texture height; decode with XOR 0x989AC3C4
unsigned int enc_mipmap : mipmaps count; decode with XOR 0xDBDD0607
unsigned int enc_bits : texture bits; decode with XOR 0x1E20494A
unsigned int enc_uknown : seems to be always 1; decode with XOR 0x61638C8D
char format_chunk[4] : "FRMC" for compressed texture; "FRMS" for uncompressed
int anim_offset : offset to ANIMADAT header

If format_chunk is "FRMC" then we have:

repeat "enc_mipmap" times
{
int size : texture data size in bytes
unsigned char data[size]: texture data (it's DTX1 or DTX3 data)
}

For "FRMS" format we just got data (RGB or RGBA) without size; we need to compute it manualy
or use anim_offset.

-------------------------------------------------------------------------------------
NOTE: After decoding Width and Height you need to do bitwise operation:

enc_width >>= enc_shift
enc_height >>= enc_shift

Texture bits values are not casual.

For "FRMC" format it's:

if enc_bits is 4 or 13 then texture data is compressed with DTX1 (24 bits/ no alpha)
for another values its compressed with DTX3 (32 bits/ with alpha)

For "FRMS":

if enc_bits is 0 or 2 then texture data is RGB otherwise its RGBA.
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
What if version is 0x00000004?

It's not encoded. Only the data sequence is a bit different.
And here you can download my TEXTool which can export last chaos textures to tga and vice versa.

Im working on model viewer and exporter. If someone is interested about it please pm me.
Here's my progress:
Image Image
Ghostt
ultra-n00b
Posts: 6
Joined: Sun Apr 19, 2009 4:19 pm

Re: Last Chaos Texture format??

Post by Ghostt »

Sended you a pm :)

Very interested to do some reskins
Post Reply