Important information: this site is currently scheduled to go offline indefinitely by end of the year.

GuildWars models

Post questions about game models here, or help out others!
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

GuildWars models

Post by Demonsangel »

After going throughviewtopic.php?f=10&t=1645&start=195 I decided to try and have a go at the ffna format.

I have been able to import some models:
ImageImage
ImageImage
ImageImage

by examining about 50 files in 010 editor and creating a template that seems to work for most files.
I am however completely new to this and it seems some files just act completely different and I can't figure it out on my own. (for example the 13097_ffna.raw included below)
If perhaps someone could shine some light on this (or help by reversing the .exe?)

I am also looking for a way to find specific meshes since they all have numbers in the .dat browser.
And a way to find their textures/animation files.

010 editor template example:
Image
(I'm not used to c/c++, which you'll no doubt notice if you open up the template. I also didn't comment it entirely and it looks like a mess, but if you do take a look at it and have questions go ahead and ask them.)

I'm currently rewriting the template with my handwritten comments and trying to clean up the code itself.

currently this is what I've found out so far:

first 4 bytes = FFNA
byte = 02 = model
4 bytes= some sort of type identifier
4 bytes = byte amount
byte = 26 = start of file
7 bytes = unknown
4bytes seem to have an influence on the amount of meshes
4bytes = format type1 ?
4bytes = format type2 ?
20 bytes = unknowns that seem to interact with the bytes that follow the mesh identifiers? i've tried to get an algorythm from them in the template
2*4 bytes = scale
20 bytes = unknown (seems to only change when according to my "algorythm" there are zero meshes)
byte = amount of meshes (influenced if there's a 29/0C instead 08/09 in the dword described higher above)
8 bytes * amount of meshes (named "quads" in my template from before i knew what they were)
the amount of following bytes depends on the amount of meshes and the values of their bytes

after that come the facelists (in the template picture starting at the second group with black background)
the black bar itself is the amount of faces in mesh
there are 3 values and they seem to add up if the values are different
--> value 1
if value1 differs from value2 --> value1 + 2
then
if value1 differs from value3 --> value1 + 2 +3

followed by 5*4bytes unknowns
red = faces --> seem to be in threes, still looking if in some files they are in fours
directly after start the vertices and rest
sometimes float1,2,3 are x,y,z, sometimes it's float 4,5,6
and if the format type 1 == F095B2D6 there are 4 extra bytes inserted after the first 3 floats

EDIT: for those who do not have a guildwars account, perhaps this can help http://www.guildwars.com/support/gwtrial.php
ffna.rar
You do not have the required permissions to view the files attached to this post.
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: GuildWars models

Post by finale00 »

Here's what I got out of the 130907 model.
The parser was written in python for noesis.

Unfortunately it's hardcoded cause I didn't look at the other files (just followed your notes lol)
Here's the header

Code: Select all

char[4] idstring "ffna"
byte (1, 2, ...)
int ? // seems to have decimal values 3000, 4000, ?
int ? // always a little smaller than filesize
int ? // 0x26

...
Image

btw, do you have a working unpacker?
I downloaded an archive off the wiki but the exe's couldn't be extracted.
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: GuildWars models

Post by Demonsangel »

I'll have a look at Noesis, I've already been cooking something up in python for blender anyways.

If by unpacker you mean to extract the ffna files out of the guildwars.dat, I used the tool posted viewtopic.php?p=24493#p24493
I'm not sure what you mean by exe's. If it's the game's main exe, you can download it from the official site and, iirc, you can just run it with the -image cmd and it'll download all the game's assets into the dat file.
You do need an account (trial account) to log in though.
http://www.guildwars.com/support/downloadclient/

My files are from the .dat from the 20th december or something and with each update the "filenames" change. I mostly look up the files by their type + filesize.
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: GuildWars models

Post by Demonsangel »

Finally some time off, so bumping time.

Created a Noesis script and it loads a fair amount of meshes, not perfect yet though.
Any tips on how to 'clean up' my code are more than welcome.

I'm also still looking for help on how to find the files that contain the (link to) animations and textures and a way to figure out how to find the meshes I want. I was thinking using ollydbg but I have no only a little experience.

below the script + meshes it can load.
You do not have the required permissions to view the files attached to this post.
Axolotl
advanced
Posts: 44
Joined: Sun Nov 07, 2010 12:52 am
Has thanked: 5 times

Re: GuildWars models

Post by Axolotl »

Does your script can load creatures meshes?

It will be great if it will be possible to ipmort models from this game. Looked on screens, creatures model are realy impressive.
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: GuildWars models

Post by Demonsangel »

I haven't encountered a monster file yet, the only creature parts I saw were faces, leggings, pelvis and hands.
The problem is all the model files aren't named, they only have numbers so I do not know what a file contains before (or if the current script even can) it's loaded.
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: GuildWars models

Post by Demonsangel »

Tiny update:

ImageImage
Image


Still having some trouble with multipart monsters.

In Noesis, how do I mirror the UV's in the Python script? I have to mirror them over the Y-axis (blender Y-axis) for them position correctly.
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: GuildWars models

Post by chrrox »

this will mirror the uv's in the y axis.
rapi.rpgSetUVScaleBias(NoeVec3 ((1.0, -1.0, 1.0)), NoeVec3 ((1.0, 1.0, 1.0)))
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: GuildWars models

Post by Demonsangel »

Thanks, I'll have a look at it, might have to rewrite the script since I'm not using the rapi module.
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: GuildWars models

Post by finale00 »

Did you manually create NoeMesh objects and stuff?
You can just manually transform the vector.
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: GuildWars models

Post by Demonsangel »

Yes I did, I feel stupid for not thinking about that.

first multipart monster: Image
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: GuildWars models

Post by finale00 »

Nice. Are you exporting it from noesis and then importing into blender?

Now all we need is to figure out how to write a tool that will export data from noesis and into blender directly!
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: GuildWars models

Post by Demonsangel »

Yeah, I initially started out with direct import into Blender.
If I have the time I might convert the script from Noesis to work for Blender and a maxscript as well. But that won't be untill the format is more or less figured out, there still are variables that suddenly behave differently especially when going towards larger files.
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: GuildWars models

Post by chrrox »

there is a max script that does that from max to blender you could just copy that.
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: GuildWars models

Post by finale00 »

Can you draft out an outline of the format?
The code up there is kind of hard to follow and not sure if you changed how it looks lol, particularly the getattr/setattr which I think is making things a little more complicated than it should be.

I was looking at it and it sort of looks like you have your header with a bunch of flags, followed by a list of meshes, where each mesh has a bunch of information and then finally followed by index buffer, vertices, normals and UV. And other stuff.

But it looks a little more complicated than that from your parser.
Post Reply