Extracting simple models

Read or post any tutorial related to file format analysis for modding purposes.
User avatar
Tosyk
double-veteran
double-veteran
Posts: 936
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 226 times
Been thanked: 107 times
Contact:

Re: Extracting simple models

Post by Tosyk » Sun Aug 19, 2018 10:27 am

I have good progress in the script for division. right now I'm trying to understand where Gh0stBlade getting mesh scaler. also I noticed that some meshes are not fit their skeleton just a bit. for example on this screenshot full model need to be scaled down fo 1% and moved by Y:-0.1 to fit the skeleton. I found that some of the head models need to be transformed the same way but with different numbers.

Image

I would apreciate if anyone explain to me how this (viewtopic.php?p=118852#p118852) python reads scaler
Thank you for all you do here
my blog | my forum

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

Re: Extracting simple models

Post by atsniperthin » Sat Aug 25, 2018 5:56 pm

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.
https://drive.google.com/open?id=1spuQi ... vCQjHDI86B

User avatar
Acewell
VIP member
VIP member
Posts: 1223
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2359 times
Been thanked: 707 times

Re: Extracting simple models

Post by Acewell » Sat Aug 25, 2018 8:55 pm

search for an 8 byte pattern and check it :D
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

Post by atsniperthin » Sun Aug 26, 2018 11:12 am

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

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

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2630
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 648 times
Been thanked: 1352 times

Re: Extracting simple models

Post by shakotay2 » Sun Aug 26, 2018 12:45 pm

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

Post by atsniperthin » Sun Aug 26, 2018 1:58 pm

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 :D

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2630
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 648 times
Been thanked: 1352 times

Re: Extracting simple models

Post by shakotay2 » Sun Aug 26, 2018 3:13 pm

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. :D

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

Post by SomaCruz10 » Tue Aug 28, 2018 3:24 pm

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

Post by atsniperthin » Tue Aug 28, 2018 4:16 pm

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

Post by libaibaba » Mon Sep 10, 2018 1:06 pm

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

Post by Mediocrity » Sun Sep 23, 2018 8:28 pm

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.

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2630
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 648 times
Been thanked: 1352 times

Re: Extracting simple models

Post by shakotay2 » Sun Sep 23, 2018 10:20 pm

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.
You may read here,
https://gamedev.stackexchange.com/quest ... -obj-files
(answer from Jacques Pretorius)

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

Post by Mediocrity » Tue Sep 25, 2018 3:15 am

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

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

Re: Extracting simple models

Post by Beedy » Sat Nov 10, 2018 11:21 pm

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?

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2630
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 648 times
Been thanked: 1352 times

Re: Extracting simple models

Post by shakotay2 » Sun Nov 11, 2018 6:44 pm

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."

Post Reply