Gildor's Forums

English Forum => Other games => Topic started by: wraithcat on December 08, 2011, 21:22



Title: tribes ascend
Post by: wraithcat on December 08, 2011, 21:22
Tried running umodel on the tribes ascend (tribesgame.u)

And for now it seems that the game is more or less fully supported

EDIT

Okay my bad. Seems like it supports Skeletal meshes, static meshes animations and materials. But textures don't seem to extract correctly out of the TFC's. Dimensions are fine, but they seem to be full black.

Since the game is still in beta though, I won't be uploading any of the files (engine and binaries) since unless I'm mistaken gildor ignores those from betas :P


Title: Re: tribes ascend
Post by: Gildor on December 08, 2011, 21:38
Since the game is still in beta though, I won't be uploading any of the files (engine and binaries) since unless I'm mistaken gildor ignores those from betas :P
:)


Title: Re: tribes ascend
Post by: Laksen on March 28, 2012, 05:35
Nice utility. It worked fine for extracting the meshes, but the texture problem was a bit of a problem, so I went digging.

I built the following utility that can extract textures from the texture.cache.*.rtc files. They are stored for each mipmap level in a zlib compressed chunk of DXT1 data, with a 2 byte header of 0x9C78. The *.hdr.rtc is a very simple header file which describes all the textures, first by name and then mipmap level offset/length/flag pairs(I haven't figured out the precise meaning of the flag yet, but I don't really care). :P

A link to a win32 binary and Pascal source code here: http://j-software.dk/tribestex.zip
Someone might find it useful at some point :)


Title: Re: tribes ascend
Post by: pixellegolas on March 28, 2012, 18:25
nice contribution.  I guess with some extra tools we can cover more stuff :)


Title: Re: tribes ascend
Post by: NexusElite on March 30, 2012, 16:11
Aye, or we could just wait till Tribes to be finish.


Title: Re: tribes ascend
Post by: ineteye on March 31, 2012, 12:35
Hi! use your tool ))) Nice but some textures(usually normal maps) have black lines on it... it looks that not all data extracted...

For example this textures:
tribestexture -h texture.cache.hdr.rtc -d texture.cache.data.rtc -o "veh_beowulf.textures.t_beowulf_nrm.tga" -e veh_beowulf.textures.t_beowulf_nrm
tribestexture -h texture.cache.hdr.rtc -d texture.cache.data.rtc -o "veh_beowulf.textures.t_beowulf_spc.tga" -e veh_beowulf.textures.t_beowulf_spc


Title: Re: tribes ascend
Post by: Laksen on March 31, 2012, 18:01
Looks like a flag of 0x0205 indicates DXT1, and 0x0207 indicates something like DXT3/5. I don't get very good results using that however. The outputs look jumbled, even though the format pretty much follows a 128bit alpha+color format.

Does anyone know how Unreal usually stores their texture data? Most diffuse images uses DXT1 without alpha, but normal maps, specular and such seem to use that other format. And shadowmaps uses a third one.


Title: Re: tribes ascend
Post by: Laksen on March 31, 2012, 19:53
I updated the original link with a new version that handles the DXT1/5 decoding properly. I was unpacking the bits in the wrong direction. Now it handles normal maps too. It doesn't handle shadowmaps, which seems to be the only format that I could find other than DXT1 and 5.


Title: Re: tribes ascend
Post by: SeptaScarabae on April 01, 2012, 03:32
But textures don't seem to extract correctly out of the TFC's. Dimensions are fine, but they seem to be full black.

