XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Tue Oct 23, 2018 8:07 pm

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 44 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: Skyforge .bin
PostPosted: Thu May 03, 2018 3:54 am 
Offline
VIP member
VIP member
User avatar

Joined: Wed Nov 05, 2008 12:16 pm
Posts: 1107
Has thanked: 2230 times
Have thanks: 629 times
the "fix" comes when you guys that have the game find the files that store the header info
for the mesh and texture files so they can be read properly. your sample has submeshes but
can't be read in a single array because the indices run together, i could cobble up something
to attempt locating the indices start of each submesh but that isn't reliable, i'd rather do it right. :)

_________________
Noesis
Hex2obj
QuickBMS
Asset Studio
TextureFinder


Top
 Profile  
 
 Post subject: Re: Skyforge .bin
PostPosted: Thu May 03, 2018 12:24 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2446
Location: Nexus, searching for Jim Kirk
Has thanked: 587 times
Have thanks: 1261 times
slawdos wrote:
How fix it?

If you know 'C' you might fix it in the source of the Make_obj project:
viewtopic.php?f=29&t=15955&p=140250#p140250

edit: well, seems I got it: it's simply up to 3 "lod copies" with the same! vertex count.
Use the 3 H2O files at the bottom with the sample from lxxxk, post as of Fri Aug 11, 2017 3:11 am
to understand what I mean.
- for the bikini girl it's different: two identical meshes here:
0xDD86C 4470
Vb1
24 8
0x1F3E8 1071
020400
0x0 255

0xDD86C 4470
Vb1
24 8
0x5DBA8 1071
020400
0x0 255

-----------------------------

3rd submesh wrong, in hex2obj, too:

As Ace mentioned there's a problem with some submeshes; the pointclouds are ok, the face indices seem to be ok, too
but somehow they don't fit together. (Guess the v addresses have to be changed to higher ones.)

zaramot wrote:
There's a big files which stores all information about any object in the game - mesh/textures/skeleton it's about ~270-280mb in size.



btw: isn't Skyforge a popular MMO in Russia? I couldn't imagine that there's no perfect modelviewer from some enthusiast russian coder.

And: I'm desperately missing the head of this body :cry:

---------------------------------
same lod with lxxxk' sample:
0x17497C 9030
Vb1
24 8
0xB9468 2546
020400
0x0 255

0x17497C 9030
Vb1
24 8
0xc8318 2546
020400
0x0 255

0x17497C 9030
Vb1
24 8
0xd71c8 2546
020400
0x0 255


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip


Top
 Profile  
 
 Post subject: Re: Skyforge .bin
PostPosted: Thu May 03, 2018 4:05 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2446
Location: Nexus, searching for Jim Kirk
Has thanked: 587 times
Have thanks: 1261 times
well, that was kinda a little bit tricky, we have at least (maybe more)
2 copies of body plus LOD2 body, plus bodies at 0x25850, 0x9ef30, FIs?
4 copies of "cloth set"
3 copies of shoes

for the bikini girl. How should anyone have known this? A waste of time and life. :D

('copies' means, they are visually identical, the vertices themselves vary a lttle bit)


H2O file body, lod 1

0xD1890 24558
Vb1
24 8
0x8 5332
020400
0x0 255


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip


Last edited by shakotay2 on Fri May 04, 2018 8:05 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Skyforge .bin
PostPosted: Fri May 04, 2018 12:05 am 
Offline
VIP member
VIP member
User avatar

Joined: Wed Nov 05, 2008 12:16 pm
Posts: 1107
Has thanked: 2230 times
Have thanks: 629 times
Quote:
There's a big files which stores all information about any object in the game - mesh/textures/skeleton it's about ~270-280mb in size.

i'm still waiting for someone to upload this "big file", it supposedly contains all the secrets. :D

_________________
Noesis
Hex2obj
QuickBMS
Asset Studio
TextureFinder


Top
 Profile  
 
 Post subject: Re: Skyforge .bin
PostPosted: Sun May 06, 2018 5:06 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2446
Location: Nexus, searching for Jim Kirk
Has thanked: 587 times
Have thanks: 1261 times
maybe we should ask Zaramot for the name of it; there's many paks, and I couldn't seem to find something promising

anyways, the FVF from this witches' Base.Skin-Geometry has an FVF of 28 instead of 24:


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip


Top
 Profile  
 
 Post subject: Re: Skyforge .bin
PostPosted: Thu May 10, 2018 11:08 am 
Offline
beginner
User avatar

