Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Analyzing and Extracting a Game Model

Read or post any tutorial related to file format analysis for modding purposes.
User avatar
luckraken
ultra-n00b
Posts: 2
Joined: Tue Sep 04, 2018 9:45 pm

Re: Analyzing and Extracting a Game Model

Post by luckraken »

Hello, i followed your guide until you start talking about the UVs, then i wanted to try to extract a model up to that point on my own, and i managed to find the vertexs right, but now i can't find in any way the start of the faces.
So the model uses litE has a buffer of 40 (yours in the guide is 48 i dont know if buffer is the right word to indicate it) and maybe it's dWord but im not sure because for the vertexs in both ways seemed to work fine.
I looked to find a point with 00 00 00 01 00 02 but nothing, then i tought that maybe because its litE that would be 00 00 01 00 02 00 but nothing still.. so i tried to search for 00 00 00 00 00 00 00 01 00 00 00 02

i don't know what else to try, what should i look for in this case?

Thank you very much in advance :keke: :keke:
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: Analyzing and Extracting a Game Model

Post by chrrox »

for looking for faces what game and platform its for are good information to know to help you.
User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 1026
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 31 times
Been thanked: 1212 times

Re: Analyzing and Extracting a Game Model

Post by Bigchillghost »

luckraken wrote:i dont know if buffer is the right word to indicate it
It's OK to use that word. :)
luckraken wrote:maybe it's dWord but im not sure because for the vertexs in both ways seemed to work fine.
I guess you're reffering to the "Word"/"dWord" button of hex2obj? That's for face indices data types and does not affect how the vertex elements are read.
luckraken wrote: ...but now i can't find in any way the start of the faces...
I looked to find a point with 00 00 00 01 00 02 but nothing, then i tought that maybe because its litE that would be 00 00 01 00 02 00 but nothing still.. so i tried to search for 00 00 00 00 00 00 00 01 00 00 00 02

i don't know what else to try, what should i look for in this case?
Searching for the "0 1 2" pattern is not what I usually do when looking for indices unless you're dealing with a really large file and you can't locate the face buffer with scrolling down till the end of file. But well you did and nothing found. The best solution is the one I described there:
Bigchillghost wrote:...looking for the face buffer. As face indices are stored as an array of intergers, they usually look like a regular character table in the text view instead of some random bytes.
For a more visualized description the face buffer looks like a disordered "alphabet".
About the endianness, you can get a clue there:
Bigchillghost wrote: Usually Windows, PS4 and Android file systems use little endianness, while console file systems, like Wii, PS3 and Xbox 360, are using big endianness.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)
User avatar
luckraken
ultra-n00b
Posts: 2
Joined: Tue Sep 04, 2018 9:45 pm

Re: Analyzing and Extracting a Game Model

Post by luckraken »

chrrox wrote:for looking for faces what game and platform its for are good information to know to help you.
The game it's dark souls 2 , the model has been gave to me by a friend to try, i wrote that uses litE (little endianness) because it's for windows.
Bigchillghost wrote:I guess you're reffering to the "Word"/"dWord" button of hex2obj? That's for face indices data types and does not affect how the vertex elements are read.
i see, learned something else new :)
Bigchillghost wrote:For a more visualized description the face buffer looks like a disordered "alphabet".
i forgot to tell that i searched for that, but i just found only very small buffers unlikely for the tutorial model you used
and so i'm having an hard time finding the right one, also because i cant look for 0,1,2,ecc i dont really know how to find the right start of the indexes
User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 1026
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 31 times
Been thanked: 1212 times

Re: Analyzing and Extracting a Game Model

Post by Bigchillghost »

luckraken wrote:but i just found only very small buffers unlikely for the tutorial model you used
Usually I just ignore any meshes with less than 4 pages of indices in an hex editor. Try finding a larger face buffer and return to the first one later if necessary.
luckraken wrote:also because i cant look for 0,1,2,ecc i dont really know how to find the right start of the indexes
Indentifying the start of the first index is based on recognizing what data belongs to the face indices array, typically, the 0, 1, 2 pattern. You must read and check the values upwards the "alphabet" with your eyes whether it meets with the regularity of the face array. Sometimes you won't make it with a first test, so basically it's a matter of trial and error.

There's an easier way to do it if the face buffer are triangle list instead of trixstrips. First step is to find a correct start of one face in the "alphabet" part, which can be done in no more than 3 trials. Then set the number of columns of the hex editor to 6 without changing the position of the found start of the face. Finally find the start of the first face forwards at the same column. You can apply the same process downwards to find the end of the buffer.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)
User avatar
hiuuz
ultra-n00b
Posts: 2
Joined: Tue Dec 12, 2017 10:21 am
Has thanked: 5 times

Re: Analyzing and Extracting a Game Model

Post by hiuuz »

Hi!

I'm have some knowledge about 3d modeling and the structure of a 3d model, it's not hard to understand how the vertex, face and other data stored in the files. Based on your tutorial I can repeat everything and get the mesh from the example file. But I would like to explore The Witcher 2 mesh files and I have difficulties to read the hexadecimal code. I mean I can see the changes in the text wiev and even in hex wiev but can't interpret the meaning of the data, I can't tell what I see is the face buffer or verex data or something else. Can I find somewhere a tutorial about how the hexadecimal code should be read in 3D models?
User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 1026
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 31 times
Been thanked: 1212 times

Re: Analyzing and Extracting a Game Model

Post by Bigchillghost »

hiuuz wrote: Fri Dec 20, 2019 2:42 pmCan I find somewhere a tutorial about how the hexadecimal code should be read in 3D models?
You didn't read the Common Data Types section of Part I. Background Knowledge before Starting?
There's a link under that section where you'll find the explaination of the terms and how they work.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)
User avatar
hiuuz
ultra-n00b
Posts: 2
Joined: Tue Dec 12, 2017 10:21 am
Has thanked: 5 times

Re: Analyzing and Extracting a Game Model

Post by hiuuz »

Bigchillghost wrote: Fri Dec 20, 2019 3:56 pm You didn't read the Common Data Types section of Part I. Background Knowledge before Starting?
Oh man, until now I only thought I knowing the stuff! In the last two days I read through that guide and others in here again and I start realizing that it's not enough reading through, I must UNDERSTAND what is written! Eg. what a 32bit floating number and how it looks in hex. Now I can see and find the blocked vertices table :) Now I'm analizing the part's of a single vertex. That is the next big step.

Thank you enlighten me, that laziness was what blured my vision :)
Infernum31
ultra-n00b
Posts: 3
Joined: Fri Sep 01, 2023 9:37 am

Re: Analyzing and Extracting a Game Model

Post by Infernum31 »

Hi,is it possible to get the skel file from the embb file of the middle earth shadow of mordor game through hex?
Post Reply