The rules have been updated, read them now: Rules!

Midnight Club LA (PS3)

Post questions about game models here, or help out others!
Post Reply
Sharppy
advanced
Posts: 50
Joined: Thu Jun 07, 2018 8:09 am
Has thanked: 1 time
Been thanked: 7 times

Midnight Club LA (PS3)

Post by Sharppy » Thu Apr 08, 2021 8:15 pm

I was able to decompress the files using many tools. The final result is a nameless file that holds data. I was able to find some patterns.
Image
Hopefully im not showing wrong screen shots but im pretty sure this is a buffer of some kind. The vertices start on the blue ususally....
Image
Although I did save this one where they seem to start directly after the faces but i think this is wrong. I took many screenshots. Sorry if this isn't right.
Image
This is what the shell looks like which seems to be correct.
Image
Uv's also come out correct. So this seems to be right.
Image
Until I run into an issue like this. These faces are in the same vertex buffer. Yet if i load 1 more face it throws an error. I found that by searching for another offset of faces reveals the other meshes. But its very time consuming. Is there anyway to parse the model data by a script ?

Samples
https://drive.google.com/file/d/1vrkLRG ... sp=sharing
Thanks in advance :)

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 3328
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 908 times
Been thanked: 1820 times

Re: Midnight Club LA (PS3)

Post by shakotay2 » Thu Apr 08, 2021 10:59 pm

Sharppy wrote:
Thu Apr 08, 2021 8:15 pm
But its very time consuming. Is there anyway to parse the model data by a script ?
I wouldn't know, why not - but it's also very time consuming. :D

Counts are to be found in the ..._unpacked files, that's good.

Get the start_of_face_indices_blocks by searching for 0000 0001 0002 in 0xf9785b04_unpacked:

Code: Select all

# 1aca0
# 2aae0
# 2bcb0
# 36000
# 3a000
# 3d000
# 3ed80
# 40c40
# 41c10
# 42b60
# 45ef0
# 46ee0
# 48000
# 49000
# 49810
# 4a000
# 4a800
# 4f000
# 4f1e0
# 4f3c0
# 4f5a0
# 4f780
# 4f950
# 50000
# 501b0
# 50360
# 50510
# 51500
# 52180
# 521c0
# 63930
(have to be validated, 0x63930 is a false find, for example)

(If I have more spare time I could put this to the Make_H2O project. But not to soon.)
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

Sharppy
advanced
Posts: 50
Joined: Thu Jun 07, 2018 8:09 am
Has thanked: 1 time
Been thanked: 7 times

Re: Midnight Club LA (PS3)

Post by Sharppy » Fri Apr 09, 2021 1:09 am

Thank you that was how i was cutting the files for extraction because some faces aren't directly after the vertex. Well it was worth a shot. DKDave just responded on it aswell. Seems the original tool didnt do that good at decompressing the .rpf file.

User avatar
DKDave
mega-veteran
mega-veteran
Posts: 249
Joined: Mon May 06, 2019 6:07 pm
Has thanked: 6 times
Been thanked: 100 times

Re: Midnight Club LA (PS3)

Post by DKDave » Fri Apr 09, 2021 5:43 pm

I'm always interested in car models, so I wouldn't mind getting these. I've also extracted the files myself and get the same resulting unnamed files as you, so they are most likely correct.