Joined: Wed Jun 08, 2011 1:58 pm
Posts: 37
Location: Nish, Serbia
Has thanked: 24 times
Have thanks: 10 times
there are also models with FVF of 16 and 20. usually weapon models. i've extracted most of the models form Skyforge and saved .h2o files for most of them. so let me know if you need a h2o for a particular model.


Top
 Profile  
 
 Post subject: Re: Skyforge .bin
PostPosted: Thu May 10, 2018 12:23 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2446
Location: Nexus, searching for Jim Kirk
Has thanked: 587 times
Have thanks: 1261 times
OriginOfWaves wrote:
there are also models with FVF of 16 and 20. usually weapon models. i've extracted most of the models form Skyforge and saved .h2o files for most of them. so let me know if you need a h2o for a particular model.
Thanks for your offer! But I think we need an overall solution that would require the above mentioned "big (parameter) file".

As for the above model which I called "bikini girl". Did you get the H2O files and if so did you get them one by one (which I found to be very tedious, 4 copies of "cloth set", 3 copies of shoes) or do you have some method which we could transform into code? For me it was a time eating trial 'til I found it were 4 "cloth sets" and 3 pairs of shoes for example.

_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip


Top
 Profile  
 
 Post subject: Re: Skyforge .bin
PostPosted: Thu May 10, 2018 3:52 pm 
Offline
mega-veteran
mega-veteran

Joined: Fri Jul 08, 2011 10:36 am
Posts: 242
Has thanked: 38 times
Have thanks: 204 times
I decided to take a look at the bikini girl and I was able to get the meshes without a problem.

Image

My approach is similar to shakotay's, the only difference being the calculation of the vertex data offset of the following mesh.

It seems like every index block start with "0000 0100 0200". So find the positions of this pattern, read until you find the next occurrence, and for the last one read until the end of the file. This basically gets you the indices of each mesh.

After that I printed out the maximum values of index list to get an idea of the vertex counts. It came up like this :

Image

The vertex data starts almost immediately at offset 0x8, and the integer value before that (at 0x4), is the size of this data. For the bikini girl this value is 858240. We divide that by the total vertex count, and we get 858240 / 11920 = 72.

Still the vertex block size for a single vertex is not 72 bytes, it is 24 bytes as you can see from shakotay's h2o screenshots. Instead for each mesh there are 3 times (24 bytes blocks * vertex count), 2 of them appears to be LODs.

In my code I read 24 * vertex count, but for calculating the vertex data offset of the next mesh, I do 72 * vertex count. It seems right for the bikini girl model. I haven't checked other files, but if every mesh has exactly 3 copies, it would be possible to find the vertex block size with :
vertex data size (at 0x4) / total vertex count / 3.

Here is my code. Some methods are not in the code, but you get the main idea. I commented what the method does.
Code:
   void Start ()
   {
      byte[] fileData = File.ReadAllBytes ("base.bin");
      var pattern  = new byte[] { 0, 0, 1, 0, 2, 0 };
      int[] indPoses = Locate (fileData, pattern); // Find the positions of the pattern 0000 0100 0200

      MemoryStream ms = new MemoryStream (fileData);
      BinaryReader reader = new BinaryReader (ms);

      List<int> vertCounts = new List<int> ();
      List<List<int>> allInds = new List<List<int>> ();

      int len = indPoses.Length;
      for (int i = 0; i < len; i++) {
         int pos = indPoses [i];
         int nextPos = pos;

         ms.Seek (pos, SeekOrigin.Begin);

         if (i == len - 1)
            nextPos = (int)ms.Length;   // last element, read until EOF
         else             
            nextPos = indPoses [i + 1]; // read until the next occurence of the pattern

         List<int> indices = new List<int> ();
         while (ms.Position < nextPos) {
            indices.Add (reader.ReadInt16 ());
         }

         int max = indices.Max (e => e);
         vertCounts.Add (max + 1);
         allInds.Add (indices);
      }

      // Debug
      int sum = 0;

      foreach (var vc in vertCounts) {
         Debug.Log (vc);
         sum += vc;
      }

      Debug.Log ("Total : " + sum);
      // End

      int nextOff = 8; // vertex block start same for every file?

      for (int i = 0; i < vertCounts.Count; i++) {
         int vc = vertCounts [i];
         ms.Seek (nextOff + vc, SeekOrigin.Begin);
         nextOff += vc * 72;

         List<Vector3> vertices = new List<Vector3> ();
         for (int v = 0; v < vc; v++) {
            float xVal = shortToFloat (reader.ReadBytes (2));
            float yVal = shortToFloat (reader.ReadBytes (2));
            float zVal = shortToFloat (reader.ReadBytes (2));

            vertices.Add (new Vector3 (xVal, yVal, zVal));
            ms.Seek (18, SeekOrigin.Current); // Assumed 24 bytes for the  vertex block
         }
      }

      reader.Close();
   }


