The VG Resource

Full Version: Luigi's Mansion Model Format
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Don't know how many people are actually reverse engineering savvy without using helping programs, but I know I am. And well, a friend of mine has been wanting the Luigi's Mansion models since nobody ever bothered to actually document the format. At this point, I've made a script for 3DS Max that reads the verts directly from the .mdl files, but nothing else as I can't find the face data. If anyone here is savvy at file mapping, then please help me out here, haha. Here's what I've done for the model's spec thus far.

Code:
MDL Spec (Luigi's Mansion Model Files)

== File Header ==

0x00    4    Constant x04B40000
0x04    4    Unknown, possible size of something
0x08    2    Total of some sort
0x0A    2    Another total
0x0C    2    Another total
0x0E    2    Another total
0x10    4    Unknown, Possibly two shorts
0x14    4    Unknown, possibly two shorts
0x18    8    Null
0x20    4    Unknown
0x24    2    Total?
0x26    2    Total?
0x28    2    Total?
0x2A    2    Total?
0x2C    4    Null



==Offsets==

0x00    4    Offset to ID Structs?
0x04    4    Offset to possible vertex/mesh info?
0x08    4    Offset to Data after ID Structs
0x0C    4    Offset to unknown
0x10    4    Offset to data after previous data from the last pointer
0x14    4    Offset to last data section
0x18    4    Offset to Vertex Chunk
0x1C    4    Offset to Normals chunk
0x20    4    Offset to unknown
0x24    4    Offset to (Same as last offset)
0x28    8    Null
0x30    4    Offset to Bone Data Table
0x34    4    Null
0x38    4    Offset to possible weight data or something?
0x3C    4    Offset to struct data after "weight" data
0x40    4    Offset to struct data after previous data
0x44    4    Offset to data after previous data
0x48    8    Null

I have figured out what some of the data chunks resemble, but because I don't know what to call the data, I can't properly label it to map it. Nonetheless, if anyone here is good at this stuff, please help me out with this, haha.



EDIT: Here's a picture of the current progress of this ripping program.

[Image: 10hku8w.jpg]
I really wanted to rip from Luigi's Mansion, but the only thing I thought about was how the translucent ghosts would work. Is that what you're trying to figure out? I'm curious as well.
It's a strange format for a Nintendo game to use. It makes me wonder why they used MDL instead of BMD.

Also, the animations are in the 'Key' folder. There's also a BAS folder, which appears to be a sound script format. Makes sense. This is useless information, but I thought I'd put it here anyways.
The face data is what makes the model actually visible, which is what I'm looking for in the files. I'll update the OP with some pictures what what the ripper does currently here soon.
Random Talking Bush would probably be able to help if he sees this or if you asked him. I've never really looked into reverse engineering file formats as much as I really should have so I can't really help :/

It does look really good so far though.
BIG NEWS! I've figured out the face data! It's gonna take awhile to get the script to read all of it correctly since it's a bit of a pain in the ass, but meh. Here's the current progress so far.

Bone:
[Image: 205d0cn.jpg]

Mario's Cap:
[Image: hs71bt.jpg]

And yes, this appears to be the correct method for reading faces since they're tri-strips/fans. (They suck hardcore when ripping with.) I have come across a few models that don't exactly look right, but could be right for all I know. Here's the bomb model which may not be correct...

Bomb:
[Image: 331252g.jpg]
Good start - you're getting somewhere at least! Nice one Big Grin
Are those pictures of the actual models you've found or just their face data (I don't know much about models yet so forgive my lack of knowledge or understanding)?

You're probably working on these, but uh, I can definitely say that the bomb doesn't look anything like that. There's a pink ghost that hangs from the ceiling and throws black round bombs with a skull on them at you. And I'm sure you probably know what Mario's cap looks like, so as for the bone, I'm not exactly sure what that could be, but there is a ghost named Mr. Bones who throws bones at you so that could be what that is.

So... if you ever find a model of an object and aren't sure what it's for, or need names (if you find any ghosts) or anything, you can ask me if you like. I'm very glad you're doing this, it's one of my all-time favorite games.
(10-14-2011, 03:33 PM)Mighty Jetters Wrote: [ -> ]Are those pictures of the actual models you've found or just their face data (I don't know much about models yet so forgive my lack of knowledge or understanding)?

You're probably working on these, but uh, I can definitely say that the bomb doesn't look anything like that.

It's because he hasn't completely finished his script. That is in fact the bomb model, how do I know? Well, all models are named individually, and this is the bomb model. Kind of a no-brainer. Also, the face data is present; only screwed up.
I can help with the models, https://dl.dropbox.com/u/26296116/Egadd.png
https://dl.dropbox.com/u/26296116/Luigi.png ,Your script as it is seems to be very useful, I can use the vertex data it imports and make my rips match it creating a perfect rip of the model, with Uv data
This topic is over a year dead, I'm not sure if they're still working on it. So next time, please contact the OP via PM rather than bumping an old topic.

I'll close this for now, but the OP shall feel free to contact any Mod to reopen it upon need.