Page 1 of 2

The last guardian (PS4) .Data file help?

Posted: Tue Feb 25, 2020 11:11 am
by Reindeercoat
Hello! So i need help with reverse engineering models for the last Guardian (PS4) as I am frankly, a bit stuck,

the .bod file is in fact, used as an interpreter for the .data files, which are the ones that contain model data, the .elems contains face (and possibly skeleton, i'm not really sure) data, verts file contains vertex data, uv file contains uv data. Any help would greatly be appreated, thank you!

Re: The last guardian (PS4) .Data file help?

Posted: Tue Feb 25, 2020 5:47 pm
by shakotay2
Reindeercoat wrote: Tue Feb 25, 2020 11:11 amthe .bod file is in fact, used as an interpreter for the .data files, which are the ones that contain model data
Didn't have the time to look into the .bod file, just merged the .data files and used hex2obj on it:
.
birda.jpg
the .elems contains face (and possibly skeleton, i'm not really sure) data
I don't see other than face indices there. There's a skeleton.bod file which should contain bones (joints, jt_) and possibly the matrices.

Re: The last guardian (PS4) .Data file help?

Posted: Wed Feb 26, 2020 11:09 am
by Reindeercoat
Thanks m8! You're a life saver! While i have managed to successfully recreate your results by merging the .dat files and using hex2obj for the bird, i seem to be having a bit of trouble with the more advanced models, such as trico (forgive me, i am still a really big noob to this as tbh this is my first time doing something like this) i'll keep you updated if i have any sucess with other models, thank you!

Re: The last guardian (PS4) .Data file help?

Posted: Wed Feb 26, 2020 4:04 pm
by Reindeercoat
Update: managed to get most of the mesh from trico!
1582728950800_image.png
I say most since for some reason while the point cloud did show data for the tail and eyes, i had to lower the face count, otherwise a lot of excess mesh happens (which is possibly submesh data used for the tail, eyes and horns, although i am not entirely sure how to fix that, forgive me for my ignorance as i am still new to this)

I'll submit the combined mesh data if you'd like!

Re: The last guardian (PS4) .Data file help?

Posted: Wed Feb 26, 2020 4:08 pm
by Reindeercoat
Here's the point cloud, for some reason xentax won't let me post more than 1 image per reply
6uiop.PNG

Re: The last guardian (PS4) .Data file help?

Posted: Wed Feb 26, 2020 4:49 pm
by Reindeercoat
Wait, one more question, how exactly would one go about to extract skeleton data? Thank you!

Re: The last guardian (PS4) .Data file help?

Posted: Wed Feb 26, 2020 5:20 pm
by shakotay2
Reindeercoat wrote: Wed Feb 26, 2020 4:04 pmI'll submit the combined mesh data if you'd like!
Feel free to do so.
Reindeercoat wrote: Wed Feb 26, 2020 4:49 pmWait, one more question, how exactly would one go about to extract skeleton data? Thank you!
That's not a 15 minutes job, usually: find the bone names, find/create the hierarchy (usually bone ids in a table), find the matrices.

You might read here ("Approaches of Parsing Bone Representations"): viewtopic.php?f=29&t=19429

and find out which "bone format" to be found in birda_skeleton.bod for example.

And remember: (quote) "Recognizing these forms is not a big deal, but parsing them correctly is." :D

Re: The last guardian (PS4) .Data file help?

Posted: Wed Feb 26, 2020 5:41 pm
by Reindeercoat
Thank you so much m8!

Here's the merged trico data if you wanna take a look!

https://filebin.net/864hxwnde8i7qfr5

(Apologies for the filebin link, apperantly it's too large to be added as an attachment)

Re: The last guardian (PS4) .Data file help?

Posted: Wed Feb 26, 2020 6:10 pm
by shakotay2
Thanks! How to find the start of submeshes:

I used this H2O file:

0x1B7326 84916
Vb1
32 24
0x10 14094
020000
0x0 255

(which will result in showing the head and many worn faces)

Looking into the test.obj file reveals these lines as a possible border between submeshes:

Code: Select all

f 13999 14001 14041 
f 14002 14000 13999 
f 172 173 174 
f 1 2 3 
f 85 2 1 
f 85 169 2 
f 32 85 1 
You reduce the face indices count to 62637 and the first submesh seems to look nice.
That's how you've done it, didn't you?

(There might be some magic table which holds the counts, dunno so far.)
I'd need the .bod file to check this.

You can add 14094x32 (dec.) to 0x10 to get the vertex start address of the next submesh (start of FIs also to be modified, count is just for test):
.
wings.png

Re: The last guardian (PS4) .Data file help?

Posted: Wed Feb 26, 2020 6:27 pm
by Reindeercoat
Thank you so much, man, i seriously cannot thank you enough!
"You reduce the face indices count to 62637 and the first submesh seems to look nice.
That's how you've done it, didn't you?"
Yup! Tbh it seems like reducing the indice number did help on that part thankfully

Here's the bod files! (i also theough in the skeleton.bod just in case!)

Re: The last guardian (PS4) .Data file help?

Posted: Wed Feb 26, 2020 6:41 pm
by shakotay2
This is where you find the vertex counts (and maybe more) in the .bod file:
.
condora-bod-counts.png
FD 23 00 00 is a vertex count (2nd submesh) in little endian notation, so decimal: 9213

have fun

btw: the 2nd E0 37 might just be a reminder (to be ignored when scanning for vertex counts?)
red rectangles: counts of face indices

2nd submesh:

0x1D5C86 45786
Vb1
32 24
0x6E1D0 9213
020000
0x0 255

Re: The last guardian (PS4) .Data file help?

Posted: Thu Feb 27, 2020 3:16 pm
by Reindeercoat
Ooh!! Honetsly thank you so so much! I have managed to get almost all the mesh i need execpt for the eyes, whiskers and tail, (it turns out the horns are in seperate files but right now they arent my main priotity, so i'll extract them later) i'll keep you updated if i suceed, thank you!

Re: The last guardian (PS4) .Data file help?

Posted: Thu Feb 27, 2020 3:21 pm
by Reindeercoat
Also very small update; the textures the game uses are in the gnf format, so they were very easy to extract with noesis; so i decided to enbed most of trico's textures on the model i got so far!

(note, the game uses a particle system to generate the feathers, so that's why the poor thing's bald until i manage to find a way to recreate said system)

Re: The last guardian (PS4) .Data file help?

Posted: Thu Feb 27, 2020 6:23 pm
by Reindeercoat
Update: I have managed to find what seems to be the vertice start address for the whiskers, eyes, and tail! (along with a a few exess leg verticies), the address apperantly being 9f1d0 and having at least 10000 vertices or so, not really sure tbh

But i am having a bit of trouble finding the faces for them tbh.

Re: The last guardian (PS4) .Data file help?

Posted: Sat Feb 29, 2020 4:54 pm
by Reindeercoat
Update: so far no good, while i have been able to find the vertices for the eyes, whiskers and tail, everytime i try to calculate the faces for them, the model ends up almost looking like it exploded, with the faces going everywhere, (most likeley because i probably calculated the faces wrong one way or another, please forgive me as i am still very inexperinced in this) so i need some help figuring them out, thank you!