Warhammer Dark Omen Forum

Modifications => 3D Scenery Models => Topic started by: olly on March 20, 2016, 08:16:21 PM



Title: Warhammer Age of Reckoning Modding
Post by: olly on March 20, 2016, 08:16:21 PM
Download this mod folder containing tools and guide ->

https://1drv.ms/u/s!AsyWBCOxh51ViNVGcz1IjKSkC6ZBLg?e=ONAseU (https://1drv.ms/u/s!AsyWBCOxh51ViNVGcz1IjKSkC6ZBLg?e=ONAseU)


Warhammer Online Age of Reckoning Modding Guide

1) Download the new Client and install

http://www.returnofreckoning.com/forum/viewtopic.php?t=16&sid=5ef23328356f02d924f8c39d1d4c53bd (http://www.returnofreckoning.com/forum/viewtopic.php?t=16&sid=5ef23328356f02d924f8c39d1d4c53bd)

Use Mozilla FireFox with Mega addon
mega:#F!VhQzBCbL!lPx3fe1a3k9MkP1L7hdpqQ


2) Download EasyMYP Release_v2.6.rar with Hash_v1.6.rar (extract into new fodler called HASH inside EasyMYP, as hashes_filename.txt is the dictionary to give real names to files. Run the program and File -> Select Extraction Folder -> Then select Archive and Open Archive art.myp and let it load for a few mins. Then view Archive File List to see legible file names. File -> Extract All will create a new art inside your chosen extracted folder. Art\assetsdb\textures contains all scenery model .stx images (simply rename them to .dds) and Art2\assetsdb\fixtures has all the scenery .nif 3d models. Art2\assetsdb\charmesh has all the 3d character .geom models

https://code.google.com/archive/p/easymyp/downloads (https://code.google.com/archive/p/easymyp/downloads)

Newer version but more for Star Wars SWTOR game and dictionary
https://github.com/WarEmu/EasyMYP (https://github.com/WarEmu/EasyMYP)


4) I have a VB.net program that renames all .stx files into .dds and then matches them with their correct .nif scenery model and places them all into a new folder with the same shared name. For example it will create a new folder named fi.0.0.ch_altar_bones that will contain fi.0.0.ch_altar_bones01.nif and any .dds images with the similar name such as fi.0.0.ch_altar_bones01_spec.dds, fi.0.0.ch_altar_bones01a_base.dds and fi.0.0.ch_altar_bones01b_base.dds which saves searching 10,000 files, to pair models with thier textures.


5) Open .nif files with NifSkope and export them as .obj to then open in MilkShape3d or Blender and apply their .dds image textures, that will thankfully still auto map correctly.

https://github.com/jonwd7/nifskope/releases/tag/v2.0.dev4#downloads_2_0_dev4 (https://github.com/jonwd7/nifskope/releases/tag/v2.0.dev4#downloads_2_0_dev4)
http://niftools.sourceforge.net/wiki/NifSkope/Change_texture (http://niftools.sourceforge.net/wiki/NifSkope/Change_texture)

6) Download these geom mod tools below and rename its geom_hash_filelist.txt to hashes_filename.txt for EasyMYP to use in its HASH folder, to extract the 3d character models. Art2\assetsdb\charmesh contains all the extracted 3d character .geom models that can be converted to .obj using Python and Python Construct. I personally found Python 2.6 worked for me instead of 2.7 and I extracted Python Construct into

C:\Python26\Lib\idlelib

along with all the extracted .geom files and these mod tool geom2obj.py files

https://github.com/w4kfu/waronline_fun/tree/master/Toolz/art/geom (https://github.com/w4kfu/waronline_fun/tree/master/Toolz/art/geom)

https://github.com/w4kfu/waronline_fun (https://github.com/w4kfu/waronline_fun)

https://github.com/w4kfu/waronline_fun/blob/master/Toolz/art/geom/geom_hash_filelist.txt (https://github.com/w4kfu/waronline_fun/blob/master/Toolz/art/geom/geom_hash_filelist.txt)

(I also had to download six.py as binary.py complained it wasn't there but probably just me not knowing much)


7) Using a command prompt CMD, with CD\ and CD navigate to C:\Python26\Lib\idlelib and type

geom2obj.py fg.0.0.cre_lion_white.geom    

or which ever model you wish to convert and it will create a new test.obj to rename, otherwise the next converted file will overwrite it. Use MilkShape3d or Blender to import the new .obj files.

Unfortunately, the 3d character models like fg.0.0.cre_lion_white.geom do not have matching named textures in the Art\dds extration folder, since lion is 3D70774E_9C84D9617D8A159D.dds (I haven't found a way to make them have real file names yet). Sadly their textures do not auto map in MilkShape3d or Blender, so probably easier to use the Sundering Total War mod if you need them outside of Warhammer Online, as they have already merged most Warhammer Online character models with Total War skeleton/bones and animations. ***UPDATE** Use Machinima Studio, see posts below***



3d Character models geom files ->
\Art2BEST\assetdb\charmesh

Scenery Textures
\Art2BEST\ArtBEST\art\dds

Terrain Textures
\Art2BEST\ArtBEST\art\textures\terrain


Title: Re: Warhammer Age of Reckoning Modding
Post by: olly on March 22, 2016, 07:56:52 AM
To put extracted models into Dark Omen ->

WAR House to Dark Omen   

1) Export .nif as .obj (open nif and immediately export without selecting any part, so it exports all of it)
2) Conver all .dds textures by opening in PhotoShop and then saving as .bmp. Then open in Irfan view and resize to 128x128 and decrease colour to 256 colours. Save them all into B1_01\Texture folder.
3) Open the .obj in MilkShape3d and swap Materials for the converted .bmp Textures in

