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.
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
Extracting simple models
- shakotay2
- 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
Last edited by shakotay2 on Sun May 01, 2016 9:09 pm, edited 1 time in total.
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?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
-
- MEGAVETERAN
- Posts: 2647
- Joined: Tue Mar 24, 2015 8:12 pm
- Has thanked: 65 times
- Been thanked: 2870 times
Re: Extracting simple models
Thanks for the reply. How could I not think about it?shakotay2 wrote:there's an ugly workaround using the "mixed" instead of "block" mode
This workaround is not that ugly actually.
- 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
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.
so these are the numbers for anyone else trying to extract meshes form Mirror's Edge Catalyst Beta
so these are the numbers for anyone else trying to extract meshes form Mirror's Edge Catalyst Beta
- shakotay2
- 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
it's a matter of patterns in most cases - here 3C 02 03 01OriginOfWaves wrote:could you explain how you got the FVF size?
for example, which is repeated after 56 bytes
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?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
-
- MEGAVETERAN
- Posts: 2647
- Joined: Tue Mar 24, 2015 8:12 pm
- Has thanked: 65 times
- Been thanked: 2870 times
Re: Extracting simple models
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.OriginOfWaves wrote:could you explain how you got the FVF size?
- shakotay2
- 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
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".daemon1 wrote:Just divide the full size of vertex/UV block by that, and you get FVF size.
How should anyone know that this is the "full size"?
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?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
-
- MEGAVETERAN
- Posts: 2647
- Joined: Tue Mar 24, 2015 8:12 pm
- Has thanked: 65 times
- Been thanked: 2870 times
Re: Extracting simple models
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.shakotay2 wrote:yep, but in this special case that won't help.
- 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
well aren't i lucky to run into files that are special and bend the rulesshakotay2 wrote: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".daemon1 wrote:Just divide the full size of vertex/UV block by that, and you get FVF size.
How should anyone know that this is the "full size"?
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
- shakotay2
- 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
but it's not in the H2O in your zip, is it?OriginOfWaves wrote:shakotay2 wrote:, i can only seem to find the UVs for the second (LOD1) lower resolution mesh.
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)
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 )OriginOfWaves wrote:well aren't i lucky to run into files that are special and bend the rules
You do not have the required permissions to view the files attached to this post.
Last edited by shakotay2 on Wed May 04, 2016 7:03 pm, edited 1 time in total.
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?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
- 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
thanks for the help again man.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)
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?
- shakotay2
- 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
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.
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.
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?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
- shakotay2
- 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
well, 2000 downloads of hex2obj so far (and maybe 5 regular users? )
Time for a new feature: autogenerated face indices. You might try it out with the
policeman model from this thread: http://forum.xentax.com/viewtopic.php?f ... es#p114317
-------------------------------------------------------------------------------------------------------------
btw: Secure Age APEX says the zipped exe here has a virus - I have no idea, why.
So if you don't trust it don't use it - as simple as this.
------------------------------------------------------------------------------------------------------------- (exe only - dlls see zip file in link below)
Latest version to be found here:
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 . . .
Attention: maximum face index may not exceed vertex count!
Time for a new feature: autogenerated face indices. You might try it out with the
policeman model from this thread: http://forum.xentax.com/viewtopic.php?f ... es#p114317
-------------------------------------------------------------------------------------------------------------
btw: Secure Age APEX says the zipped exe here has a virus - I have no idea, why.
So if you don't trust it don't use it - as simple as this.
------------------------------------------------------------------------------------------------------------- (exe only - dlls see zip file in link below)
Latest version to be found here:
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 . . .
Attention: maximum face index may not exceed vertex count!
You do not have the required permissions to view the files attached to this post.
Last edited by shakotay2 on Sat Nov 06, 2021 11:03 pm, edited 3 times in total.
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?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Re: Extracting simple models
Hi master, I have a problem with a file of Valentino Rossi the game (2016) of milestone.shakotay2 wrote:well, 2000 downloads of hex2obj so far (and maybe 5 regular users? )
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!
- shakotay2
- 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
Just to keep you informed, “There is no Master but the Master,”cmr14 wrote:Hi master,
and in this forum he's called MrAdults.
the vertices are half floats - those are not so easy to identify for beginners.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..
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.)
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?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Re: Extracting simple models
Mmm well, finally the error its mine hahashakotay2 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.)
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!!!