Hey all, been trying to rip levels from the original Max Payne. The atmosphere of this game is something special, and I thought it would be really cool to port some of these maps to other games or do renders of them in modern graphics engines. Unfortunately, the .ldb format is I think the only thing that hasn't been cracked from the original Max Payne, and I couldn't find much of anything about the format online. These files contain pretty much all the level data from what I can tell, including the meshes and textures.
The textures can be ripped using this program https://www.moddb.com/games/max-payne/downloads/ldbrip
However, there is currently no way to rip the actual level mesh from these files. I'm pretty certain they're split up into several submeshes, so far I haven't had much luck. Only able to get some point clouds (probably with junk data)
Car verts from Tutorial.ldb
Verts from end_combat.ldb
Could be wrong, but it kinda resembles this part of the map. If you look on the right side of the above image, that block of verts kinda resembles the desks where the computers are set on.
Any point clouds i'm able to grab are always near the top of the file, but if you look at the bottom of the file, you can see various strings, probably related to the levels scripting but some of these I think are mesh/texture names.
I've also tried the game's modding SDK, which does include a level editor. However, it doesn't include anything for these .ldb files. Ninja ripper also didn't take kindly to this game.
Here's some sample files if you'd like to take a look.
https://mega.nz/file/Y74QSDjL#YT_Zy8eto ... aVmATG9WCo
Hope someone with more experience than me can shed some light on this, any help would be appreciated.
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
Max Payne .ldb Level Models
-
- beginner
- Posts: 26
- Joined: Sat Sep 29, 2018 5:48 pm
- Has thanked: 19 times
- Been thanked: 5 times
- shakotay2
- MEGAVETERAN
- Posts: 4284
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1146 times
- Been thanked: 2242 times
Re: Max Payne .ldb Level Models
Funny format, some small point clouds, yeah. In Tutorial.ldb 30..80 vertices per submesh, but FVFsize is varying from 35 to 36, then 37 bytes. Crazy.
I assume this is worthless as long you don't know where or how to get the face indices.
Maybe a "point cloud skinner" is an option?
.
I assume this is worthless as long you don't know where or how to get the face indices.
Maybe a "point cloud skinner" is an option?
.
You do not have the required permissions to view the files attached to this post.
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?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
- shakotay2
- MEGAVETERAN
- Posts: 4284
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1146 times
- Been thanked: 2242 times
Re: Max Payne .ldb Level Models
edit: meanwhile I checked some of the face indices "candidates" - always gives me a mess. There must be some trick...
You do not have the required permissions to view the files attached to this post.
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?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
-
- ultra-n00b
- Posts: 9
- Joined: Mon Nov 11, 2019 11:18 am
- Has thanked: 1 time
- Been thanked: 4 times
Re: Max Payne .ldb Level Models
I have researched the ldb format and can share what I found out. The thing is, that they use a weird serialization format which compresses numbers into up to 3 bytes. Every element is prefixed with a byte determining its type. From what I have read, you probably already know 0x16 for a 3d float vector. I have appended a python script which unpacks the ldb files geometry as obj files. There are still plenty of things to do, for example, the level is build up from multiple sub meshes. While I found an id to separate them they all lay on each other, so they need a kind of offset. Furthermore the extracted stuff is currently only bare geometry, while textures can be extracted I am missing some information where they get attached.
You do not have the required permissions to view the files attached to this post.
-
- ultra-n00b
- Posts: 9
- Joined: Mon Nov 11, 2019 11:18 am
- Has thanked: 1 time
- Been thanked: 4 times
Re: Max Payne .ldb Level Models
Just a small example of the end combat room as geometry. That thing hanging in the middle is one of those mentioned submeshes
You do not have the required permissions to view the files attached to this post.
-
- ultra-n00b
- Posts: 9
- Joined: Mon Nov 11, 2019 11:18 am
- Has thanked: 1 time
- Been thanked: 4 times
Re: Max Payne .ldb Level Models
I made some progress and found a table, describing the material properties. Still, I cannot assign them to a particular face. I should mention that this has a lower priority for me, since I am more interested in the Remedy Games starting from Alan Wake which have a different Engine. I wanted to know, how much these games have in common with the Max Payne Games, that is the reason, why I started reversing them.
You do not have the required permissions to view the files attached to this post.
Re: Max Payne .ldb Level Models
I want to port Max Payne to UE5. So I've spent like a week trying to decompile this file format. I've even used IDA to disassemble all the DLLs and the EXE files to figure out how it is processed by the game. I've parsed like 80 percent of file format. The file format is a totally weird. It is the kind of memory dump. The level geometry is duplicated lots of times. I think, it's possible to write Decompiler from LDB to MaxED's LVL format, because LDB contains almost all information that LVL file contains. They use polygons to render geometry not triangles. I'm currently writing Maya script to visualize all of this mess from the LDB.
Re: Max Payne .ldb Level Models
I wrote the script for Maya. It allows import Max Payne's levels.
You do not have the required permissions to view the files attached to this post.
-
- ultra-n00b
- Posts: 9
- Joined: Mon Nov 11, 2019 11:18 am
- Has thanked: 1 time
- Been thanked: 4 times
Re: Max Payne .ldb Level Models
Nice work, would you be willing to share the code? I would be interested what I missed.
Re: Max Payne .ldb Level Models
Sure, https://github.com/m0nstr0/max_payne_ldb_importerNostritius wrote: ↑Thu Jun 16, 2022 8:55 amNice work, would you be willing to share the code? I would be interested what I missed.
But I'm still working on it. There are some issues with the dynamic mesh transformations in the scene