## Extracting simple models

Read or post any tutorial related to file format analysis for modding purposes.
atsniperthin
ultra-n00b
Posts: 4
Joined: Sat Mar 24, 2018 9:49 am
Has thanked: 3 times

### Re: Extracting simple models

First sorry for my English. Anyone pls help me i'm stucking at getting uvs of 300 Heroes models i managed to get model but i have no idea getting uvs PLEASE HELP! so i can have an Example

Here is model sample and .h2o setting.

Acewell
VIP member
Posts: 1253
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2379 times
Been thanked: 721 times

### Re: Extracting simple models

search for an 8 byte pattern and check it
00001a96.PNG
You do not have the required permissions to view the files attached to this post.

atsniperthin
ultra-n00b
Posts: 4
Joined: Sat Mar 24, 2018 9:49 am
Has thanked: 3 times

### Re: Extracting simple models

i don't know which is 8 bytes by the way but thanks you anyway i'll try a different things on my own

would u mind give me a tutorial? so i can notive which one is 8 bytes cause of not similar with these stuff

shakotay2
MEGAVETERAN
Posts: 2666
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 662 times
Been thanked: 1366 times

### Re: Extracting simple models

pattern checking to recognize uvs is something for more experienced people, in this case I could think of xx xx xx 3F xx xx xx 3F, where 3F might also be 3E or BF or BE

The more obvious approach (in this case) to get the uvs address (which does NOT work for every 3D format!) is to add the size of vertex and normals block (2781*12 bytes each, 0x8694) to the vertex starting address, i.e.
0x3808 + 0x8694 + 0x8694 = 0x14530

(There's an interesting block at 0x19EE8, it's 2871 x 1 byte, maybe used for coloring vertices, dunno.)

If you enter the start address of normals (0x3808 + 0x8694) you'll get a sphere, because the normals vectors have a size of 1.0.
(google for "3d normals", if you're interested in them. hex2obj doesn't care for them because any 3D app can auto calculate them.)
normals.jpg
btw: you meant "familiar" not "similar"?
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

atsniperthin
ultra-n00b
Posts: 4
Joined: Sat Mar 24, 2018 9:49 am
Has thanked: 3 times

### Re: Extracting simple models

Ohhhh!!!!! Thankssssssssssssss i managed to get uvs for these model!!!! Again Thanks a Million!

btw:yeah i mean "familiar" not "similar" i'm not familiar all of these cause i just happened to learn all these 3 days ago since i pm you

shakotay2
MEGAVETERAN
Posts: 2666
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 662 times
Been thanked: 1366 times

### Re: Extracting simple models

btw: your H2O file contained 'seq' and that was correct! Because a float Vertex block (VB, as defined in the hex2obj tutorial) of 12 bytes size is a contradiction in itself.

It's a matter of correct definition, and VB, my bad, was not. It might stand for a pure block of vertices as Ace and me used it here but that was not how I defined it.
In the end we've a pure "vertex block" followed by a normals block here, it's "sequential" mode.

So "VB" should be named cVB for example (combined vertex block: vertex (x,y,z), normal (nx,ny,nz), uv (tx,ty) for example).
(Or "fVB" for flexible VB, this would match up with FVF.)