Top
 Profile  
 
 Post subject: Re: Skyforge .bin
PostPosted: Thu May 10, 2018 4:45 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2446
Location: Nexus, searching for Jim Kirk
Has thanked: 587 times
Have thanks: 1261 times
Great!

But for the "cloth set" I found 4 meshes, so I guess the first one at 0x1F3E8 to be ignored when analysing?

0xDD86C 4470 # edit: well, this is "fake", accidentially grasped from the body
Vb1
24 8
0x1F3E8 1071
020400
0x0 255

0xDD86C 4470
Vb1
24 8
0x5DBA8 1071
020400
0x0 255

0xDD86C 4470
Vb1
24 8
0x64010 1071
020400
0x0 255

0xDD86C 4470
Vb1
24 8
0x6A478 1071
020400
0x0 255

_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip


Last edited by shakotay2 on Thu May 10, 2018 6:23 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: Skyforge .bin
PostPosted: Thu May 10, 2018 5:14 pm 
Offline
mega-veteran
mega-veteran

Joined: Fri Jul 08, 2011 10:36 am
Posts: 242
Has thanked: 38 times
Have thanks: 204 times
shakotay2 wrote:
so I guess the first one at 0x1F3E8 to be ignored when analysing?


I would say yes. I am getting the first 2 meshes like this. First one is full body with clothes, and second one is just clothes.

Image

So the first block :
shakotay2 wrote:
0xDD86C 4470
Vb1
24 8
0x1F3E8 1071
020400
0x0 255


is actually part of the full body, but it seems to work fine with the indices of the second index list too. Full body mesh seems to be put together from the vertices of other meshes in the file, and I guess you found the part related to cloth vertices, inside the full body vertices.

Btw this seems like an inefficient way to store model data to me. They are repeating lots of vertex blocks.


Top
 Profile  
 
 Post subject: Re: Skyforge .bin
PostPosted: Thu May 10, 2018 5:43 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2446
Location: Nexus, searching for Jim Kirk
Has thanked: 587 times
Have thanks: 1261 times
well, yes, inefficient, lol.
I updated the code of my Make_obj - project. It was so simple, but I still don't understand about the 4 "cloth meshes". I also don't understand why I get 3 bodies. :D

Have to think about it when I have some spare time.

btw: nice to have someone like you here, akaderebur! Kudos.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip


Top
 Profile  
 
 Post subject: Re: Skyforge .bin
PostPosted: Thu May 10, 2018 6:04 pm 
Offline
mega-veteran
mega-veteran

Joined: Fri Jul 08, 2011 10:36 am
Posts: 242
Has thanked: 38 times
Have thanks: 204 times
shakotay2 wrote:
I also don't understand why I get 3 bodies. :D

I am not sure why there are 3 bodies either, but the last one seems to have no straps for bikini. So maybe different variations of the same bikini, with small differences.

shakotay2 wrote:
btw: nice to have someone like you here, akaderebur! Kudos.

Thanks, I am flattered :D I see you (and AceWell too) on the forums daily, helping people with almost every game. I just give a hand, when/if I can find out something.


Top
 Profile  
 
 Post subject: Re: Skyforge .bin
PostPosted: Thu May 10, 2018 6:12 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2446
Location: Nexus, searching for Jim Kirk
Has thanked: 587 times
Have thanks: 1261 times
(sorry for the misspelling of your nick, akderebur, seems I was thinking of "academic" which is spelled "akademisch" in german.)

well, seems I somehow grasped the "fourth" bikini from the body (starting at 0x0008).

This is the result for the Geometry.bin uploaded by lxxxk:


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip


Top
 Profile  
 
 Post subject: Re: Skyforge .bin
PostPosted: Fri May 11, 2018 10:12 am 
Offline
beginner
User avatar

Joined: Wed Jun 08, 2011 1:58 pm
Posts: 37
Location: Nish, Serbia
Has thanked: 24 times
Have thanks: 10 times
my take on it is that the 3 bodies are there for the body sliders that are in the game. so there is a Skinny, Athletic and Thicc body for every character model. the game just morphs between these 3 bodies when you change the sliders.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 44 posts ]  Go to page Previous  1, 2, 3

All times are UTC + 1 hour


Who is online

Users browsing this forum: Lakress, Zaczac121 and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group