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.
Jamal al dambali
ultra-n00b
Posts: 9
Joined: Sun Apr 16, 2017 5:00 pm
Has thanked: 10 times

Re: Extracting simple models

Post by Jamal al dambali »

shakotay2 wrote:you could easily find out this for yourself.
look for point clouds, then look for face indices, it's DWORD here:
01385037-dat.jpg
I'm very thankful to you.

And how did you find the point clouds?

And one more question, does this file have a submesh? Since there are several "alphabetic tables" in it and three identical hex codes: 08 B6 FD CF 05 2E 77 34 CD E9 20 B7 F8 CB 62 F9

Sorry for my English.
cmr14
n00b
Posts: 14
Joined: Mon Jun 20, 2016 9:17 pm
Been thanked: 1 time

Re: Extracting simple models

Post by cmr14 »

Hi again!
Im here for models of MotoGP 17 the game :P
The models of previous game of milestone (MotoGP16 and Ride2) are perfectly extracted but I have problems with the new files of the new game..
I can do some parts of the extraction model but when I push the buttons "mesh" and "uv's" something are wrong.. I cant understand :(
Can you help me? here is the file

https://www.mediafire.com/?acrmjihuu2snf8e

Thanks!
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 LOD of first submesh :D
HELMET_036_BIN.png
You do not have the required permissions to view the files attached to this post.
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 »

Jamal al dambali wrote:And how did you find the point clouds?
it's a combination of trial and error and experience
And one more question, does this file have a submesh?
yes; I usually search for one submesh only and leave the rest of the work to the customers :D
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 »

AceWell wrote:first LOD of first submesh :D
HELMET_036_BIN.png
Oh thanks!! My problem was start addr of vertices :( the rest of values was the same haha
You help me a lot, thanks man!

Image
eatrawmeat391
beginner
Posts: 20
Joined: Tue Dec 06, 2016 10:51 am
Has thanked: 8 times
Been thanked: 9 times

Re: Extracting simple models

Post by eatrawmeat391 »

Hi Shakotay2,
Can you tell me how you draw uv in your program?
I connected every 2d coordinates to create lines but it didn't work.

This is my code

Code: Select all

from Tkinter import *
import scanf
master = Tk()

w = Canvas(master, width=200, height=100)
w.pack()

uv = []

input = open("test_uv.txt")
scale = 100.0
for line in input:
    x, y = scanf.sscanf(line, "%f %f\n")
    uv.append(x*scale)
    uv.append(y*scale)

input.close()

w.create_line(uv) # x1, y1, x2, y2, ... , xn, yn

mainloop()
Image

Here is the right UV:

Image

Attached right there is an example uv.
You do not have the required permissions to view the files attached to this post.
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 »

Hi,
I don't draw lines. hex2obj just sends the test_uv.obj to the mesh_viewer.exe which displays the uv map.

uv data in test_uv.obj as faked vertices:
v tu1 tv1 0
v tu2 tv2 0
v tu3 tv3 0
f 1 2 3

The important thing is the face indices which you don't take care of when just connecting one uv point to the other.
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?"
onelove1210
advanced
Posts: 75
Joined: Thu Apr 07, 2011 12:06 pm
Has thanked: 8 times
Been thanked: 4 times

Re: Extracting simple models

Post by onelove1210 »

Can you guys help me with this file?
Link: https://drive.google.com/open?id=0BwxW3 ... jI2d1ZaSWM

I still can't find out where is the uv address :(
You do not have the required permissions to view the files attached to this post.
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 »

First of all: I wouldn't like to have automatic weapons in this helper thread as "samples". Please open another thread for such, thx. :)

Secondly I'd care for a decent point cloud before searching for the uv (vertices start address 0x165 is wrong).
Face indices are DWORDs (DW).

H2O file:

0x1BBC1 9918
Vb1
28 99
0x9309 2713
140000
0x9301 28

In this sample the vertices or following the uv data. Since you can't use a negative uv pos so far you have to circumvent this by defining an uv block with a startadress of 0x9301 and the same FVF size, 28 (a little bit tricky but works).
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?"
onelove1210
advanced
Posts: 75
Joined: Thu Apr 07, 2011 12:06 pm
Has thanked: 8 times
Been thanked: 4 times

Re: Extracting simple models

Post by onelove1210 »

sorry, one more question :D how to export to obj with uv? I've imported to ms3d and there is no uv, although I tried to import "testUV.obj" as import obj(UV)
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 »

use File/SaveAs mesh to export to obj with uvs
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?"
Lazov
veteran
Posts: 84
Joined: Sat Oct 08, 2016 11:56 am
Has thanked: 17 times
Been thanked: 55 times

Re: Extracting simple models

Post by Lazov »

Please give me a model with submeshes.
deepshit
advanced
Posts: 76
Joined: Tue Jan 31, 2012 9:43 pm
Has thanked: 41 times
Been thanked: 30 times

Re: Extracting simple models

Post by deepshit »

Hi
Can you help me with this model.
I have found verts offset and normals offset but I can't find face indices.
verts off = 0x80 vertsCount = 594
By the way where is the exe with fake button?
You do not have the required permissions to view the files attached to this post.
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 »

deepshit wrote:Hi
Can you help me with this model.
Hi, point cloud with 1191 vertices is o.k. but faked indices give a rather ugly result.
By the way where is the exe with fake button?
It's not a "fake button" :D ,
it's a button for autogenerated ("faked") face indices:
viewtopic.php?f=29&t=10894&p=119417&hil ... ed#p119417

(well, I didn't name it "auto" since that would pretend to calculate proper face indices.
But "Fake" does not, it just creates f 1 2 3, f 4 5 6, and so on (or strips) and in most cases it looks bad, because it's "faked" face indices.)

edit: formulae for triangle strips:
viewtopic.php?f=16&t=12804&p=116367#p116367
Last edited by shakotay2 on Sun Sep 17, 2017 5:25 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?"
deepshit
advanced
Posts: 76
Joined: Tue Jan 31, 2012 9:43 pm
Has thanked: 41 times
Been thanked: 30 times

Re: Extracting simple models

Post by deepshit »

It's not a "fake button" :D ,
:lol:

What algorithm is used for autogenerating faces?

This is from ps2 game and I have read ps2 games calculate faces somehow.
Can you give me hint how to do that?
This model's faceCount is 470 but I don't know how it is calculated.
Post Reply