XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Sun Aug 19, 2018 10:13 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 376 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 26  Next
Author Message
 Post subject: Re: Extracting simple models
PostPosted: Thu Aug 21, 2014 1:50 pm 
Offline
veteran

Joined: Wed Jun 04, 2014 7:48 pm
Posts: 107
Location: Netherlands
Has thanked: 20 times
Have thanks: 31 times
shakotay2 wrote:
just combine the pieces (23, 24 or 13 vertices for example):

Sadly I'm not interested in these models so I won't waste more time on this.

Thanks for helping me out so far, I appreciate it
Too bad you're not interested in the models :/
Where does the actual vertex data start in the FF 40 01 65 blocks?
Whenever I import an obj ripped through hex2obj I get a vertex coordinate too big error.


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Thu Aug 21, 2014 2:35 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2353
Location: Nexus, searching for Jim Kirk
Has thanked: 547 times
Have thanks: 1226 times
TGE wrote:
Where does the actual vertex data start in the FF 40 01 65 blocks?
with an offset of 12 bytes.
Quote:
Whenever I import an obj ripped through hex2obj I get a vertex coordinate too big error.
have a look into the created test.obj and delete such line
v 2.66814e+024 -0.633696 -0.604305
and all following "vertices"

I made two maxscripts to import the faceshape and the hair mesh.

You might try to adapt them for other submeshes.
View my thread in the models forum.


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 Thu Aug 21, 2014 5:25 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Thu Aug 21, 2014 3:53 pm 
Offline
ultra-n00b

Joined: Wed Nov 09, 2011 10:05 am
Posts: 3
Has thanked: 0 time
Have thanks: 0 time
i still cant get it, i cant understand the tutorial
how about this model https://drive.google.com/file/d/0B1a-gFgVytjBVk9BOXZMSzF5d0U/edit?usp=sharing
would you like to explain it to me?
how do i get the face indices in this file?


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Thu Aug 21, 2014 5:24 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2353
Location: Nexus, searching for Jim Kirk
Has thanked: 547 times
Have thanks: 1226 times
aaiki14 wrote:
i still cant get it, i cant understand the tutorial
it's not a matter of understanding the tutorial for simple models. Sometimes the faceindices are harder to find.

Quote:
how about this model https://drive.google.com/file/d/0B1a-gFgVytjBVk9BOXZMSzF5d0U/edit?usp=sharing
would you like to explain it to me?
how do i get the face indices in this file?

From a quick view this could be a starting point for face indices: 0xF6C4, but not sure.
Also hex2obj can't handle them, you'd need a script.

Did you try to get a point cloud?


This model format exceeds my 15 min per model "border line".
It's a rather big file. Don't you have a smaller one?


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 Sep 02, 2014 2:46 pm 
Offline
ultra-n00b

Joined: Tue Sep 02, 2014 2:40 pm
Posts: 3
Has thanked: 0 time
Have thanks: 0 time
Nice job man


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Wed Oct 01, 2014 8:10 am 
Offline
ultra-n00b

Joined: Wed Aug 27, 2014 11:49 am
Posts: 3
Has thanked: 1 time
Have thanks: 0 time
Hi, pls i would like to knw what format it surports

_________________
I'm a idiot, but please help me XD


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Mon Dec 01, 2014 3:39 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2353
Location: Nexus, searching for Jim Kirk
Has thanked: 547 times
Have thanks: 1226 times
hex2obj doesn't have a "list of supported formats".
It's a helper tool to display simple models after you analyzed the format you're interested in.

"Analysing" means you'll have to find out the start addresses of the face indices and the vertices.
(For more information: read the tutorial.)


thread list:

_________________
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 Dec 07, 2014 9:20 am 
Offline
n00b

Joined: Wed Nov 13, 2013 3:03 am
Posts: 19
Has thanked: 43 times
Have thanks: 3 times
Hi,shakotay
I am confused about "UV pos" in hex2obj
What's that?

http://forum.xentax.com/viewtopic.php?f=16&t=10960
For this thread
0x29C is vertices start address,vertex block is 40
so 0x29C~0x2C4 is a vertex block.
In these 40 bytes,first 12 bytes are verices coordinate
Others,I just can't figure it out.

What will be included in a vertex block?
Vertex coordinate
Vertex normal
UV
That's all?
Even thought they are all float,and UV have 3 coordinate,they are only 4*9=36 bytes
Why this vertex size is 40?
Is there anything else inside vertex block?


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Sun Dec 07, 2014 7:48 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2353
Location: Nexus, searching for Jim Kirk
Has thanked: 547 times
Have thanks: 1226 times
Hi,
"UV pos" is the starting position of the uv data in the vertex (stride) block.
The bytes 0 to 11 are used by 3 floats (first vertex),
the bytes 12 to 15 are two half floats for tx, ty, the uv data.