I ran into the same issue. I was excited to come across UModel, until I realized the textures were extracting black. :(


Title: Re: tribes ascend
Post by: Noxwizard on April 03, 2012, 11:00
I updated the original link with a new version that handles the DXT1/5 decoding properly. I was unpacking the bits in the wrong direction. Now it handles normal maps too. It doesn't handle shadowmaps, which seems to be the only format that I could find other than DXT1 and 5.
The images are actually inverted over the x axis and are rotated 90 degrees CCW. You can see it in the image below: (wep_arxbuster_1p.arx_display)
(http://img13.imageshack.us/img13/8974/arxdisplay.png)
The one on the left is extracted from the alpha files which did not have compression applied. The one on the right is extracted from the current files using your application.


Title: Re: tribes ascend
Post by: Laksen on April 03, 2012, 12:33
Strange. The files I have extracted so far have fit the texture coordinates of the models that I have looked at, so I don't know if this is actually a bug or not?


Title: Re: tribes ascend
Post by: Noxwizard on April 04, 2012, 05:08
Strange. The files I have extracted so far have fit the texture coordinates of the models that I have looked at, so I don't know if this is actually a bug or not?
Which models and images did you test with? This is the SKL_WEP_HeavySpinFusor_1p.psk model with the wep_heavyspinfusor_1p.textures.wep_hvy_spinfusor_dif texture applied:
(http://theexiled.pwnageservers.com/images/ascend/HeavySpinfusor.png)


Title: Re: tribes ascend
Post by: Laksen on April 04, 2012, 14:24
I had made a silly little error which of course exported them flipped. That's why the decoding was wrong before :)

A new version is up with that fixed. Added support for discarding alpha channel(-n)


Title: Re: tribes ascend
Post by: SeptaScarabae on April 28, 2012, 07:33
I get an error that it is unable to read the *.rtc file.


Title: Re: tribes ascend
Post by: Churchie on May 05, 2012, 18:04
This is my first post on these forums, I just unpacked ALL of the Textures for Tribes Ascend. Since I want more textures to come out of this I will let you all know how I did it.

I could have not done this without Posted by: Laksen
A link to a win32 binary and Pascal source code here: http://j-software.dk/tribestex.zip

Start > Run > CMD > cd c:/nameofyourfolder tribestexture -a chartextures.tfc

The trick to get this to work correctly, you will have to make sure the two other files from the CookedPC are in the nameofyourfolder

texture.cache.hdr.rtc and texture.cache.data.rtc plus of course CharTextures.tfc

Once you have all these files in the same folder, it will take about 12 to 20 mins depending on your computer speed. The files that come out is every texture Tribes Ascend has, plus they are in an easy edit format TGA. W00t w00t.


Title: Re: tribes ascend
Post by: Laksen on May 05, 2012, 22:27
@SeptaScarabae, the program should be told where the *.tfc files are, or those should be copied to the same folder as the program.

@Churchie, Glad you could use it :)

It was fun trying to RE the format, so it's even nicer to see some having use of the program just as I had of umodel.


Title: Re: tribes ascend
Post by: Churchie on May 06, 2012, 11:32
Okay, I have made some edits to the textures. Issue I have ran into and I will need your help Laksen, is that I need to REcompress the files back from the TGA to TFC. Anything you can do or make would be great.


Title: Re: tribes ascend
Post by: Churchie on May 06, 2012, 11:59
Below is a snapshot of the texture mod I have made. The old image is on the right and the new altered image is on the left. My goal is to RE a way to repack the TGA Textures back to the TFC file and see if this is possible to do before I waste more time creating new cool textures aka skins. Any help is welcome!!!

(http://img32.imageshack.us/img32/6385/texturechange.jpg)


Title: Re: tribes ascend
Post by: SeptaScarabae on May 06, 2012, 22:03
Once you have all these files in the same folder, it will take about 12 to 20 mins depending on your computer speed. The files that come out is every texture Tribes Ascend has, plus they are in an easy edit format TGA. W00t w00t.

Thanks. I was trying to open the *.rtc cache file, instead of the *.tfc file.

As for exporting things back into the game, you might try looking at the Tribes: Vengeance mod tools, which was also based off of the Unreal Engine. Not sure how compatible the files are.


Title: Re: tribes ascend
Post by: Churchie on May 07, 2012, 02:31
Let me make sure I know what I am doing as this is my first time doing it for Tribes.

The TFC and rtc File formats are just a cooked compression of other formats to help the load times. Aka like a Zip but more compressed?

I had to use the tfc cache files to open the tfc file, after trying to get the game to run without the rtc files by commandline addons, I have it mostly working. To answer your question, the only way to open the cache files is to do the process I did. That I know about, but when you do this it will open EVERY texture for the game and it's about 22,000 TGA and other objects.


Title: Re: tribes ascend
Post by: SeptaScarabae on May 07, 2012, 05:58
I was doing a little reading..

http://servers.dvts.org/ut3/installation/
http://servers.dvts.org/ut3-maps.xml#SKINS (download a skin and examine)
http://forums.epicgames.com/threads/677922-Install-skins-into-game-folder

It looks like we should be able to create a folder with the Unreal Engine (CustomChars) to allow for the game to read skins. It's a little more complicated than just plopping a *.tga image in there, but it sounds like a very real possibility to get custom skins in-game.


Title: Re: tribes ascend
Post by: Gildor on May 07, 2012, 10:36
Don't mix "Unreal Tournament 3" and other games.


Title: Re: tribes ascend
Post by: Laksen on May 07, 2012, 13:43
The main problem with doing that is that all mipmap levels are stored in the file. I haven't made code that can export or import that yet. Importing will be slightly harder as there will have to be some sort of DXT compression going on too.

It's futile if the game checks the files for modifications(which I really think it does). Have you tried just changing a single byte in the data tfc to see if that changes anything?

I won't have time to change anything for the next month


Title: Re: tribes ascend
Post by: Churchie on May 07, 2012, 18:53
To give you all some insight on where I am at. I have started running the game manually without having to recompile the textures back into the tfc format. I am learning how to cook the file so I can recreate the whole game from scratch. This will allow me change ANY Texture that I want to do, to start. If you want to learn what I am doing here is the link on how to do it.


http://udn.epicgames.com/Three/ContentCooking.html#Content Cooking (http://udn.epicgames.com/Three/ContentCooking.html#Content Cooking)


Title: Re: tribes ascend
Post by: SeptaScarabae on May 08, 2012, 03:57
The main problem with doing that is that all mipmap levels are stored in the file. I haven't made code that can export or import that yet. Importing will be slightly harder as there will have to be some sort of DXT compression going on too.

I'm not familiar with the *.tga format, but I know Adobe Photoshop will create mipmap levels for *.dds files.


Title: Re: tribes ascend
Post by: Churchie on May 08, 2012, 07:08
@Laksen, I've found a solution to our problem. Check your email.


Title: Re: tribes ascend
Post by: SeptaScarabae on June 01, 2012, 03:43
I don't suppose you guys made any progress on this, have you?


Title: Re: tribes ascend
Post by: Churchie on June 01, 2012, 05:15
I have, and got served with a cease and desist letter from Hi-Rez Studios. Since receiving the letter by certified mail my attorney has been involved and I can't say or comment on what I am doing publicly. But I have definitely made improvement!


Title: Re: tribes ascend
Post by: Gildor on June 01, 2012, 08:01
It is very strange that I never got such emails ...


Title: Re: tribes ascend
Post by: Laksen on June 02, 2012, 09:37
Churchie, I wonder how you managed to get that..

Did you put up any data publicly on the web?


Title: Re: tribes ascend
Post by: SeptaScarabae on June 03, 2012, 04:14
It is very strange that I never got such emails ...

Agreed. You must not have as big an operation as Churchie. :P


Title: Re: tribes ascend
Post by: Noxwizard on June 03, 2012, 09:02
@Laksen: I ended up writing my own in C++ since yours still has some trouble with the alpha layers. They don't come out smoothly around the image's edges, which is something I needed. I might toss it on GitHub, I'm not sure yet. I'm not really familiar with the Targa format, so sometimes the images come out upside down, but that's easy enough for me to correct manually. While I was doing that, I wrote down the file spec more clearly here: http://wiki.theexiled.pwnageservers.com/Tribes:_Ascend/FileSpecs/TextureCache Feel free to add to it if you'd like. gildor may be able to comment more on the header spec, since I believe this is really just the UDK spec with zlib compression thrown on top.


Title: Re: tribes ascend
Post by: Gildor on June 03, 2012, 11:13
Looked at the specs. There is nothing in common with original structures used in tfc.


Title: Re: tribes ascend
Post by: Laksen on June 03, 2012, 12:39
@Laksen: I ended up writing my own in C++ since yours still has some trouble with the alpha layers. They don't come out smoothly around the image's edges, which is something I needed. I might toss it on GitHub, I'm not sure yet. I'm not really familiar with the Targa format, so sometimes the images come out upside down, but that's easy enough for me to correct manually. While I was doing that, I wrote down the file spec more clearly here: http://wiki.theexiled.pwnageservers.com/Tribes:_Ascend/FileSpecs/TextureCache Feel free to add to it if you'd like. gildor may be able to comment more on the header spec, since I believe this is really just the UDK spec with zlib compression thrown on top.
I don't have the time to edit it, but you have some small errors in there. There's a 1 byte header for each mipmap chunk which is always 1(apparently). And the zlib header is 2 bytes. The length and decompressed size fields are swapped. The last field of the mipmap chunk is the amount of compressed bytes to be read


Title: Re: tribes ascend
Post by: Noxwizard on June 03, 2012, 21:27
There's a 1 byte header for each mipmap chunk which is always 1(apparently). And the zlib header is 2 bytes.
Oops, late night editing strikes again. ::)

The length and decompressed size fields are swapped. The last field of the mipmap chunk is the amount of compressed bytes to be read
I'm pretty sure they're in the correct order. The last DWORD is the size of the data when it has been uncompressed. This seems to be the same order that you read them in as well.
Code:
result.Fragments[i].Offset := s.ReadDWord;
result.Fragments[i].Length := s.ReadDWord;
result.Fragments[i].Bytes  := s.ReadDWord;
...

      ms := TMemoryStream.Create;
      try
         ms.CopyFrom(fs, length);
         ms.Seek(0, soFromBeginning);

         zs := Tdecompressionstream.Create(ms, true);
         try
            SetLength(bits, bytes);
...
            // Read the ZIP compressed data
            zs.ReadBuffer(Bits[0], bytes);


Title: Re: tribes ascend
Post by: Churchie on June 23, 2012, 11:30
Okay, All legal stuff is behind me. Back to doing it publicly. I was blogging about it and they realized what all I could do, so I submitted an application to them and they turned it down. then I sent them an external hard drive as my resume with the entire game de-compiled. That is when I received the Cease and desist letter. I guess they don't want to hire me, no worries, I am going to mod the shit out of the game now.

I have been able to de-compile the whole game back to original formats. All files non compressed. The issue I am still stuck at is recompiling them back without having to spend hours cooking the whole game.


Title: Re: tribes ascend
Post by: Gildor on July 03, 2012, 11:35
I've got some free time and performed my own research of texture cache formats. They are differs from original UE3 because Hi-Rez Studios utilizes procedural textures library developed by Allegorithmic.

So, Tribes: Ascend is fully supported now (even sounds).

(http://s019.radikal.ru/i634/1207/b8/f0500676a8ect.jpg) (http://s019.radikal.ru/i634/1207/b8/f0500676a8ec.jpg)


Title: Re: tribes ascend
Post by: Churchie on July 26, 2012, 09:56
Grrr at Hi-Rez, If you patched today to get the new content, you will notice that the game will repair aka redownload/repair all of the decompiled files. grrrrrr... might as well just reinstall...


Title: Re: tribes ascend
Post by: Gildor on July 26, 2012, 10:18
Unreal engine 3 package system must be updated to work fine with frequent content updates. Hi-Rez Studios didn't do anything to achieve that. They have to learn from their Korean colleagues :)


Title: Re: tribes ascend
Post by: pixellegolas on August 02, 2012, 17:49
*thumbs up*