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

Extracting simple models

Read or post any tutorial related to file format analysis for modding purposes.
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4285
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1147 times
Been thanked: 2242 times

Re: Extracting simple models

Post by shakotay2 »

cmr14 wrote:Can you tell me some tips for work on this files? only for this game.
You need to be more specific.

Basically it's trial and error when the vertices are NO floats.
Combined with a huge amount of experience. You can't really teach experience.

For the FVF: search for patterns (00 BC here).

Give the file a structure (this is the most simple part but most requester don't do it for some unknown reason. :D )

Here's what I mean, for the first FVF blocks (28 bytes each). Thin lined rectangles contain normals, iirc -
the thick lined rectangle surrounds the first vertex:
helmet_020_first FVF.jpg
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
cmr14
n00b
Posts: 14
Joined: Mon Jun 20, 2016 9:17 pm
Been thanked: 1 time

Re: Extracting simple models

Post by cmr14 »

shakotay2 wrote:You need to be more specific
Sorry, but I totally lost in hex editing..
Its a big problem. You must hate me after this question xD
My progress: I can find the start of the face indices list, but i cant find the list's end.. I don't know where ending the list..
After that and copy your numbers of previous post (the picture with the numbers of the helmet) I can put GO1 and find the vertex count (1889).
The next step are multiply 8 x vertex count (1889 in this case), all ok.
But in your tutorial there is something I do not understand:
You need the rest the start of the face indices list to the result of the 8 x 1889, but in the tutorial the number of the face start list there is not the same.
So 0x398D should be the start of the face indices list.

We "calculate back" from 12 bytes before (yes, this is "experi-ence") the start of the face indices list to find the uvs start address: 0x3981 - 0xE48 = 0x2B39
There is the big problem, sorry for the disturb but I want to learn something of this tool, its really fun, but I know that I know nothing of this method.I dont know what is "sequential, blocked, FVF.. etc"
Thanks for your help, I really appreciate it a lot!
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4285
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1147 times
Been thanked: 2242 times

Re: Extracting simple models

Post by shakotay2 »

cmr14 wrote:The next step are multiply 8 x vertex count (1889 in this case), all ok.
Guess concerning "multiply 8x" you're referring to uv block size? The tutorial example is about sequential mode, but your sample uses blocked mode.

Your model uses half floats while the tut is about floats. It's for simple models.
You can't expect a simple tutorial to cover all variations of possible 3D formats.

You could look at the dozens of examples where hex2obj was used in this forum.
I dont know what is "sequential, blocked, FVF.. etc
Read the tutorial again.
(Guess some pictures (excerpts from hex data) for the modes could help but sadly I've no time for such atm.)
My progress: I can find the start of the face indices list, but i cant find the list's end.. I don't know where ending the list..
this is the end of the first face indices block. If you don't recognize it - I fear, I can't help then.
helmet-EOF-fst_FI-block.jpg
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
cmr14
n00b
Posts: 14
Joined: Mon Jun 20, 2016 9:17 pm
Been thanked: 1 time

Re: Extracting simple models

Post by cmr14 »

shakotay2 wrote:this is the end of the first face indices block. If you don't recognize it - I fear, I can't help then.
I have managed to extract some files 3d (with trial and error of course xD) Here I leave some photos of the imported files in blender:

Image Image

Image Image

Image


My next question is this: I can extract larger files with the same method? The larger size of the extracted files is 150kbs and I like to extract a bike (4 mg) I tried but I have not found a way to do it..

Another question: I think the file has more 3d helmets parts (glass viewfinder, etc)Is there any way to check if there is more 3D parts in the same file?
I hope not bother you, but I sent some files if you can help me :)


This tool open the .bml files (these files are in the following downloads) and it can give you a lot of important information. (IMPORTANT: This file its recognized as a virus, but the creator has confirmed to me that is not malignant and have used it in my own pc and have not had any problems)
http://www.mediafire.com/download/i650u ... Editor.rar

This file is a bike (4mg file) it also has the file .blm (and the .bin of course)
http://www.mediafire.com/download/ircb1 ... GP_601.rar

This file is a helmet, but now have the .blm too
http://www.mediafire.com/download/fh5sf ... ET_005.rar

Really sorry for the disturb, but I advanced in the editing and I want to keep learning more!
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4285
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1147 times
Been thanked: 2242 times

Re: Extracting simple models

Post by shakotay2 »

cmr14 wrote:My next question is this: I can extract larger files with the same method?
depends on the file - if it's a model file then: why not? Try to give the file some structure - search for patterns, for strings.
There's no general recipe that will work for every 3D format. You'll need experience which you can gain by checking the dozens of examples hex2obj was used for in this forum.
Another question: I think the file has more 3d helmets parts (glass viewfinder, etc)Is there any way to check if there is more 3D parts in the same file?
Search for 'helmet_', then check the found strings for containing 'lod'. Seems there's several lods (level of detail). (In most cases the lod with the highest resolution is of interest.)
I hope not bother you, but I sent some files if you can help me :)
sry, I've given initial help - but I'm too busy with my own projects. Feel free to ask specific questions and I'll try to answer as good as I can.
Really sorry for the disturb, but I advanced in the editing and I want to keep learning more!
That's great! I'll keep an eye on your progress. :)
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
cmr14
n00b
Posts: 14
Joined: Mon Jun 20, 2016 9:17 pm
Been thanked: 1 time

Re: Extracting simple models

Post by cmr14 »

shakotay2 wrote:sry, I've given initial help - but I'm too busy with my own projects. Feel free to ask specific questions and I'll try to answer as good as I can.
Ok, thanks! if you have free time, try to extract the model of the bike please and give me a pic with the config panel of Hex2obj :P
When you can, do not hurry! I'm trying it but I can't.. it's too difficult to me, I need more info haha
Thanks again bro!!
cmr14
n00b
Posts: 14
Joined: Mon Jun 20, 2016 9:17 pm
Been thanked: 1 time

Re: Extracting simple models

Post by cmr14 »

shakotay2 wrote:Search for 'helmet_', then check the found strings for containing 'lod'. Seems there's several lods (level of detail). (In most cases the lod with the highest resolution is of interest.)
I'm working on a dirt mask, the first extract model only brought the mask 3d files, without others 3d models that if they go in the game (visor, elastic to hold the mask, etc) In the texture there are parts that have failed to extract, and I think those 3d parts are in the same file .bin but I cant extract those 3d models

EXAMPLE:
Image


In the .bin file I found several interesting facts:

Image


I'm sure that I've marked in the picture (in blue, previous photo) is a 3D part that I have not managed to export. I tried to extract the file (visor glass) but I could not, but I have a cuestion:


I need to change some data? (next picture, Hex2obj pic) I've marked in the picture in red. I dont know if with that new 3d file I have to change the start face indices or/and start of vertices, is necessary to change these two data?
Image

