XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Tue Jan 16, 2018 6:34 pm

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Bad Company 2 - XenonTexture unknown, PC ver is known.
PostPosted: Sun Jul 01, 2012 10:36 pm 
Offline
ultra-n00b

Joined: Mon Jan 11, 2010 8:54 pm
Posts: 8
Has thanked: 1 time
Have thanks: 2 times
p01.itexture (http://www.mediafire.com/?3upgk1kuje19ei1) (PC)
p01.xenontexture (http://www.mediafire.com/?1a9sdm64m5mct3t) (Xbox 360)

If you write a DXT5 header over the custom header on p01.itexture you get a readable .dds file. (http://www.mediafire.com/?ouxhie5sajzdzmf)

Any ideas what compression p01.xenontexture is using?

Some extra info.

Image


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: Bad Company 2 - XenonTexture unknown, PC ver is known.
PostPosted: Sun Jul 01, 2012 11:18 pm 
Offline
ultra-n00b

Joined: Mon Jan 11, 2010 8:54 pm
Posts: 8
Has thanked: 1 time
Have thanks: 2 times
Xenos (name for Xbox 360 GPU) supports uncompressed, DXT1/DXT3/DXT5 (and maybe also DXT2/4 but not sure). But there's also these:

• DXT3A - "4 bit scalar replicated into four channels in shader"

• DXT3A as 1111 - "1 bit per channel pixel"

• DXT5A "3bit selection between 2 8bit endpoints"

• DXN "3Dc normal compression" and "2-channel version of DXT5A"

• CTX1 "bit selection between 2 8.8bit endpoints"


Top
 Profile  
 
 Post subject: Re: Bad Company 2 - XenonTexture unknown, PC ver is known.
PostPosted: Mon Jul 02, 2012 1:12 am 
Offline
Moderator

Joined: Mon Jul 05, 2010 8:55 pm
Posts: 600
Has thanked: 19 times
Have thanks: 223 times
They look like big endian DDS files but i used a script to swap the endian and it's just distorted. Anyway this should add your .DDS header.

Code:
# Bad Company 2 DDS Converter
# Xbox 360 Only
# MrNightmareTM

get NAME basename
getdstring NAME2 0x10
goto 0x50
get UNK1 long
reverselong UNK1
get UNK2 long
reverselong UNK2
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\x35\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 UNK1 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 -= 0x9C             
log MEMORY_FILE 0x9C SIZE             
append
get SIZE asize MEMORY_FILE
string NAME += ".dds"
log NAME 0 SIZE MEMORY_FILE


They look like big endian dds files as i previously said

Before:

Image

After Conversion:

Image

Original PC file:

Image

You can see they look very similar but still distorted but it's progress, the file looks like it needs unswizzling.

Anyway here is that other script made ages ago:

Code:
# 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 /= 4
goto 0x80

for i = 0 < SIZE2


savepos CURRENTOFFSET
get UNK1 short
reverseshort UNK1
putVarChr MEMORY_FILE CURRENTOFFSET UNK1 short

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



Seems weird how the file is all swizzled, is it swizzled or is it something else?

_________________
Click the thanks button if I helped!


Top
 Profile  
 
 Post subject: Re: Bad Company 2 - XenonTexture unknown, PC ver is known.
PostPosted: Mon Jul 02, 2012 1:35 am 
Offline
ultra-n00b

Joined: Mon Jan 11, 2010 8:54 pm
Posts: 8
Has thanked: 1 time
Have thanks: 2 times
I'm 100% sure P01.Itexture + P01.XenonTexture are identical. They come from the exact same place in the file tree.

I've attached another pair of textures to compare. Thanks.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: Bad Company 2 - XenonTexture unknown, PC ver is known.
PostPosted: Mon Jul 02, 2012 10:54 am 
Offline
Moderator

Joined: Mon Jul 05, 2010 8:55 pm
Posts: 600
Has thanked: 19 times
Have thanks: 223 times
norm wrote:
I'm 100% sure P01.Itexture + P01.XenonTexture are identical. They come from the exact same place in the file tree.

I've attached another pair of textures to compare. Thanks.


Actually they're not the exact same they are swizzled around which is why they cannot be read with a standard .dds header + conversion. Why do you need Xbox textures anyway?

_________________
Click the thanks button if I helped!


Top
 Profile  
 
 Post subject: Re: Bad Company 2 - XenonTexture unknown, PC ver is known.
PostPosted: Mon Jul 02, 2012 12:59 pm 
Offline
ultra-n00b

Joined: Mon Jan 11, 2010 8:54 pm
Posts: 8
Has thanked: 1 time
Have thanks: 2 times
I wanted to get at the Xenon BC1 textures, which I figure use the same compression technique as BC2.

BC1 wasn't released on PC btw.

PS. When I said the files are identical, I meant in terms of what the game displays, it's the same image.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: Bad Company 2 - XenonTexture unknown, PC ver is known.
PostPosted: Mon Jul 02, 2012 1:42 pm 
Offline
ultra-n00b

Joined: Mon Jan 11, 2010 8:54 pm
Posts: 8
Has thanked: 1 time
Have thanks: 2 times
I think the BC1 textures may have different compression, because when processed to .dds & reversed they look very blocky.

As for unswizzling, I googled about and found this talking about Dead Rising 2.

Quote:
The textures are encoded or swizzled with a predicted tiling algorithm to increase the efficiency of the 360's GPU speed. to solve just run the textures through the 360 sdk to untile... then they can be repacked using any BIG packer


http://deadrising2mods.proboards.com/in ... age=1#7816


Top
 Profile  
 
 Post subject: Re: Bad Company 2 - XenonTexture unknown, PC ver is known.
PostPosted: Mon Jul 02, 2012 3:47 pm 
Offline
Moderator

Joined: Mon Jul 05, 2010 8:55 pm
Posts: 600
Has thanked: 19 times
Have thanks: 223 times
norm wrote:
I think the BC1 textures may have different compression, because when processed to .dds & reversed they look very blocky.

As for unswizzling, I googled about and found this talking about Dead Rising 2.

Quote:
The textures are encoded or swizzled with a predicted tiling algorithm to increase the efficiency of the 360's GPU speed. to solve just run the textures through the 360 sdk to untile... then they can be repacked using any BIG packer


http://deadrising2mods.proboards.com/in ... age=1#7816

That's for dead rising though i tried noesis untile yesterday and nothing showed it was no different, the closest i ever got was using the endian swap script unless it's a custom swizzle algo.

_________________
Click the thanks button if I helped!


Top
 Profile  
 
 Post subject: Re: Bad Company 2 - XenonTexture unknown, PC ver is known.
PostPosted: Mon Jul 02, 2012 5:37 pm 
Offline
ultra-n00b

Joined: Mon Jan 11, 2010 8:54 pm
Posts: 8
Has thanked: 1 time
Have thanks: 2 times
Ok so I managed to unswizzle the Xenon Textures from the BC2 release using the 360 SDK tools.

I used Bundler.exe to create an XPR file (you need to specify an RDF with it).

Code:
<?xml version="1.0" encoding="utf-8" ?>
<RDF Version="XPR2">
<Texture
   Name   = "i20"
   Source = "i20.png"
   Format = "D3DFMT_DXT5"
   Width  = "512"
   Height = "512"
   Levels = "1"
/>
</RDF>


I then took the header from the resulting .xpr file and applied it to p01.xenontexture (saved it as p01.xpr).

Ran p01.xpr through Unbundler.exe and it outputs the texture as .tga (unswizzled).

I just need to figure out what compression BC1 textures are using now because they don't work with the same method.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: Bad Company 2 - XenonTexture unknown, PC ver is known.
PostPosted: Tue Jul 03, 2012 9:39 pm 
Offline
ultra-n00b

Joined: Mon Jan 11, 2010 8:54 pm
Posts: 8
Has thanked: 1 time
Have thanks: 2 times
Ok so after making various files using bundler.exe and reading about the texture formarts in the 360 XDK help file.

The BC1 textures I attached above are 256x256 using D3DFMT_A8R8G8B8.

Strangely though, they included larger versions in another place which are 512x512 which use DXT5. Both are swizzled (tiled) so need to be decompressed with Unbundler.exe


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: Bad Company 2 - XenonTexture unknown, PC ver is known.
PostPosted: Sun Nov 23, 2014 1:40 am 
Offline
n00b

Joined: Thu Dec 26, 2013 7:50 pm
Posts: 11
Has thanked: 1 time
Have thanks: 0 time
have you guys been able to get it?


Top
 Profile  
 
 Post subject: Re: Bad Company 2 - XenonTexture unknown, PC ver is known.
PostPosted: Sun Nov 23, 2014 8:45 am 
Offline
Moderator

Joined: Sun Mar 27, 2011 8:42 pm
Posts: 935
Has thanked: 10 times
Have thanks: 120 times
it is very easy format this is from X360 :

Image

_________________
Quick BMS Editor GUI - simple easy to use
Goto : viewtopic.php?uid=34229&f=29&t=6797&start=0

Downloads from DropBox : https://dl.dropboxusercontent.com/u/


Top
 Profile  
 
 Post subject: Re: Bad Company 2 - XenonTexture unknown, PC ver is known.
PostPosted: Sun Nov 23, 2014 12:56 pm 
Offline
n00b

Joined: Thu Dec 26, 2013 7:50 pm
Posts: 11
Has thanked: 1 time
Have thanks: 0 time
Awesome, if anyone of you would like to have more "test subjects", here are 5 more xenontextures:

Includes diffuse/normal/?colormap?

http://www.mediafire.com/download/hppdg ... 1-x360.zip


Top
 Profile  
 
 Post subject: Re: Bad Company 2 - XenonTexture unknown, PC ver is known.
PostPosted: Sun Nov 23, 2014 3:12 pm 
Offline
Moderator

Joined: Sun Mar 27, 2011 8:42 pm
Posts: 935
Has thanked: 10 times
Have thanks: 120 times
well easy enought :D

Image

Image

Image

_________________
Quick BMS Editor GUI - simple easy to use
Goto : viewtopic.php?uid=34229&f=29&t=6797&start=0

Downloads from DropBox : https://dl.dropboxusercontent.com/u/


Top
 Profile  
 
 Post subject: Re: Bad Company 2 - XenonTexture unknown, PC ver is known.
PostPosted: Sun Nov 23, 2014 5:03 pm 
Offline
n00b

Joined: Thu Dec 26, 2013 7:50 pm
Posts: 11
Has thanked: 1 time
Have thanks: 0 time
Awesome that it all works, thanks again michalss. But I didn't expect it to look like that, I hoped the _D. one would actually be colored, but well I guess I'll just have to wait some days to know it all for sure


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group