May 19, 2024, 06:21:28 PM

Username
Password

Pages: 1 [2]   Go Down
Print
Author Topic: Warhammer Age of Reckoning Modding  (Read 45810 times)
0 Members and 1 Guest are viewing this topic.
Derezz
Troll
*
Offline Offline

Posts: 3


View Profile
« Reply #15 on: February 27, 2022, 11:42:08 AM »

Hello, I'm new to python, I don't want to be irritable, I know that everything is very clear,but not experience does its own thing, I would like to ask for help, if possible, could you explain to me how to do it correctly?
 I open cmd and
CD C:\Python26\Lib\idlelib
then geom2obj.py fg.0.0.cre_lion_white.geom
but I don't have anything going on, no error, no file, couldn't tell what my mistake might be? please
Logged
olly
Global Spokesperson
*
Online Online

Posts: 2275



View Profile
« Reply #16 on: February 27, 2022, 01:46:06 PM »

Hi and welcome. Check that the .geom file exists in that folder location and after checking try another .geom file name that is in that folder to convert. Are you sure it didnt successfully convert that .geom ?
« Last Edit: February 28, 2022, 02:42:15 PM by olly » Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
Derezz
Troll
*
Offline Offline

Posts: 3


View Profile
« Reply #17 on: February 27, 2022, 01:59:23 PM »

Thank you for your answer, all the files are in place, and the scripts, here I have a screenshot, at the moment some text appears, but unfortunately there is no obj file, what could be the problem? or am I doing something wrong?

Logged
olly
Global Spokesperson
*
Online Online

Posts: 2275



View Profile
« Reply #18 on: February 27, 2022, 06:34:05 PM »

Your screenshot above suggests are you not typing the file extenstion .geom on the end of the file name

geom2obj.py fg.0.0.cre_harpy_01.geom

and check you have full permission on that folder and maybe try running CMD command prompt as administrator.  
« Last Edit: February 27, 2022, 11:24:46 PM by olly » Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
Derezz
Troll
*
Offline Offline

Posts: 3


View Profile
« Reply #19 on: February 28, 2022, 12:14:59 PM »

everything works, thanks for the help
Logged
AlastarI
Giant Scorpion
*
Offline Offline

Posts: 5


View Profile
« Reply #20 on: April 04, 2024, 01:52:55 PM »

Hey Olly,

I'm still working on my little tool, but unfortunately I'm stuck on this very same issue you're having here. To my current understanding it's not possible to extract most of the DIFFUSE textures properly, because...they are simply missing data (entire DXT blocks to be more specific). If you have 512x512 DXT1 texture with 10 mip maps, it requires exactly 174,944 bytes to store all the data (along with DIFFUSE file header). If size is less than that it looks like this:



Notice two things here:

1. The yellow row of pixels at the bottom are the missing blocks. This particular texture is missing 190 4x4 blocks in its largest mip map and some more in two lower ones as well.
2. Texture is distorted in the middle. This suggest the place these blocks are missing from (not necessary in contiguous blob of pixels though).

Having said that, I still have absolutely no idea how to get this data back. Is this some form of compression? Did they remove random pixels to protect textures from extracting? If so, where the hell are they...

2. unk_word_00 and unk_word_01 should be used somehow to handle shifts in rect. images

This I was able to figure out at least. unk_word_00 and unk_word_01 are offsets (on x and y axis respectively) in pixels from texture's top left corner. For some weird reason Mythic decided to chop up certain textures into multiple pieces and this is the effect of this operation. Here's one example:



Overall dimensions of this texture are 512x512, but the largest mip map has only 176x260 pixels and the offsets are (336, 252). By default all texture data will start at (0, 0), so basically you need to take every pixel and move it by this amount on x and y. I've tested this with converted model and this is exactly where UV coordinates are for this particular piece.

