Page 13 of 34

Re: Extracting simple models

Posted: Tue Sep 13, 2016 6:15 am
by shakotay2
'sequential' or 'blocked' is not a matter of face indices. My definition of 'sequential' says (in short): there's all vertices followed by all normals then all uvs. 'blocked' mode means, there's a number of FVF blocks which contain one vertex, one normal and one uv in most cases. So the simplest FVF block (with floats) would have a size of 32 bytes (3x4+3x4+2x4). (But it also may contain weights for example.)

It's normally plain to see where these FVF blocks end and where the face indices block starts.
You should show a model sample where you think it is not.

Re: Extracting simple models

Posted: Wed Sep 14, 2016 1:49 am
by kbr0n
I understand, I got things mixed up.

In the tutorial it's not "f"s but v, vn an vt columns

a) "sequential" mode
v x y z
v x y z
v x y z
v x y z

and

b) "blocked" mode
v x y z
vn x y z
vt x y

I got that. The question should be if there's any tip on identifying those 'v, vn an vt', via hex editor or on hex2o?
are v, vn, vt what we see when press GO2 in VB mode?

how to find these v vn vt values when using seq mode?

I believe when you say it must be plain to identify, but I just not sure exactly where to look for
I apologize for my n00bness :oops:

I´m trying to extract a s.k.e.t.ch.fab model, using one of those .bin files

but all I get are these strange spiky balls

teste.jpg
I just pick a random model of a gun -> https://sketchfab.com/models/3RXKSlKHlI ... DqRq3mQheN


but maybe I should start with something less complex...
any suggestions would be greatly appreciated
thank you

[edited] i just read about that varint thing...probably too complicated for me to deal with

Re: Extracting simple models

Posted: Sat Sep 17, 2016 6:10 pm
by dibe91
I have a question. have you ever tried to pick up models of mobile phone games? there is such a game that is called warhammer 40000 freeblade and there are several models of vehicles orks that I would be very interested in getting ...

Re: Extracting simple models

Posted: Fri Sep 30, 2016 5:27 am
by eri619
Could you please check whether these are model files?
https://mega.nz/#!oUgkwCyD!SF0Mz-13QWkL ... s7JcZBpwC0

Re: Extracting simple models

Posted: Fri Sep 30, 2016 6:58 am
by shakotay2
from a first glance into torso file000000.emd I'd say it's no mesh data

Re: Extracting simple models

Posted: Fri Oct 28, 2016 9:08 pm
by Kanady
Thank you for the tool! It has been working amazingly for me so far.

The only problem (not really problem...) I'm currently having is that I'm working with model files containing numerous models (in some cases 200+) with the format Index Block 1, Index Block 2, Index Block 3, Vertex Block 1, Vertex Block 2, Vertex Block 3. I've taken apart multiple model files like this just fine by using the 'max face index' reported by Hex2Obj and calculating the size/start of each Vertex block.

Image

However, for large files, I'd like to automate this a little easier. Can I ask the formula for how 'max face index' is calculated by Hex2Obj when go1 is pressed? I can't seem to find anything on this.

Thanks!

Edit: I think I've discovered it using another script I've found on these forums:

Code: Select all

for i=1 to face_cnt do (
      f1  = (readShort stream #unsigned) + 1
      f2  = (readShort stream #unsigned) + 1
      f3  = (readShort stream #unsigned) + 1
      if (f1>maxcnt) then maxcnt= f1
      if (f2>maxcnt) then maxcnt= f2
      if (f3>maxcnt) then maxcnt= f3
Seems I can't automate it then with just a spreadsheet - will take some more advanced methods.

Thanks again!

Re: Extracting simple models

Posted: Sat Oct 29, 2016 11:09 am
by shakotay2
hex2obj was intended to get model files with a quick approach.

For problems such as yours you're supposed to use a script (maxscript, Noesis or blender python).

If you know 'C' you might also look at:
viewtopic.php?f=29&t=12756

Basically it's used to create multiple H2O files to be used by hex2obj.
May appear to be a little bit awkward but there's some examples to give you the idea.

Re: Extracting simple models

Posted: Sun Oct 30, 2016 10:46 am
by Smakkohooves
Where i can download hex2obj

Re: Extracting simple models

Posted: Wed Nov 02, 2016 3:30 pm
by OriginOfWaves
hey there shakotay2. i have a file here I was hoping you have the time to help me out with. i can find and extract the meshes no problem but they end up with some flipped faces so 3d modeling software has problem rebuilding normals for them. now i can fix the faces in 3d max no problem and rebuild the normals correctly but i would like to know if i'm doing something wrong while extracting the meshes that causes these flipped faces.
example image.
Screenshot (26).png
i uploaded the file and the h2o settings i used. thanks in advance. https://www.dropbox.com/s/d8e1v8azpprzo ... er.7z?dl=0

Re: Extracting simple models

Posted: Wed Nov 02, 2016 9:56 pm
by shakotay2
@Smakkohooves: viewtopic.php?f=29&t=10894

@OriginOfWaves: if those flipped faces concerned a whole submesh one could flip it as a whole object.
But the flipped faces appear randomly "checkered" (upper part of the picture). Even worse: the flipped faces don't have a normal at the backside, dunno why.
So I've to confess that I don't have a clue to solve it other than you did.
edit: seems it's a matter of overlapping submeshes (lods?).
Import to blender separated as groups, select dark part of the mesh (lower part of pic, not a whole submesh, sadly) and drag it away.
face_normals_.JPG
(Sometimes there's tables in model files containing flags which tell you when to flip the face winding.
But that's a very special feature that hex2obj will not cover to keep it simple.)

Re: Extracting simple models

Posted: Wed Nov 02, 2016 10:58 pm
by OriginOfWaves
figured there was something else going on here. it's not a big issue. takes me 5 minutes to fix the faces in 3dmax. thanks for looking into it man.

Re: Extracting simple models

Posted: Thu Nov 03, 2016 10:59 pm
by cascraft
is any german tutorial for that?

Re: Extracting simple models

Posted: Fri Nov 04, 2016 10:27 am
by shakotay2
not to my knowledge
But this is something which can be done very simply by yourself: use a translator.

The following example doesn't give the very best results (some misleading may occur: 'faces' ist 'Dreiecke' instead of "Gesichter", or faces shouldn't be translated, though). Same goes for 'little endian' which is a common know technical term in Germany, too.
This kind of translation should be sufficient (more or less, after some manual corrections ):
hex2obj_tutorial_translation.JPG
Feel uncouraged to translate the whole thing this way.

Re: Extracting simple models

Posted: Tue Nov 08, 2016 10:54 pm
by devmode
In more games, especially on consoles, often can see what face indices in models is repeated or looks incorrect like this:
print a2
[0,0,1]
[2,3,4]
[5,6,7]
[8,9,10]
[11,12,13]
[14,15,16]
[17,17,18]
[18,18,19]
[20,21,22]
[23,24,25]
[26,27,28]
[29,29,30]
[30,30,31]
[32,33,17]
[16,16,34]
[34,34,35]

[36,37,38]
[39,40,41]

...

[109,109,110]
[110,110,50]

OK
Yes, it can easy replacing by generated indexes. Me just interesting a specific, how games\engines read these indices? Maybe have some patterns of this indices structures?

Re: Extracting simple models

Posted: Tue Nov 29, 2016 11:45 am
by eri619
Is this format a simple format? its a file from PSP