You can expect to find a second texture set in the vertex block.
As you can see there's another 3E 16 37 66 following.
Also weights/boneIDs might be found in a vertex block (did not check this here).

Hex2obj will be kept simpel (so I never handle normals, for example, which can be easily autogenerated in most 3D tools)
When analyzing I restrict myself to the data I'm interested in.
You'll never find me doing a 100% reversing of a format.
So you'll need to find out for yourself what the unhandled 20 bytes are good for. :D

zdsmdbh wrote:
Why this vertex size is 40?
depends on the decision of the developers.
What data they chose to be contained and the formats they use.


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: Mon Dec 08, 2014 2:04 am 
Offline
n00b

Joined: Wed Nov 13, 2013 3:03 am
Posts: 19
Has thanked: 43 times
Have thanks: 3 times
shakotay2 wrote:
Hi,
"UV pos" is the starting position of the uv data in the vertex (stride) block.

Thanks!That really help me.

How did you judge vertex block size?

0x2A8~0x2AB: 3E 16 37 4A 0x2AC~0x2AF: 3E 16 37 4A
0x2D0~0x2D3: 3E 12 37 65 0x2D4~0x2D7: 3E 12 37 65
0x2F8~0x2FB: 3E 16 37 66 0x2FC~0x2FF: 3E 16 37 66

Repeat every 40 bytes
So you judge vertex block size on that or you have others method?


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Mon Dec 08, 2014 11:23 am 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2353
Location: Nexus, searching for Jim Kirk
Has thanked: 547 times
Have thanks: 1226 times
yep, on repeating patterns or using the knowledge that it's generally a multiple of 4 (in some rare cases it's multiple of 2, iirc 18 for example)

