Pain PS3
Posted: Sat Apr 09, 2011 4:37 pm
Here is a max importer for pain and a texture converter.
Note*
if you are using the blueray disc version the files are in CacheData.dat and CacheData.pak
run this script to extract it.
The models are in the .rsx files
first decompress the rsx files.
offzip.exe -1 -a -z -15 c:\file.rsx c:\output 0x0
rename the .dat file it creates to .rsx
2nd
extract the textures with this bms script.
3rd run my max script attached here and then assign textures to your model.
The script currently supports
Meshes
Bones
does not support
auto texture
weighting
4th
Enjoy

Note*
if you are using the blueray disc version the files are in CacheData.dat and CacheData.pak
run this script to extract it.
Code: Select all
open FDDE PAK 0
open FDDE dat 1
endian big
get files long 1
get null long 1
set offset 0
for i = 0 < files
get size long 1
getdstring name 0xFC 1
log name offset size
math offset + size
next i
first decompress the rsx files.
offzip.exe -1 -a -z -15 c:\file.rsx c:\output 0x0
rename the .dat file it creates to .rsx
2nd
extract the textures with this bms script.
Code: Select all
endian big
goto 0x10
get textable long
goto textable
get files long
get start long
for i = 1 to files
set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x0A\x00\x00\x04\x00\x00\x00\x04\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x0B\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x05\x00\x00\x00\x44\x58\x54\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x10\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
endian big
goto start
get offset long
get mips short
print "%mips%"
get type byte
print "%type%"
#86 = dxt1
#87 = dxt3
#88 = dxt5
get unk byte
getdstring null 0x10
get height short
get width short
getdstring null 0x10
savepos start
get size long
if i == files
get size asize
endif
math size - offset
endian little
putVarChr MEMORY_FILE 0x1C mips short
putVarChr MEMORY_FILE 0xC width short
putVarChr MEMORY_FILE 0x10 height short
if type == 134
putVarChr MEMORY_FILE 0x57 0x31 byte
putVarChr MEMORY_FILE 0x16 0x08 byte
endif
if type == 135
putVarChr MEMORY_FILE 0x57 0x33 byte
endif
if type == 136
putVarChr MEMORY_FILE 0x57 0x35 byte
putVarChr MEMORY_FILE 0x16 0x10 byte
endif
if type == 133
putVarChr MEMORY_FILE 0x50 0x41 long
putVarChr MEMORY_FILE 0x54 0x00 byte
putVarChr MEMORY_FILE 0x55 0x00 byte
putVarChr MEMORY_FILE 0x56 0x00 byte
putVarChr MEMORY_FILE 0x57 0x00 byte
putVarChr MEMORY_FILE 0x58 0x20 long
putVarChr MEMORY_FILE 0x5E 0xFF Short
putVarChr MEMORY_FILE 0x61 0xFF Short
putVarChr MEMORY_FILE 0x64 0xFF Short
putVarChr MEMORY_FILE 0x6B 0xFF Short
endif
get name basename
string name + _
string name + i
string name + .dds
print "%offset%"
append
log MEMORY_FILE offset size
append
math size + 0x80
log name 0 SIZE MEMORY_FILE
next i
The script currently supports
Meshes
Bones
does not support
auto texture
weighting
4th
Enjoy

