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

Midnight Club LA (PS3)

Post questions about game models here, or help out others!
Sharppy
mega-veteran
mega-veteran
Posts: 163
Joined: Thu Jun 07, 2018 8:09 am
Has thanked: 83 times
Been thanked: 66 times

Midnight Club LA (PS3)

Post by Sharppy »

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: 4291
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1151 times
Been thanked: 2244 times

Re: Midnight Club LA (PS3)

Post by shakotay2 »

Sharppy wrote: Thu Apr 08, 2021 8:15 pmBut 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.)
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Sharppy
mega-veteran
mega-veteran
Posts: 163
Joined: Thu Jun 07, 2018 8:09 am
Has thanked: 83 times
Been thanked: 66 times

Re: Midnight Club LA (PS3)

Post by Sharppy »

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
ultra-veteran
ultra-veteran
Posts: 357
Joined: Mon May 06, 2019 6:07 pm
Location: On board the USS Callister
Has thanked: 9 times
Been thanked: 167 times

Re: Midnight Club LA (PS3)

Post by DKDave »

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.
I see a vision rising, dreary, Fading in as children play twilight games, In the town called Ordinary, An eye of light reveals a gateway to doomsday
User avatar
DKDave
ultra-veteran
ultra-veteran
Posts: 357
Joined: Mon May 06, 2019 6:07 pm
Location: On board the USS Callister
Has thanked: 9 times
Been thanked: 167 times

Re: Midnight Club LA (PS3)

Post by DKDave »

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

Image
I see a vision rising, dreary, Fading in as children play twilight games, In the town called Ordinary, An eye of light reveals a gateway to doomsday
Sharppy
mega-veteran
mega-veteran
Posts: 163
Joined: Thu Jun 07, 2018 8:09 am
Has thanked: 83 times
Been thanked: 66 times

Re: Midnight Club LA (PS3)

Post by Sharppy »

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
ultra-veteran
ultra-veteran
Posts: 357
Joined: Mon May 06, 2019 6:07 pm
Location: On board the USS Callister
Has thanked: 9 times
Been thanked: 167 times

Re: Midnight Club LA (PS3)

Post by DKDave »

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...
I see a vision rising, dreary, Fading in as children play twilight games, In the town called Ordinary, An eye of light reveals a gateway to doomsday
Sharppy
mega-veteran
mega-veteran
Posts: 163
Joined: Thu Jun 07, 2018 8:09 am
Has thanked: 83 times
Been thanked: 66 times

Re: Midnight Club LA (PS3)

Post by Sharppy »

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
ultra-veteran
ultra-veteran
Posts: 357
Joined: Mon May 06, 2019 6:07 pm
Location: On board the USS Callister
Has thanked: 9 times
Been thanked: 167 times

Re: Midnight Club LA (PS3)

Post by DKDave »

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!
I see a vision rising, dreary, Fading in as children play twilight games, In the town called Ordinary, An eye of light reveals a gateway to doomsday
Sharppy
mega-veteran
mega-veteran
Posts: 163
Joined: Thu Jun 07, 2018 8:09 am
Has thanked: 83 times
Been thanked: 66 times

Re: Midnight Club LA (PS3)

Post by Sharppy »

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
ultra-veteran
ultra-veteran
Posts: 357
Joined: Mon May 06, 2019 6:07 pm
Location: On board the USS Callister
Has thanked: 9 times
Been thanked: 167 times

Re: Midnight Club LA (PS3)

Post by DKDave »

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.
I see a vision rising, dreary, Fading in as children play twilight games, In the town called Ordinary, An eye of light reveals a gateway to doomsday
Sharppy
mega-veteran
mega-veteran
Posts: 163
Joined: Thu Jun 07, 2018 8:09 am
Has thanked: 83 times
Been thanked: 66 times

Re: Midnight Club LA (PS3)

Post by Sharppy »

Any updates DK?
User avatar
DKDave
ultra-veteran
ultra-veteran
Posts: 357
Joined: Mon May 06, 2019 6:07 pm
Location: On board the USS Callister
Has thanked: 9 times
Been thanked: 167 times

Re: Midnight Club LA (PS3)

Post by DKDave »

It's a complicated format. Here's my crappy script so far. All it does is get the basic geometry data for each file - multiple files make up the whole car. UVs are often messed up too. There are various LOD levels which aren't obvious from the random filenames, so I have no idea how to tell what files go together. If I get more info I can update - some nice cars in there, so I'd like to get them properly.
fmt_mcla_xbox360.zip
You do not have the required permissions to view the files attached to this post.
I see a vision rising, dreary, Fading in as children play twilight games, In the town called Ordinary, An eye of light reveals a gateway to doomsday
Sharppy
mega-veteran
mega-veteran
Posts: 163
Joined: Thu Jun 07, 2018 8:09 am
Has thanked: 83 times
Been thanked: 66 times

Re: Midnight Club LA (PS3)

Post by Sharppy »

Thank you anything is better than manually extracting each part. This helps so much.
Sharppy
mega-veteran
mega-veteran
Posts: 163
Joined: Thu Jun 07, 2018 8:09 am
Has thanked: 83 times
Been thanked: 66 times

Re: Midnight Club LA (PS3)

Post by Sharppy »

Image

I see the stages failed but looking at it in MR i see the padding is 24 for them.

I also made a edit to the script to dump .mcla files instead of the _dec names.

Thanks again for all you did. Im hoping we can get the stages too from this aswell.
Post Reply