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.
eri619
veteran
Posts: 80
Joined: Wed May 16, 2012 6:36 am
Location: India
Has thanked: 11 times
Been thanked: 2 times
Contact:

Re: Extracting simple models

Post by eri619 »

I'm a total noob in 3d format reversing.Although i have posted everything i know about fml files here
viewtopic.php?f=16&t=13978

@shakotay2-could you guide me to how i could get started and learn reversing of 3d formats?
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 »

I made a tutorial (a crash course, to be honest). You can access it by pressing the 'tut' button in hex2obj.

Sadly I don't have the time for (online) teaching.

btw: AceWell answered already in your above mentioned thread.
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?"
SpaceDog
ultra-n00b
Posts: 1
Joined: Tue Mar 01, 2016 10:01 pm
Has thanked: 1 time

Re: Extracting simple models

Post by SpaceDog »

Hello. Sorry for my English. All the fault of Google translator)))
You wrote an excellent programa. She's right reads vertices and UVs. But when reading the index fase reads them is not true. In my case, the polygons are constructed according to the index table in the table of vertices, UVs, Normals. It looks like 0 0 0 1 1 1 2 2 2 ... The first, fourth, seventh values of the numbers of vertices remaining indexes on the Normal and UVs. On each index by two bytes. How do I count in your program with the table only the index of vertices? Is that possible?
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 »

SpaceDog wrote:Is that possible?
Not with the current version.
(If you uploaded a model sample I could have a look at.)
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?"
eri619
veteran
Posts: 80
Joined: Wed May 16, 2012 6:36 am
Location: India
Has thanked: 11 times
Been thanked: 2 times
Contact:

Re: Extracting simple models

Post by eri619 »

Could someone please post the obj mesh of these models please
https://www.sendspace.com/file/gpkk6r
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 »

hex2obj was invented to help people help themselves.

And AceWell alreday showed you how to handle .fml files.

So please ask here: viewtopic.php?f=16&t=13978&p=116120&hilit=+fml#p116120
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?"
eri619
veteran
Posts: 80
Joined: Wed May 16, 2012 6:36 am
Location: India
Has thanked: 11 times
Been thanked: 2 times
Contact:

Re: Extracting simple models

Post by eri619 »

Actually the new files are from RAW 2 for XBOX although the extension is the same,file structure is different i believe.
I'm trying to find my feet in model reversing.
episoder
mega-veteran
mega-veteran
Posts: 162
Joined: Fri Oct 16, 2015 8:05 pm
Has thanked: 6 times
Been thanked: 78 times

Re: Extracting simple models

Post by episoder »

any chance to get the source code? i can't code gui really. neither wanna do from scratch. a pm'd be okay... not necessarily open. i'd just want to mod the gui a bit. and i got some extra complications. formats. xyzw verts, dual uv's and i might need a texture loader for the display. you know?!?
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 »

episoder wrote:any chance to get the source code?
source of hex2obj?
Sry, no - though it doesn't contain any "secrets" I want this project "being mine".

If you know python you could try to build your own solution using Noesis.
(MrAdults wrote: "You could replace hex2obj with a 50-line Noesis script,")
i'd just want to mod the gui a bit. and i got some extra complications. formats. xyzw verts, dual uv's
If you're focussed on one format only you might have a look at the Make_H2O-project which comes with source.
[crash course] How to get multiple submeshes using Make_H2O
To be found here: viewtopic.php?f=29&t=12756