The format itself is very convoluted, with pointers all over the place to various bits of data. The addresses are odd due to the fact that they are all in the format 0x50nnnnnn (not sure what the 0x50 signifies, but it doesn't seem relevant as far as I can tell).

From my analysis of the file, there's an offset at 0x08 that seems to point to a "master list" of mesh info. This points to a list of mesh offsets which have offsets to mesh header info, which has offsets to vertex and face info, which have offsets to the actual vertex and face data for each section. So the vertices and related faces could be anywhere in the file, and often aren't together by the look of it.

I might attempt writing a script if I can properly make sense of it enough to do so.
"Each person is born with their fate written into their own genetic code. It's unchangeable, immutable. But that's not all there is to life." - Dr. Naomi Hunter

User avatar
DKDave
mega-veteran
mega-veteran
Posts: 249
Joined: Mon May 06, 2019 6:07 pm
Has thanked: 6 times
Been thanked: 100 times

Re: Midnight Club LA (PS3)

Post by DKDave » Fri Apr 09, 2021 9:07 pm

Here's my first attempt at parsing your sample file(s). Seems ok so far, but still lots of unknown stuff.

Image
"Each person is born with their fate written into their own genetic code. It's unchangeable, immutable. But that's not all there is to life." - Dr. Naomi Hunter

Sharppy
advanced
Posts: 50
Joined: Thu Jun 07, 2018 8:09 am
Has thanked: 1 time
Been thanked: 7 times

Re: Midnight Club LA (PS3)

Post by Sharppy » Fri Apr 09, 2021 9:43 pm

Oh wow thank you so much thats amazing. :eek: did you do each part at a time or the whole model at once ? Great work man truly. Thanks for your time and effort on this. There are parts there i havent seen yet.

User avatar
DKDave
mega-veteran
mega-veteran
Posts: 249
Joined: Mon May 06, 2019 6:07 pm
Has thanked: 6 times
Been thanked: 100 times

Re: Midnight Club LA (PS3)

Post by DKDave » Fri Apr 09, 2021 10:42 pm

Each file is a separate part of the whole model, so one file is just a seat or chassis, etc. Some are lower detail versions too. I just put some of the pieces together in Blender. The rims/tyres and stored separately as well. So there may be some "setup" file covering the whole model somewhere.

It's odd, though, because I've also extracted the files myself from the PS3 version and they seem to be slightly different in structure to yours. Which vehicle is your samples from, so I can check mine and see if they are the same?

It's a long way from being a useable script, but it's a start...
"Each person is born with their fate written into their own genetic code. It's unchangeable, immutable. But that's not all there is to life." - Dr. Naomi Hunter

Sharppy
advanced
Posts: 50
Joined: Thu Jun 07, 2018 8:09 am
Has thanked: 1 time
Been thanked: 7 times

Re: Midnight Club LA (PS3)

Post by Sharppy » Sat Apr 10, 2021 12:03 am

Strange. I hope I didnt get these files confused with the XBOX version. Im pretty sure them files were encrypted with no tools. Here is my whole folder i uploaded it to archive the files.

https://drive.google.com/drive/folders/ ... sp=sharing

I attempted to put it together to and added some things but it took about 10 hours to get this far
Image

User avatar
DKDave
mega-veteran
mega-veteran
Posts: 249
Joined: Mon May 06, 2019 6:07 pm
Has thanked: 6 times
Been thanked: 100 times

Re: Midnight Club LA (PS3)

Post by DKDave » Sat Apr 10, 2021 1:17 am

Yeah, those are XBox 360 ones (including your other sample).

It's no big deal, just so I know which version I'm looking at. I think the XBOX version is slightly easier format than the PS3. It seems like I can get the info for all meshes from the X360 versions, although still a few issues to iron out before I can get anywhere near a proper working script!
"Each person is born with their fate written into their own genetic code. It's unchangeable, immutable. But that's not all there is to life." - Dr. Naomi Hunter

Sharppy
advanced
Posts: 50
Joined: Thu Jun 07, 2018 8:09 am
Has thanked: 1 time
Been thanked: 7 times

Re: Midnight Club LA (PS3)

Post by Sharppy » Sat Apr 10, 2021 2:31 am

Sorry about that, I had extracted both but i could of swore the XBOX ones were not opening for me. So if these are the XBOX ones that would mean I couldn't get the PS3 ones to open. So you got further than me on that. I tried everything too to decompress the files. Sorry about the confusion. Hopefully the files aren't too different. What tools did you use to decompress the .RPF. then the _unknown data files ? Was it one program or several ?

User avatar
DKDave
mega-veteran
mega-veteran
Posts: 249
Joined: Mon May 06, 2019 6:07 pm
Has thanked: 6 times
Been thanked: 100 times

Re: Midnight Club LA (PS3)

Post by DKDave » Sat Apr 10, 2021 11:11 am

I just used RPFTool to get the initial files - it seems to work the same for both versions.

The resulting "CSR" files are compressed with standard zlib for PS3, and xmemlzx for XBox 360, so I just did a QuickBMS script that decompresses both versions (attached).
rsc.zip
You do not have the required permissions to view the files attached to this post.
"Each person is born with their fate written into their own genetic code. It's unchangeable, immutable. But that's not all there is to life." - Dr. Naomi Hunter

Post Reply