Apologize for necroposting, but have you succeed in this? I've been working over texture reading and faced same problems. I think missing data could be stored in  .mask files near diffuse.
Logged
olly
Global Spokesperson
*
Online Online

Posts: 2275



View Profile
« Reply #21 on: April 06, 2024, 10:58:35 AM »

Hi, it's been a long time since I last tried or checked if there were any updates, would be amazing if you succeeded.
Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
AlastarI
Giant Scorpion
*
Offline Offline

Posts: 5


View Profile
« Reply #22 on: April 13, 2024, 01:12:39 PM »

Finally, I ve decoded these textures. I have to decompile .exe and look for texture reading function, after that I ve simply transferred decompiled C code into C# and decoded, what it actually does.
I was almost right about .mask files. But instead of storing missing data, they store control byte codes, which says to client, how much blocks it should skip or read (or read .diffuse and alpha, stored in mask) and alpha channel blocks. I ve got working prototype of program for reading such textures.
Logged
olly
Global Spokesperson
*
Online Online

Posts: 2275



View Profile
« Reply #23 on: April 13, 2024, 01:25:03 PM »

Fantastic news and well done!

Smiley
Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
AlastarI
Giant Scorpion
*
Offline Offline

Posts: 5


View Profile
« Reply #24 on: April 15, 2024, 05:44:21 AM »

Btw, specular textures encoded the same way as diffuse. So only .glow and  .tint are left for decoding. Need to locate where client reads them.
 
Logged
olly
Global Spokesperson
*
Online Online

Posts: 2275



View Profile
« Reply #25 on: April 15, 2024, 09:00:09 PM »

Cool
Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
AlastarI
Giant Scorpion
*
Offline Offline

Posts: 5


View Profile
« Reply #26 on: April 21, 2024, 08:17:53 PM »

Okay, .glow textures encoded the same way as diffuse. That's good, but I still dont understand how .tint textures are stored. The only thing that I ve discovered is that they're not bound to .mask files (at least they dont store .mask texture id at 0x9C which means that they dont need them to be read)
Logged
olly
Global Spokesperson
*
Online Online

Posts: 2275



View Profile
« Reply #27 on: April 21, 2024, 08:26:10 PM »

Interesting and one step closer to completion.
« Last Edit: April 22, 2024, 08:26:22 AM by olly » Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
AlastarI
Giant Scorpion
*
Offline Offline

Posts: 5


View Profile
« Reply #28 on: April 29, 2024, 07:26:23 AM »

I gave up this task for a while because it became too hard to reverse. I've discovered much about .tint files, but I need to discover much more. What is known (I've attached some files for context):
1) These files are read separately from .mask files;
2) These files using one some 8 byte encoded texture file (diffuse? glow? specular? normal?);
3) These files have two blocks in each mipmap. Offset of second block are written in the very beginning of mipmap data section.

* photo_2024-04-29_09-20-41.jpg (209.6 KB. 1015x607 - viewed 20 times.)

4) First block of data (except first int32 where offset is encoded) is control codes, second - indexes (what they exactly do I still uncovered);
5) These files require some sort of buffer, which is generated by client. This buffer is called unkFile in pseudo I've attached. I ve called it palette, but still unsure what it excatly do. IDA offset for palette generation: 0047B140;
6) Offset for IDA for possibly tint read function: 0048EB33.
* pseudo.txt (10.1 KB - downloaded 9 times.)


I hope I will return to this later, now I want to apply my new discoveries to mesh viewer tool, which can never see the light if I will continue to work over .tint files...

* pseudo.txt (10.1 KB - downloaded 9 times.)
« Last Edit: April 29, 2024, 07:53:56 AM by AlastarI » Logged
olly
Global Spokesperson
*
Online Online

Posts: 2275



View Profile
« Reply #29 on: April 29, 2024, 05:10:49 PM »

Excellent work and keep us posted on the mesh viewer new addons.
Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
Pages: 1 [2]   Go Up
Print
Jump to: