Page 15 of 19

Re: [Request] Guild Wars 2 DAT

Posted: Sat Jul 07, 2012 8:40 pm
by ral
Loumie wrote: Anyway, I'm working on a small python project that will dump content of the PF files in XML format, that seems interesting ;D. I hope that with this available, peoples will be able to do their own specific viewer tools, as the format will be really straight forward.
That would be really nice to have.

Can anyone give some info about the structure of the map files?
From looking into them it looks like there are many models (full map + everything on it?) inside (vectors with x,y,z + facelists) and some other stuff I don't know (Just started looking into them some minutes ago).
Here I just extracted some vertices of 1 part of a file (189364.pf)
Image

I'm interested in making these maps to .obj files and some help with the structure would be really nice (since some people seem to know everything already).

Re: [Request] Guild Wars 2 DAT

Posted: Sat Jul 07, 2012 9:42 pm
by Rhoot
jeckerson wrote:Btw, there are some problem with some DDS map files rendering.
That is not a problem, the files actually look like that. It seems they contain 4 masks, one in each channel.
Loumie wrote:Maybe peoples could even help Rhoot with: https://github.com/rhoot/Gw2Browser, I'm sure he will be happy to have help to implement new stuff.
I've decided to discontinue the browser due to lack of time and interest, but I'll still accept pull requests if they appear and contain useful stuff.
ral wrote:I'm interested in making these maps to .obj files and some help with the structure would be really nice (since some people seem to know everything already).
Either have a look at Loumie's IDA script, or check out my git repository that'll appear in a couple of days.

Re: [Request] Guild Wars 2 DAT

Posted: Sun Jul 08, 2012 11:51 am
by ral
Rhoot wrote: Either have a look at Loumie's IDA script, or check out my git repository that'll appear in a couple of days.
Guess I'll wait a bit then because the next days I probably still will be busy. And thanks for all the effort.

Re: [Request] Guild Wars 2 DAT

Posted: Sun Jul 08, 2012 2:35 pm
by Loumie
ral wrote:
Rhoot wrote: Either have a look at Loumie's IDA script, or check out my git repository that'll appear in a couple of days.
Guess I'll wait a bit then because the next days I probably still will be busy. And thanks for all the effort.
This should help you: http://pastebin.com/0agaEtTW

Re: [Request] Guild Wars 2 DAT

Posted: Sun Jul 08, 2012 6:53 pm
by Demonsangel
Current Noesis script: https://www.dropbox.com/sh/qbct1tjyv7al ... yCEbiL/GW2
edit: updated 9/7/2012 v0.0.5
edit: updated 10/7/2012 v0.0.6
now loads ATEX files instead of png

It's based off Rhoot's code, so thanks for making my life easier.
I've only had 1 model to play with so some models could fail to load.
Current script loads textures as png files, I'm still working on ATEX support.

Image

Edit: added lightmap support
Image

Re: [Request] Guild Wars 2 DAT

Posted: Mon Jul 09, 2012 1:19 pm
by ral
Looks nice Demonsangel.
Loumie wrote: This should help you: http://pastebin.com/0agaEtTW
Started working on it with that data:
Chunk: area
Image

Chunk: havk (collision only atm) (different map than the one above for area) (positioning still is wrong of all objects)
Image

Edit:// 10th July 2012
XML Export in the works (Still gotta rename some stuff and write all Data into it)
Obj Export in the works
Facelist can be increased with every Model. So like Obj 1 facelist starts at 1 3 2 and Obj 2 starts at 433 445 444. Depends on the way how you render/or just view it, it may be useful.

Implemented Chunks (doesn't include the exports to file):
- parm
- area
- havk

But today I don't have time to continue the work.

Edit:// 11th July 2012
- Full XML Output for chunks: parm, area, havk, msn, shex, cube

Edit:// 13th July 2012
- Now support for chunks: parm, trn, area, msn, havk, shex, cube, audi
XML-Example:
Image

Re: [Request] Guild Wars 2 DAT

Posted: Mon Jul 09, 2012 5:38 pm
by Loumie
Nice work keep it up :)

Re: [Request] Guild Wars 2 DAT

Posted: Mon Jul 09, 2012 8:04 pm
by Demonsangel
About the ATEX files, the DXT5 and DXT1 formats, are they actual DXT5 info or does the raw image data need to be decrypted/decompressed or something like this.

I tried loading the raw image data and using Noesis' DXT5 converter but the image didn't load up correctly.
If I have to use all the steps in Rhoot's code the image conversion will take some time in python.

Re: [Request] Guild Wars 2 DAT

Posted: Mon Jul 09, 2012 9:37 pm
by Loumie
That's what this repo https://github.com/ahom/gw2DatTools is for, decompression of files in general in the Dat and also decompression of ATEX files, before they can be used properly

Re: [Request] Guild Wars 2 DAT

Posted: Mon Jul 09, 2012 9:51 pm
by Demonsangel
More c++ to drive me crazy. :(

Re: [Request] Guild Wars 2 DAT

Posted: Tue Jul 10, 2012 7:55 am
by xtridence
Demonsangel wrote:About the ATEX files, the DXT5 and DXT1 formats, are they actual DXT5 info or does the raw image data need to be decrypted/decompressed or something like this.

I tried loading the raw image data and using Noesis' DXT5 converter but the image didn't load up correctly.
If I have to use all the steps in Rhoot's code the image conversion will take some time in python.
The ATEX format has 2 sets of compressions, one of them is a proprietary one, and the other being one of the regular DXT formats (which has readily available algorithms).

Here's a tool along with source from a while back that specifically decompresses the ATEX format. A little bit of tweaking could get you the format you desire, and the script itself is fairly minimal and independent.

Re: [Request] Guild Wars 2 DAT

Posted: Tue Jul 10, 2012 1:00 pm
by Rhoot
I just pushed the library I've been working on (also in C++) that can read just about all the files encountered in the .dat. It assumes you know what you're after rather than just 'exploring'. If you do know what you're after however, it should definitely come in handy.

https://github.com/rhoot/gw2formats

Edit:
xtridence wrote:Here's a tool along with source from a while back that specifically decompresses the ATEX format. A little bit of tweaking could get you the format you desire, and the script itself is fairly minimal and independent.
Loumie has actually reversed that proprietary compression and put it in his library on github (see inflateTextureFileBuffer.cpp). It is a lot easier to read than the asm in AtexReader.

Re: [Request] Guild Wars 2 DAT

Posted: Tue Jul 10, 2012 2:16 pm
by Demonsangel
Updated the dropbox with ateximage.dll so the script now loads ATEX files instead of png.

I gave up trying to convert the c++ code to python when I saw the ASM so I had Necrolis turn it into a Noesis dll plugin based on your source codes (copy paste mostly).
Read the readme, I'll continue to fill it with more detailed changelogs and instructions.

Thanks for the help guys :)

Re: [Request] Guild Wars 2 DAT

Posted: Wed Jul 11, 2012 12:31 pm
by Demonsangel
Image
Fun part starts again, does anyone know the exact order of calculations for the armature?

Re: [Request] Guild Wars 2 DAT

Posted: Sat Jul 14, 2012 12:20 am
by Rhoot
I wrote a DLL for use with node.js that wraps the decompression in Loumie's gw2DatTools, if someone's interested. The binary is for windows with both 32-bit and 64-bit versions, with a wrapper script selecting the right one. Usage is very briefly documented in the js-file.

Binary: http://skold.cc/gw2/gw2dattools.node.zip
Source: https://gist.github.com/3107143