C:\Program Files (x86)\Dark Omen\GameData\1pbat\B1_01\TEXTURE

4)  Delete the Group "Editable" (used for long range camera), as it covers the roof
5)  Select all remaining groups and scale XYZ all as 0.025 to fit Dark Omen size
6)  Save as .ms3d and Export as .obj
7)  To merge all groups into to one -> Open new .obj in Fragmotion and Edit -> Deselect all
8 )  Right click on Groups and create a new group, then Select All and Add Selection to the new Group
9) Delete the old groups to only keep the new
10)Export as .obj
11) Import .obj into Blender and Export as .m3d



Title: Re: Warhammer Age of Reckoning Modding
Post by: olly on March 23, 2016, 11:37:34 PM
Machinima Studio is good for previewing the .geom Character mesh models and should export with UV mapping (if you pay for premium)

[attachment=1]

Unfortunately it can't see the Character's .diffuse textures, only the usual scenery and weapon textures, so far.

Also been testing 3d Ripper DX that unfortunately didn't work for WAR (only original Warhammer Online). However, we found Ninja Ripper can extract everything we need.

1) Copy the x86 version of Ninjaripper -all the files- in Warhammer Online main folder.
2) Have ninja ripper open and the exe connected to the RoRLauncher.exe
3) Change the setting from intruder to D3D11Wrapper. (If pressing F9 in-game doesn't rip, then switch to D3D9Wrapper)
4) Run.
5) Log-In, connect, enter the game.

http://cgig.ru/en/2012/10/ho-to-use-ninja-ripper/ (http://cgig.ru/en/2012/10/ho-to-use-ninja-ripper/)

:)

[attachment=3]

[attachment=2]


***UPDATE***

W4kfu kindly responded saying that he might create his diffuse_parser.py into a converter which  would be great, since WAR has only opened up certain areas, so unable to get the Dragon Ogres etc.


https://github.com/w4kfu/waronline_fun (https://github.com/w4kfu/waronline_fun)


Title: Re: Warhammer Age of Reckoning Modding
Post by: olly on April 10, 2016, 11:16:54 PM
We have found that some converted scenery objects don't run in CPU mode and only 3d such as the large Windmill. I recently had the same problem with the Empire Wagon, that doesn't use too many polygons (since we thought CPU mode might have a max polygon limit) but unfortunately it still failed to working CPU and only 3d mode. I then removed all doubles in Blender and then exported and it ran fine in both CPU and 3d mode. I will do the same with the windmill to test although it has multiple meshes to join and then remove doubles, unlike the wagon that was just 1 mesh.

[attachment=1]

:)


Title: Re: Warhammer Age of Reckoning Modding
Post by: Joeshmoe on April 11, 2016, 07:10:45 PM
Question Olly, when using ninja ripper how do you deal with the dark textures? I'm no texture expert so thats why I'd like to rip them. Is there a way to get normal looking textures from WAR? Again im a texture noob.. maybe I'm just missing something here.

Great work though on this stuff!!


Title: Re: Warhammer Age of Reckoning Modding
Post by: olly on April 11, 2016, 07:56:39 PM
Hi,

I'm helping  Pyrosh from the Sundering Total War Mod and WhiffofGrapeShot & Kallaikoi from the End of Times Total War mod, who say

"those textures have the specular overlayed making them super dark and needing to be cleaned up".

However, W4kfu is extending his diffuse_parser.py into a full .diffuse to .dds converter, hopefully in the next few weeks. So you won't have to use ninjaripper anymore, just his converter.

[attachment=1]

:)


Title: Re: Warhammer Age of Reckoning Modding
Post by: Joeshmoe on April 12, 2016, 12:19:49 AM
Thanks Olly. I found a simple enough method to get those textures to look 90-95% as they should. That sounds awesome that W4kfu is making a converter. His efforts will not go to waste when its completed  ;D


Title: Re: Warhammer Age of Reckoning Modding
Post by: olly on April 19, 2016, 11:27:55 PM
Empire Logpile01 in CPU mode

[attachment=1]

Empire Logpile01 in 3d mode

[attachment=2]


Title: Re: Warhammer Age of Reckoning Modding
Post by: olly on April 20, 2016, 10:22:10 PM
Empire Watch Tower in CPU mode
[attachment=1]

Empire Watch Tower in 3d mode
[attachment=2]


Title: Re: Warhammer Age of Reckoning Modding
Post by: EvgenS on April 21, 2016, 08:07:01 PM
Looks really nice!


Title: Re: Warhammer Age of Reckoning Modding
Post by: olly on April 23, 2016, 02:59:52 PM
Thanks!

:)

Dwarf Building 01 CPU
[attachment=1]

Dwarf Building 01 3d
[attachment=2]

Dwarf Building 01 3d
[attachment=3]


Title: Re: Warhammer Age of Reckoning Modding
Post by: Joeshmoe on May 13, 2016, 11:55:15 PM
Any news on the diffuse parser? His git has been inactive for a couple months. Maybe its impossible?


Title: Re: Warhammer Age of Reckoning Modding
Post by: olly on May 14, 2016, 12:19:27 PM
Unfortunately he hasn't replied to my emails but thankfully there is another Forum member on RoR called Drops who has created his own program but hasn't released it yet.

https://www.returnofreckoning.com/forum/viewtopic.php?f=8&t=13263&sid=681a8ff7d9c8a555c8e5b25a4c8c95b8 (https://www.returnofreckoning.com/forum/viewtopic.php?f=8&t=13263&sid=681a8ff7d9c8a555c8e5b25a4c8c95b8)

So I've also asked him to let me know when it is ready to download and use. As I say to WhiffofGrapeShot (End Times Total War modder, we can always hire a programmer to do it for us if necessary, since it is all based on DXT1 and DXT5 compression.

:)


Title: Re: Warhammer Age of Reckoning Modding
Post by: olly on June 06, 2016, 10:05:20 PM
Massive thanks to our own modder Aldark, as we now have a partial converter that can successfully extract any square diffuse textures but struggles with any rectangle images, as some of the image gets misaligned.

Discoveries:
1. Rectangular files are encoded with DXT1
2. unk_word_00 and unk_word_01 should be used somehow to handle shifts in rect. images
3. http://forum.xentax.com/viewtopic.php?f=21&t=3170&start=15 (http://forum.xentax.com/viewtopic.php?f=21&t=3170&start=15) contains incorrect hypothesis that "Each word is the amount to make the width, height of the mipmap to be powers of 2 texture." - that is not true, e.g. file 2DC30914_3CFEA094AD011110.diffuse (contains w = 0x0100, h = 0x0088, uw00 = 0x0000, uw01 = 0x0114, but if we add h + uw01 we get 0x19C, which is not power of 2).


The problem also to calculate proper offset to concrete mipmap's data, because "offset" field seems to be incorrect for rect. images. It appears, rectangular image contains of several smaller images with different sizes, which are separated with black squares

i.e. He was able to extract part of 2DB15207_0F5EED43122F922F.diffuse largest image (176 x 256). This subimage has sizes 172x128, other parts of image are shifted.

Playing around in photoshop and manually shifted lines around made an improvement, so eventually we could get full image but the problem is that this image is 172 x 252 (not 176 x 256 as mipmap's header promised) and shift is not constant. That is why he believes that rectangular images are divided to some kind of subimages with black squares between them to complement image to 176x256 or 256x256 size.

We are currently testing an updated version that allows manual setting of the width and offset (rotation) for rectangles that should help a little.

However, still amazing progress as there are so many fantastic new Square textures! :)

Snotling Square 512x512
[attachment=1]

Banshee Rectangle with misaligned rows 256x256
[attachment=2]

Rhinox manually realigned in Paint program
[attachment=3]


Title: Re: Warhammer Age of Reckoning Modding
Post by: Drops on June 08, 2016, 09:17:24 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:

(http://i.imgur.com/KKJewCO.png)

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:

(http://i.imgur.com/rGP584d.png)

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.


Title: Re: Warhammer Age of Reckoning Modding
Post by: Derezz 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


Title: Re: Warhammer Age of Reckoning Modding
Post by: olly 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 ?


Title: Re: Warhammer Age of Reckoning Modding
Post by: Derezz 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?

(https://sun9-85.userapi.com/impf/3Gihm_JyQiscroK7QRZHccVaMXgyAc1YPY4WLA/9Q2gFXobWg8.jpg?size=1252x558&quality=96&sign=a581358896603c5ab13d4c2bcc4ad3b5&type=album)


Title: Re: Warhammer Age of Reckoning Modding
Post by: olly 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.  


Title: Re: Warhammer Age of Reckoning Modding
Post by: Derezz on February 28, 2022, 12:14:59 PM
everything works, thanks for the help


Title: Re: Warhammer Age of Reckoning Modding
Post by: AlastarI 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:

([url]http://i.imgur.com/KKJewCO.png[/url])

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:

([url]http://i.imgur.com/rGP584d.png[/url])

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.


Title: Re: Warhammer Age of Reckoning Modding
Post by: olly 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.


Title: Re: Warhammer Age of Reckoning Modding
Post by: AlastarI 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.


Title: Re: Warhammer Age of Reckoning Modding
Post by: olly on April 13, 2024, 01:25:03 PM
Fantastic news and well done!

:)


Title: Re: Warhammer Age of Reckoning Modding
Post by: AlastarI 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.
 


Title: Re: Warhammer Age of Reckoning Modding
Post by: olly on April 15, 2024, 09:00:09 PM
Cool