I tried to extract the file with the same data in (start faces, start vertices, fvf size and uv pos) by changing only the count faces indices and vertices count, but I cant
get results :(


PD: I hope I have expressed myself well so that you understand me, and of course sorry for the disturb..
Thanks agains mate!
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4285
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1147 times
Been thanked: 2242 times

Re: Extracting simple models

Post by shakotay2 »

cmr14 wrote:I need to change some data? (next picture, Hex2obj pic) I've marked in the picture in red. I dont know if with that new 3d file I have to change the start face indices or/and start of vertices, is necessary to change these two data?
From your question I'm not sure whether you understood the very basics. Extracting models with hex2obj is not a matter of wild guessing or searching "for random parameters".

Did you understand how to get the start address of face indices and vertices in this post? viewtopic.php?f=29&t=10894&p=119717&hil ... fy#p119717

If 'no' try to get familiar with it.

Though this format (using half floats) is not suggested to start with for beginners.
You really should try out some simpler formats before.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
cmr14
n00b
Posts: 14
Joined: Mon Jun 20, 2016 9:17 pm
Been thanked: 1 time

Re: Extracting simple models

Post by cmr14 »

shakotay2 wrote:From your question I'm not sure whether you understood the very basics. Extracting models with hex2obj is not a matter of wild guessing or searching "for random parameters".

Did you understand how to get the start address of face indices and vertices in this post? viewtopic.php?f=29&t=10894&p=119717&hil ... fy#p119717
If 'no' try to get familiar with it.

Though this format (using half floats) is not suggested to start with for beginners.
You really should try out some simpler formats before.
I followed your advice, I tried to extract the bike but the result is this:

Image

Is the shape of the bike, but something goes wrong .. can you know whats going wrong? Again sorry for the disturb and thanks!

PD: This is the files of bike: http://www.mediafire.com/download/ycbry ... 282%29.rar
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2870 times

Re: Extracting simple models

Post by daemon1 »

As one could expect, this bike has submeshes. And a LOT of them. This is one of the biggest:

Image

So without automation, this will be pain to find and get them all manually.
cmr14
n00b
Posts: 14
Joined: Mon Jun 20, 2016 9:17 pm
Been thanked: 1 time

Re: Extracting simple models

Post by cmr14 »

daemon1 wrote:As one could expect, this bike has submeshes. And a LOT of them. This is one of the biggest:
So without automation, this will be pain to find and get them all manually.
Ops, this is bad notice :( what it was wrong in my config? I think the all numbers are ok but the fvf and uv pos are wrong (I repeat, I Think, I never do nothing good xD)
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2870 times

Re: Extracting simple models

Post by daemon1 »

Submeshes are meshes split in many parts. You just CAN'T extract them all in one go. This one big array you tried to get is actually more than 10 separated parts.
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4285
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1147 times
Been thanked: 2242 times

Re: Extracting simple models

Post by shakotay2 »

daemon1 wrote:So without automation, this will be pain to find and get them all manually.
yep - but I guess, our young padawan is willing to suffer it, don't you, cmr14? :D

Here's the H2O file for the biggest part daemon1 spoke of:

0x343FBC 72633
Vb1
36 8
0x4F0B 26778
020200
0x0 255

Search for the string BikeGP_601 in the bin file to find the starting points of the next face indices blocks about 160 bytes behind it. Good luck. (0x244AA6: assumed address of first FIs block.)

(You could also switch to relative face indices if required. I explained that in the ride thread, iirc.)

edit: okay, on a second glance I'd say, it might turn out to become frustrating for beginners, @cmr14.
Found 4 chassis, the upper ones lower? LODs, while the two at the bottom appear to be similar:
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
cmr14
n00b
Posts: 14
Joined: Mon Jun 20, 2016 9:17 pm
Been thanked: 1 time

Re: Extracting simple models

Post by cmr14 »

daemon1 wrote:Submeshes are meshes split in many parts. You just CAN'T extract them all in one go. This one big array you tried to get is actually more than 10 separated parts.
Thanks for your help bro! You have helped me a lot :)
shakotay2 wrote:Search for the string BikeGP_601 in the bin file to find the starting points of the next face indices blocks about 160 bytes behind it. Good luck. (0x244AA6: assumed address of first FIs block.)

(You could also switch to relative face indices if required. I explained that in the ride thread, iirc.)

edit: okay, on a second glance I'd say, it might turn out to become frustrating for beginners, @cmr14.
Found 4 chassis, the upper ones lower? LODs, while the two at the bottom appear to be similar:
Okay, I followed your advice and daemon1 too and I searched new submeshes and I found some of them and look good in the Hex2obj but in blender it appears without uv mapping

Image

Here are some examples of them. All these files haven't mapping

Image Image Image

Image Image

This file its to the line "chain" (I tried it with some lines of chain) but I've tried to fix it but me goes wrong (I used the same method as with the other files)

Image

And finally I leave this:

Image


I tried to search submeshes in the file helmet and I have found the visor (I used the same method as with the other files, again) and this submesh It does have UV map (look the pic)
I do not know what the problem with the bike, but at least I've made some progress thanks to you (shakotay2 and daemon1) Many thanks for your help!!!!

PD: I tried searching submeshes in another file, RIDER.BIN , the file 3d model pilot, but I do not get anything when I press "mesh" in Hex2obj.. This is the config I used:

Image

Here I leave the RIDER.BIN file if you want to look at and give me more info, if you want! Only if you have free time!! I do not want to disturb you..

http://www.mediafire.com/download/1lqdz ... /RIDER.rar

Again thanks thanks and more thanks!! I love u guys haha
Acewell
VIP member
VIP member
Posts: 1330
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2710 times
Been thanked: 884 times

Re: Extracting simple models

Post by Acewell »

first submesh in RIDER.BIN :D
RIDER_BIN.png
exact face count for each submesh is 13 bytes before face indices
or go back 4 bytes before face indices and divide that integer by 2

the vertex stride is stored 48 bytes before the vertex block starts
if the vertex stride changes in the same file it will be 44 bytes before that new vertex block starts
You do not have the required permissions to view the files attached to this post.
Post Reply