XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Mon Oct 22, 2018 5:03 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 388 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11, 12 ... 26  Next
Author Message
 Post subject: Re: Extracting simple models
PostPosted: Sun May 01, 2016 8:48 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2446
Location: Nexus, searching for Jim Kirk
Has thanked: 587 times
Have thanks: 1260 times
guess, you mean "block mode" (such as vx,vy,vz, nx,ny,nz, tx,ty) because in hex2obj's "mixed mode" UVpos is 99 per definition
and the uvs are in a separate block

but 'yes', it's a known problem with hex2obj and there's an ugly workaround using the "mixed" instead of "block" mode:
set UVpos to 99, set start UVblock (UVB) to start of vertices - 4 and 'size of UVB' to FVFsize.
In step 3 choose HF_UV.

--------------------------
btw: using a negative UVpos in "block mode" wouldn't solve the problem, because the next vertex address to handle
after having read 3 vertex floats
is calculated by addr += UVpos -12
and after having read the uvs -> addr += bytesToSkip
where bytesToSkip= VBsize-12 ; bytesToSkip -= (UVpos-12 + 4) // 4: size of 2 half floats

Guess, an additional variable vertex position will be required for a proper solution and there are
6 functions to be handled (since it makes no sense to have that feature for float/HFloat only):

VertexBlock(), VertexBlock_UV_HF(), VertexBlock_allHF()
VertexBlock_UVs_Word(), VertexBlock_all_Word(), VertexBlock_VShort_UVs_Word()

This would end up in a more or less complete rewrite of code.

_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip


Last edited by shakotay2 on Sun May 01, 2016 9:09 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Sun May 01, 2016 9:06 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran

Joined: Tue Mar 24, 2015 8:12 pm
Posts: 1687
Has thanked: 36 times
Have thanks: 1111 times
shakotay2 wrote:
there's an ugly workaround using the "mixed" instead of "block" mode


Thanks for the reply. How could I not think about it? :)

This workaround is not that ugly actually.


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Sun May 01, 2016 10:15 pm 
Offline
beginner
User avatar

Joined: Wed Jun 08, 2011 1:58 pm
Posts: 37
Location: Nish, Serbia
Has thanked: 24 times
Have thanks: 10 times
thanks a bunch man, you are a gem. could you explain how you got the FVF size? i would like to know for future reference. i think you're right and that there is just one submesh and those extra Fls are for other LODs. Anyways i found the UVs at pos 52 and HF_UV, they do however need to be flipped and readjusted.

Image Image

so these are the numbers for anyone else trying to extract meshes form Mirror's Edge Catalyst Beta


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Sun May 01, 2016 11:30 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2446
Location: Nexus, searching for Jim Kirk
Has thanked: 587 times
Have thanks: 1260 times
OriginOfWaves wrote:
could you explain how you got the FVF size?
it's a matter of patterns in most cases - here 3C 02 03 01
for example, which is repeated after 56 bytes

_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Mon May 02, 2016 4:16 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran

Joined: Tue Mar 24, 2015 8:12 pm
Posts: 1687
Has thanked: 36 times
Have thanks: 1111 times
OriginOfWaves wrote:
could you explain how you got the FVF size?


After you get faceindices, you have number of vertices. Just divide the full size of vertex/UV block by that, and you get FVF size.


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Mon May 02, 2016 5:03 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2446
Location: Nexus, searching for Jim Kirk
Has thanked: 587 times
Have thanks: 1260 times
daemon1 wrote:
Just divide the full size of vertex/UV block by that, and you get FVF size.
yep, but in this special case that won't help. Look at 0x2C610 (3246x56) in magrope_skin.chunk and you'll see that you're "at the edge of nowhere".

How should anyone know that this is the "full size"?

_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Mon May 02, 2016 7:26 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran

Joined: Tue Mar 24, 2015 8:12 pm
Posts: 1687
Has thanked: 36 times
Have thanks: 1111 times
shakotay2 wrote:
yep, but in this special case that won't help.


Sorry, I didn't look into the file. Really strange. Two vertex blocks one after another. And the second one is not LOD1 model, it has 2666 vertices and 14560 faces, FVFsize 28. Model looks exactly the same, but I can't see any UV's there.


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Tue May 03, 2016 9:28 pm 
Offline
beginner
User avatar

Joined: Wed Jun 08, 2011 1:58 pm
Posts: 37
Location: Nish, Serbia
Has thanked: 24 times
Have thanks: 10 times
shakotay2 wrote:
daemon1 wrote:
Just divide the full size of vertex/UV block by that, and you get FVF size.
yep, but in this special case that won't help. Look at 0x2C610 (3246x56) in magrope_skin.chunk and you'll see that you're "at the edge of nowhere".

How should anyone know that this is the "full size"?


well aren't i lucky to run into files that are special and bend the rules [roll]

anyways, i seem to have come upon a weird issue while digging through a certain file. and while i can find the face indices and vertices and display the mesh easily and quickly for both LOD0 and LOD1 versions of the model, i can only seem to find the UVs for the second (LOD1) lower resolution mesh. no mater what settings i try for the first (LOD0) mesh i can't find the UVs in the block. i even tried the mixed mode by setting the UV pos to 99 changing the UV size and pointing to the start of where i thought the UVs are, but still no luck. i think i read through this file in the HEX Editor so many times that everything blurs back together now :?

