READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

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 » Tue Sep 04, 2018 10:30 pm

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:

User avatar
chrrox
Moderator
Posts: 2541
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1269 times

Re: Analyzing and Extracting a Game Model

Post by chrrox » Wed Sep 05, 2018 1:19 am

for looking for faces what game and platform its for are good information to know to help you.

User avatar
Bigchillghost
ultra-veteran
ultra-veteran
Posts: 490
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 22 times
Been thanked: 396 times

Re: Analyzing and Extracting a Game Model

Post by Bigchillghost » Wed Sep 05, 2018 3:04 am

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 » Wed Sep 05, 2018 8:03 am

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
ultra-veteran
ultra-veteran
Posts: 490
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 22 times
Been thanked: 396 times

Re: Analyzing and Extracting a Game Model

Post by Bigchillghost » Wed Sep 05, 2018 1:02 pm

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.:)

Post Reply