(There was an assumption to call that mode 'nested' but from my understanding it's not. If you think of "nested interrupts" for example it means an interrupt occurring during the processing of a prior interrupt. Similar to russian Matrjoschkas.)

Combined VB (single vertex, single normal, (single uv)) versa sequential blocks (Vertex block, normals block), should make sense.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

SomaCruz10
ultra-n00b
Posts: 2
Joined: Mon Jul 30, 2018 5:21 pm

### Re: Extracting simple models

shakotay2 wrote:hex2obj exes are NOT working standalone, so
for zips with exe-only you need the files in this zip as a base, too:
---------- >>> version 0.24c <<< ----------
hex2obj_0.24c.zip

Copy the lastest exe to the unzipped folder then.

(wordpad.exe is not required, you can just double click hex2obj_tut.rtf)
What about glut32.dll problem? there only .exe file in archive

atsniperthin
ultra-n00b
Posts: 4
Joined: Sat Mar 24, 2018 9:49 am
Has thanked: 3 times

### Re: Extracting simple models

u need a base file from 0.24c

btw:u should have ask me in discord group ^-^

libaibaba
ultra-n00b
Posts: 9
Joined: Thu Jul 26, 2018 8:33 am
Been thanked: 1 time

### Re: Extracting simple models

Hello, after reading a lot of articles on the forum, my stupid brain still can't figure out where to get fvfsize and uvpos. You're definitely the best one here. Can you help me? viewtopic.php?t=18787

Mediocrity
ultra-n00b
Posts: 2
Joined: Thu Mar 09, 2017 9:31 pm

### Re: Extracting simple models

vertex color support in a vertex block? I can see them sometimes I think but I can't do anything about it on my own.

shakotay2
MEGAVETERAN
Posts: 2666
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 662 times
Been thanked: 1366 times

### Re: Extracting simple models

Mediocrity wrote:vertex color support in a vertex block?
hex2obj was meant to support simple model formats only. Advanced features such as "Vertex colors" are supposed to be handled by code or in a script (maxscript/python), imho.

Main reason is that hex2obj deals with Wavefront *.obj files, this format is not intended to be used with vertex colors, afaik.
https://gamedev.stackexchange.com/quest ... -obj-files

And fluffy wrote: "Unfortunately that only allows for per-face coloring, not per-vertex coloring."
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

Mediocrity
ultra-n00b
Posts: 2
Joined: Thu Mar 09, 2017 9:31 pm

### Re: Extracting simple models

I guess I'll have to learn to write an import script. maybe for blender or noesis...Thanks for the reply

Beedy
beginner
Posts: 33
Joined: Mon Dec 05, 2016 11:12 am
Has thanked: 4 times
Been thanked: 8 times

### Re: Extracting simple models

Hello. I Have models where data is stored 32 bytes sized Vertex blocks where vertices are in half-floats and UV's is WordUV. There is no option to set both half-float vertices and Word Uv's. Only way is extract mesh first with option hf-all and then uv's with option wordUV to testUV.obj and in text editor replace all v to vt and then paste it in to test.obj.

Is it possible to add these option in next version of hex2obj?

shakotay2
MEGAVETERAN
Posts: 2666
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 662 times
Been thanked: 1366 times

### Re: Extracting simple models

Beedy wrote:There is no option to set both half-float vertices and Word Uv's. Only way is extract mesh first with option hf-all and then uv's with option wordUV to testUV.obj and in text editor replace all v to vt and then paste it in to test.obj.

Is it possible to add these option in next version of hex2obj?
It's possible but there's three reasons why this option will not be added:
1) hex2obj is looked upon to be finished more or less
2) Modelresearcher should do the trick, iirc

3) hex2obj is intended to do a first approach only on a format, i.e. convert one sample to obj
Then you should apply your found parameters to the make_obj project which comes with C-source:
viewtopic.php?f=29&t=15955

(You'll need to do some pattern search for example to find counts and start addresses automatically then.)
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

Beedy
beginner
Posts: 33
Joined: Mon Dec 05, 2016 11:12 am
Has thanked: 4 times
Been thanked: 8 times

### Re: Extracting simple models

shakotay2 wrote: It's possible but there's three reasons why this option will not be added:
1) hex2obj is looked upon to be finished more or less
2) Modelresearcher should do the trick, iirc

3) hex2obj is intended to do a first approach only on a format, i.e. convert one sample to obj
Then you should apply your found parameters to the make_obj project which comes with C-source:
viewtopic.php?f=29&t=15955

(You'll need to do some pattern search for example to find counts and start addresses automatically then.)
Okay, I understand. Thanks anyway, H2O has helped me a lot to understand the structure of my model.