The Forum is up for sale: XeNTaX Forum looking for new owner

gal gun textures .BIN

Get your graphics formats figures out here! Got details for others? Post here!
User avatar
askB
advanced
Posts: 43
Joined: Mon Feb 06, 2012 3:52 am
Has thanked: 6 times

gal gun textures .BIN

Post by askB »

I have successfully ripped models from Gal Gun but I want to extract or convert the texture files, which are .BIN. I have looked everywhere, and have asked all around, but no one, NO ONE will help me... I do not know if I am over thinking the simplicity of this process but it doesnt seem to be appearing anywhere. here is a .bin file for one of the characters Akira...
You do not have the required permissions to view the files attached to this post.
Gh0stBlade
Moderator
Posts: 719
Joined: Mon Jul 05, 2010 8:55 pm
Has thanked: 20 times
Been thanked: 492 times

Re: gal gun textures .BIN

Post by Gh0stBlade »

This needs Xbdecompress.exe from the Xbox SDK. It works fine now at decompressing they look like standard .dds files?
Click the thanks button if I helped!
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1411 times

Re: gal gun textures .BIN

Post by chrrox »

the sdk works fine for me then just paste a dds header on the file and your all set.
Gh0stBlade
Moderator
Posts: 719
Joined: Mon Jul 05, 2010 8:55 pm
Has thanked: 20 times
Been thanked: 492 times

Re: gal gun textures .BIN

Post by Gh0stBlade »

I edited some .dds header adder script here for quickbms. It seems that they come out a funny colour though, someone else should fix it but here it is anyway:

Code: Select all

get NAME basename
get UNK1 long
get UNK2 long
reverselong UNK2
get UNK3 long
reverselong UNK3
get UNK4 long
get UNK5 long
set MEMORY_FILE2 binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x0A\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\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"
putVarChr MEMORY_FILE2 0xC UNK3 long
putVarChr MEMORY_FILE2 0x10 UNK2 long
append
get SIZE asize MEMORY_FILE2
log MEMORY_FILE 0 SIZE MEMORY_FILE2
get SIZE asize     
math SIZE -= 0x24             
log MEMORY_FILE 0x24 SIZE             
append
get SIZE asize MEMORY_FILE
string NAME += ".dds"
log NAME 0 SIZE MEMORY_FILE
Click the thanks button if I helped!
User avatar
askB
advanced
Posts: 43
Joined: Mon Feb 06, 2012 3:52 am
Has thanked: 6 times

Re: gal gun textures .BIN

Post by askB »

alright im testing it out now
User avatar
askB
advanced
Posts: 43
Joined: Mon Feb 06, 2012 3:52 am
Has thanked: 6 times

Re: gal gun textures .BIN

Post by askB »

okay so i extracted the .dds file from the bms script but texture didnt event show up. forgive the noob question, what did I miss?
Gh0stBlade
Moderator
Posts: 719
Joined: Mon Jul 05, 2010 8:55 pm
Has thanked: 20 times
Been thanked: 492 times

Re: gal gun textures .BIN

Post by Gh0stBlade »

askB wrote:okay so i extracted the .dds file from the bms script but texture didnt event show up. forgive the noob question, what did I miss?
That only converts the texture. You have to decompress it using Xbdecomrpess.exe from the Xbox 360 SDK. You can find it in the usual places since it's illegal to distribute SDK tools.
Click the thanks button if I helped!
User avatar
askB
advanced
Posts: 43
Joined: Mon Feb 06, 2012 3:52 am
Has thanked: 6 times

Re: gal gun textures .BIN

Post by askB »

really thats it? Let us see....
User avatar
askB
advanced
Posts: 43
Joined: Mon Feb 06, 2012 3:52 am
Has thanked: 6 times

Re: gal gun textures .BIN

Post by askB »

okay all the dds files were extracted successfully....Although, like COOL12345 stated, the colors are funny. They look really bad lol. Ill look into solving the problem myself but, could someone please explain this?



TEXTURE!!!

Image
You do not have the required permissions to view the files attached to this post.
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1411 times

Re: gal gun textures .BIN

Post by chrrox »

they are just big endian dds files.
you must swap every 2 bytes of the entire file starting at 0x80
so if the original bytes were
12 34 56 78
it would become
34 12 78 56
most hex editors can do this for you no problem.
Image
User avatar
askB
advanced
Posts: 43
Joined: Mon Feb 06, 2012 3:52 am
Has thanked: 6 times

Re: gal gun textures .BIN

Post by askB »

Great! Thanks for the tip. Im still pretty new at hex editing, I have HxD and im guessing that the swapping of the 0x80 bytes are found under the search/replace tab???




EDIT!!!!: Okay, so I use HxD (as explained above) and i went to search then clicked on replace.

I searched for the first 8 bytes in 0x80 (because im not sure howto replace just two.) which were 84 F4 7C 54 i had them replaced to look like this:

"F4 84 54 7C"

When I tried to view the image nothing came up at all. Im sure its a small issue that im not seeing but I cant seem to figure it out...

Here are some pics of the hex:


1 Before Swapped


Image


2 After


Image
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1411 times

Re: gal gun textures .BIN

Post by chrrox »

hxd does not have a byte swap function try 010 editor.
then use the swap unsigned short.
User avatar
askB
advanced
Posts: 43
Joined: Mon Feb 06, 2012 3:52 am
Has thanked: 6 times

Re: gal gun textures .BIN

Post by askB »

See? what i tell ya somethin small lol. ill let u know my results


EDIT: Sigh... Sorry this isnt working how the hell do I swap bytes with 010 editor? :/
Gh0stBlade
Moderator
Posts: 719
Joined: Mon Jul 05, 2010 8:55 pm
Has thanked: 20 times
Been thanked: 492 times

Re: gal gun textures .BIN

Post by Gh0stBlade »

Be patient, at least you are getting help unlike me in my threads, i'm ignored all the time. I made a quickbms script to reverse the endianness, Well i know this script will have problems if the number of bytes aren't even (odd). But it should work on some of the files, here you go, thanks to Chrrox for telling us how to do this.

Here it is anyway:

Code: Select all

# Endian Big .DDS to Endian Little .DDS
# May not have full support
# MrNightmareTM
# Special thanks, Chrrox for the method!
# v0.1a

get SIZE asize
log MEMORY_FILE 0 SIZE

get SIZE2 asize
math SIZE2 -= 0x80
math SIZE2 /= 2
goto 0x80

for i = 0 < SIZE2
savepos CURRENTOFFSET
get UNK1 short
reverseshort UNK1
putVarChr MEMORY_FILE CURRENTOFFSET UNK1 short
next i 

get NAME basename
string NAME += "_reversed.dds"

log NAME 0 SIZE MEMORY_FILE
Click the thanks button if I helped!
User avatar
askB
advanced
Posts: 43
Joined: Mon Feb 06, 2012 3:52 am
Has thanked: 6 times

Re: gal gun textures .BIN

Post by askB »

Hey how come you guys banned COOL12345? He gave me a really useful .bms script!
Post Reply