(Some games which I don't remember atm use model files containing a vertexbuffer "type".)

_________________
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 Dec 08, 2014 12:22 pm 
Offline
n00b

Joined: Wed Nov 13, 2013 3:03 am
Posts: 19
Has thanked: 43 times
Have thanks: 3 times
Will you realease a tutorial about how to analysis bones&weights? :D
I can write maxscript to import mesh,but I don't know how bones&weights stored in files.No mention import them. :cry:


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Mon Dec 08, 2014 1:32 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2353
Location: Nexus, searching for Jim Kirk
Has thanked: 547 times
Have thanks: 1226 times
zdsmdbh wrote:
Will you realease a tutorial about how to analysis bones&weights? :D
I don't feel experienced enough with this, so 'no'.

But I'm planning some kind of crash course on "How to build a skeleton from hex data".
It's primary use is to spare me time, as always.

(Could end up in some other "helper tool" some day, but that's a little bit unsure
because it's hard to "keep things simple" here.)

In the meantime you could look up the max scripts of chrrox, TaylorMouse or zaramot for example.
Search for 'weight'.
In general it goes like this (pseudo code):

for j = 1 to vertex_count do (
...
read bone1_id
read bone2_id
read bone3_id
read bone4_id
read weight1
read weight2
read weight3
read weight4
)

Might also be
read bone1_id
read weight1
...

Very easy, isn't it? :)

But other than with hex2obj where you get an immediate feedback
whether your entered parameters are ok or not
when pressing the mesh button
I don't have any idea how to accomplish this for skeletons.

I was checking the source of a model viewer with a "show skeleton" feature
but I lost too much time in understanding (10% :D )/changing it.

_________________
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 Mar 29, 2015 9:40 am 
Offline
n00b

Joined: Wed Nov 13, 2013 3:03 am
Posts: 19
Has thanked: 43 times
Have thanks: 3 times
Hi,shakotay
I have been look up some maxscript with bone import
but I have to say I am really confused because there is no comments.

Here's a X format file(text version)
I guess these data are used to create bone.
But I just don't understand how to do it via maxscript.

Quote:
Frame root_ground {


FrameTransformMatrix {
-0.000000,1.000000,0.000000,0.000000,-0.000000,-0.000000,1.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000;;
}

Frame root_hips {


FrameTransformMatrix {
-0.000000,-0.000000,1.000000,0.000000,-0.000000,1.000000,0.000000,0.000000,-1.000000,0.000000,-0.000000,0.000000,49.748032,-0.000008,0.000006,1.000000;;
}

Frame pelvis {


FrameTransformMatrix {
-0.051403,-0.223888,0.973259,0.000000,-0.011808,0.974615,0.223577,0.000000,-0.998608,0.000000,-0.052742,0.000000,0.000000,0.000000,0.000000,1.000000;;
}

Frame leg_left_thigh {


FrameTransformMatrix {
0.973258,0.223577,-0.052742,0.000000,-0.223888,0.974615,0.000000,0.000000,0.051403,0.011808,0.998608,0.000000,7.420700,0.832138,-4.649714,1.000000;;
}


I have been write a maxscript to import mesh
Could you edit it to support bone and weights?
Since there is no facing-newbie bone import tutorial,and these files are text files,there are much easier than binary files
I think this is good for me and others newbies to start import bone.
Thanks! :D
http://www.mediafire.com/download/9uuq0wda5u8req1/X_format.rar
Code:
fname = getOpenFileName \
caption:"Select a X format file" \
types:"DirectX(.x)|*.x" \
historyCategory:"DirectXObjectPresets"
f = openfile fname

Vert_array = #()
Face_array = #()
Normal_array = #()
UV_array = #()

RDL= readline f

while (RDL != " TextureFilename {") do (RDL = readline f)
texture_name = readvalue f

while (RDL != " Mesh  {") do (RDL = readline f)
mesh_count = readvalue f
for i=1 to mesh_count do
(
   x = readvalue f
   y = readvalue f
   z = readvalue f
   append Vert_array [x,y,z]
   readline f
)

face_count = readvalue f
for i=1 to face_count do
(
   readvalue f
   p1 = readvalue f
   p2 = readvalue f
   p3 = readvalue f
   append Face_array [p1+1,p2+1,p3+1]
   readline f
)

while (RDL != "  MeshNormals  {") do (RDL = readline f)
normal_count = readvalue f
for i=1 to normal_count do
(
   n1 = readvalue f
   n2 = readvalue f
   n3 = readvalue f
   append Normal_array [n1,n2,n3]
   readline f
)

while (RDL != "  MeshTextureCoords  {") do (RDL = readline f)
UV_count = readvalue f
for i=1 to UV_count do
(
   x = readvalue f
   y = readvalue f
   append UV_array [x,1-y,0]
   readline f
)

msh = mesh vertices:Vert_array faces:Face_array
msh.numTVerts = UV_array.count
buildTVFaces msh
for j = 1 to UV_array.count   do setTVert  msh j UV_array[j]
for j = 1 to face_array.count do setTVFace msh j face_array[j]

close f

texture_path = sysInfo.currentdir
if texture_path[texture_path.count] != "\\" do texture_path += "\\"
texture_path += texture_name

new_mat = StandardMaterial()
new_mat.diffuseMap = Bitmaptex()
new_mat.diffuseMap.filename = texture_path
new_mat.showInViewport = True
msh.Material = new_mat


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Sun Mar 29, 2015 4:32 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2353
Location: Nexus, searching for Jim Kirk
Has thanked: 547 times
Have thanks: 1226 times
zdsmdbh wrote:
Hi,shakotay
I have been look up some maxscript with bone import
but I have to say I am really confused because there is no comments.
Hi zdsmdbh,
did you try out "Import Diablo III App.ms" from TaylorMouse to import Adria for example?

Then you could read some MaxScript online help to understand functions like
BoneSys.CreateBone and skinOps.ReplaceVertexWeights for example.


Quote:
Here's a X format file(text version)
I guess these data are used to create bone.
But I just don't understand how to do it via maxscript.


Well, that's a boring task to write some kind of text parser. (I remember dainazinas using his frostbite maxscript to read textfiles.)
Quote:
Frame root_hips {


FrameTransformMatrix {
-0.000000,-0.000000,1.000000,0.000000,-0.000000,1.000000,0.000000,0.000000,-1.000000,0.000000,-0.000000,0.000000,49.748032,-0.000008,0.000006,1.000000;;
}
That should be a 4x4 rotation matrix and the position (x,y,z, w=1.0).

Quote:
I have been write a maxscript to import mesh
Could you edit it to support bone and weights?
Nice script! :) Well, reading the boneNames and SkinWeights from a textfile should not be too hard. I'm sure you can do that by yourself but me? To be honest, I left that kind of workflow long ago.

Getting the bones' hierarchy is a little bit harder - I would suggest to treat the skeleton seperately.

I imported the GuanYinPing.x to assimp then exported as dae and imported to blender.
Sadly I couldn't change to pose mode though the hierarchy was shown correctly.
Something went wrong and I couldn't export the skeleton to smd.



(hmm, I think I will export an SMD (skeleton only) to .x then load it with assimp and export as dae again to see what's going wrong there...)


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  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 376 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 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