So if anyone smarter and more focused than me has the time to look at the file i uploaded and let me know what i'm missing, i'd greatly appreciate it. just when i thought i figured these models out, they throw a curve at me :(

anyways here is the file (.mesh and .h2o) http://www.mediafire.com/download/cl3ru ... ample1.zip


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Wed May 04, 2016 4:36 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2446
Location: Nexus, searching for Jim Kirk
Has thanked: 587 times
Have thanks: 1260 times
OriginOfWaves wrote:
shakotay2 wrote:
, i can only seem to find the UVs for the second (LOD1) lower resolution mesh.
but it's not in the H2O in your zip, is it?

Anyway, creating some kind of address map for that .mesh would help, I guess.
Here's what I found so far:
(maybe it's the uvs you found already, dunno)

OriginOfWaves wrote:
well aren't i lucky to run into files that are special and bend the rules [roll]
if you mean the "rules" from the hex2obj tutorial: they were defined for simple model formats, for special ones you'll need experience, as you may know (now :D )


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip


Last edited by shakotay2 on Wed May 04, 2016 7:03 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Wed May 04, 2016 6:59 pm 
Offline
beginner
User avatar

Joined: Wed Jun 08, 2011 1:58 pm
Posts: 37
Location: Nish, Serbia
Has thanked: 24 times
Have thanks: 10 times
Quote:
but it's not in the H2O in your zip, is it?

Anyway, creating some kind of address map for that .mesh would help, I guess.
Here's what I found so far:
(maybe it's the uvs you found already, dunno)


thanks for the help again man.

those are the uvs for the high resolution mesh that you have found, that's what i was missing. looks like i was wrong about the start of the vertices, like by a lot. i really thought that they would be at the beginning of the file because that is the first mesh. if i was wrong about the start of the vertices how was i able to display the mesh correctly? how did you find the start of the vertices anyways? did you use the equation from your tutorial?


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Wed May 04, 2016 7:49 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2446
Location: Nexus, searching for Jim Kirk
Has thanked: 587 times
Have thanks: 1260 times
I scanned the file in steps of 4897*24 bytes, at no avail.
Then I went backwards from 0x1D5B40, but from the data I saw that the FVFsize was different.

I can't give general rules for such, it's creativity or something like that based on simple rules.

For files with a size of 2 MB it could help to write down some kind of address mapping, steps of 4897*24 bytes, here, for example.

_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Sun Jun 12, 2016 5:01 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2446
Location: Nexus, searching for Jim Kirk
Has thanked: 587 times
Have thanks: 1260 times
well, 2000 downloads of hex2obj so far (and maybe 5 regular users? :D )

Time for a new feature: autogenerated face indices. You might try it out with the
policeman model from this thread: viewtopic.php?f=16&t=13494&p=114317&hilit=indices#p114317

(exe only - hex2obj_0.24c.zip required!)

Since autocreated face indices don't fit very well in most cases you're free to create your own
FIs.txt file which should look like this:

#comment line, required!
f 1/1 2/2 3/3
f 4/4 5/5 6/6
f 3/3 5/5 7/7
f . . .
Should reside in the model file's folder with Fake selected.

If you need the test.obj only for testing (without uvs) you can reduce FIs.txt like this:

#comment line, required!
f 1 2 3
f 4 5 6
f 3 5 7
f . . .

(Maximum face index may not exceed vertex count!)


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Tue Jun 21, 2016 4:26 pm 
Offline
n00b

Joined: Mon Jun 20, 2016 9:17 pm
Posts: 14
Has thanked: 0 time
Have thanks: 1 time
shakotay2 wrote:
well, 2000 downloads of hex2obj so far (and maybe 5 regular users? :D )

Hi master, I have a problem with a file of Valentino Rossi the game (2016) of milestone.
I tried import myself a file model 3d of a helmet, but it has not worked for me.. I follow the tutorial but something dont work.. (im spanish, my english is very bad)
In vertices count the number is 65281 and the file is 217kb.. something its wrong :(
Can you help me? Here is the file :

http://www.mediafire.com/download/y05fa ... ET_020.BIN

I dont know if someone (or you) can export the model, but I want to learn the metod of edit the file and import in blender for editing.
Please help me, thanks in advance master!


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Tue Jun 21, 2016 10:14 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2446
Location: Nexus, searching for Jim Kirk
Has thanked: 587 times
Have thanks: 1260 times
cmr14 wrote:
Hi master,
Just to keep you informed, “There is no Master but the Master,”
and in this forum he's called MrAdults. :D
Quote:
I tried import myself a file model 3d of a helmet, but it has not worked for me.. I follow the tutorial but something dont work..
the vertices are half floats - those are not so easy to identify for beginners.

I myself didn't get it within the magic 15 minutes, to be honest. (Took me nearly an hour - but I was distracted a little bit watching soccer in tv.)


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
Bigchillghost, Reverse Engineering a Game Model: http://forum.xentax.com/viewtopic.php?f=29&t=17889
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Wed Jun 22, 2016 12:22 am 
Offline
n00b

Joined: Mon Jun 20, 2016 9:17 pm
Posts: 14
Has thanked: 0 time
Have thanks: 1 time
shakotay2 wrote:
I myself didn't get it within the magic 15 minutes, to be honest. (Took me nearly an hour - but I was distracted a little bit watching soccer in tv.)

Mmm well, finally the error its mine haha
Can you tell me some tips for work on this files? only for this game.
I know this is very difficult, but I really interesting in editing this game.. Can you help me?
Thanks for you reply and thanks for your work!!!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 388 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11, 12 ... 26  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group