Doesn't contain the GUI you might think of but applying 6 editboxes for example shouldn't be too hard.
(Don't feel confused that Make_H2O was intended to provide H2O files for hex2obj.)
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?"
episoder
mega-veteran
mega-veteran
Posts: 162
Joined: Fri Oct 16, 2015 8:05 pm
Has thanked: 6 times
Been thanked: 78 times

Re: Extracting simple models

Post by episoder »

well... okay... then not. i gotta start cool toding from scatch again then.

jsuk... task at hand is decompiling a battlefront3 map. it's not exactly a simple model. nor about scripted conversion (yet?). it's about identifying the tons of meshes and formats first.
User avatar
Ayumi
ultra-n00b
Posts: 4
Joined: Tue May 01, 2012 8:47 pm
Has thanked: 1 time

Re: Extracting simple models

Post by Ayumi »

Wanted to try this out after seeing you replying in the PSO2 topic.
Didn't want to try on backgrounds yet as I guess those would be harder to do than on trying out on something simple... but I'm already lost at the 1st step.
(My English might suck so... eh...)
Had Hex Workshop for a few years now to do a few edits and fixing, but never used it in this way. Would it work or should I use something else?
Reason on asking is in the 1st step in the rich document is to look into the hex editor for a certain sequence but... I wasn't sure what I was supposed to be looking for.
https://www.sendspace.com/file/jjmu1m
I think those 3 small files supposed to be using the same model itself (but I'm not 100% sure because I can't check) and was wondering if you can at least maybe point out the beginning on what I'm aiming to see here so I can move on forward with trying to extract the model from this?
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 »

to be honest: this is one of the easiest model formats you could think of. :)
Anyway, here's the steps:
  • start of face indices: 0x1004
  • end of face indices: 0x113A
  • size of FI block: 0x136 = 310 dec. -> 155 face indices
  • pressing go1 button -> 92 vertices
  • start of vertices: 0x174
  • end of vertices: 0xFD0
  • size of vertex block: 0xE60 = 3680 dec.
  • FVFsize: 3680 / 92 = 40
remarks:
You might think of 0x170 as the start of vertices (well, for some games it could be true, here it's not)
You don't need to find the exact value of "end of vertices", 40 bytes more or less shouldn't harm here.
(Since a FVFsize of 39 or 41 is very unlikely. Though I remember a value of 29 for some crude game, but that is very, very rare, maybe it was a joke of the developers. :D )

For correct displaying of the model I just toggled from 'noStr' to 'Strip' - that was no matter of deep analysing. :D
The uv's offset? Well, for floats it's often (not always) 40 -2*4= 32. Same as above - no matter of...

HTH
eff-it_mate_de01_aqo.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?"
User avatar
OriginOfWaves
beginner
Posts: 38
Joined: Wed Jun 08, 2011 1:58 pm
Location: Nish, Serbia
Has thanked: 25 times
Been thanked: 11 times
Contact:

Re: Extracting simple models

Post by OriginOfWaves »

hello there mr shakotay2. i've been reading through your tutorials and trying to extract some Frostbyte 4 meshes. i've seen some successful attempts with star wars battlefront models using your tool so i know it's possible but i'm not having any luck. i'm not new to hex editing, i dabbled a few times while modding some games. so i'm finding the start of face indices strait away, no problem, as you said in your tutorials it's the easiest part. however i fall short at the next step, finding the end of the faces list, especially if the file has multiple submeshes. i just can't spot the pattern in the hex editor (guess i need more experience). so i was hoping that you could help me out if you have the time.

I've uploaded a sample file that i've been working on, so if you could please check it out to give me pointers on what i should be looking for with this particular mesh type, and i can take it from there. thanks in advance.

http://www.mediafire.com/download/aercb ... sample.zip
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 »

More details or a H2O file would have prevented me from doing this from scratch, so my available 15 minutes were eaten up. :D

Your on your own now to increase the face indices count until you'll meat the end of the first submesh.

(From the point cloud I guess there's only one SM - dunno what the additional FIs are good for.)
magrope_skin-chunk.jpg
Maybe there's a lod1 model from 0x2C610 with 1333 vertices ore something like that.
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?"
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 »

Is there any way to set negative UV pos in mixed mode?

It's like: first we have UVs (2 half floats) and then vertices (3 floats)
Post Reply