PDA

View Full Version : Help Moneky Island 4 Models


myzinsky
08-31-2003, 06:08 AM
hi,
how can i rip monkey island 4 models??

bgbennyboy
08-31-2003, 09:51 AM
You cant, we dont understand the format yet. You can rip the textures with EMI viewer.

myzinsky
08-31-2003, 10:27 AM
where can i download this tool???

bgbennyboy
08-31-2003, 10:50 AM
http://gamefileformats.the-underdogs.org/files/emi-viewer-2.6.zip

myzinsky
08-31-2003, 05:11 PM
thx it works,
but how i can see the models :-(
i can only see the textures
i need models :-)

john_doe
09-01-2003, 12:01 PM
We don't know the file structure of the models (yet).
I examined them with my little 3d knowledge and found some useful information, but I really know too liittle about 3d stuff to actually do something useful with it.

Alien426
09-01-2003, 12:16 PM
Do you need it for Return Of The Tentacle (http://www.dott2.de.ms/)?

The freakin' measures to prevent someone from copying text suck ass and are waaaaay over-reacting and overweening.

john_doe
09-01-2003, 01:27 PM
I fumbled around with some small files (the .meshb ones, they're used for static objects).
This is what I've found out so far (contains many errors and wrong assumptions, though):


definitons:
vector3d = float x,y,z
vector2d = float x,y

string:
long length
byte*length string data


start:
string MeshName Name of the mesh
vector3d u[4] unknown (maybe for collision detection)

long numtex Number of textures used
string texname[numtex] Texture filenames (incl. path information)

long u unknown, is 0x13 in many files
long numvert Number of vertices or similar
vector3d vectors[numvert] Vertex data
vector3d datda[numvert] unknown data
(Vertex data and unknown data are 2*numverts*sizeof(vector3d) in size, maybe they're one block instead of two)

byte size is numvert * 4 unknown
[in manhole.meshb there are other values, seems to be 4 bytes per entry. maybe vertex lighting data (looks like RGBA color values)]


long unknown count usually 0x02
repeated unknown count times {
long id/flags usually 0x0304
long unknown usually 0x00
long faces Number of faces
}


vector2d texcoords[numvert] texture coords (one vector2d for each vector3d?)


My 3d knowledge is at a bare minimum, so please excuse the lack of proper terms.

john_doe
09-02-2003, 10:09 AM
An update.
I've made a viewer for the static meshes (.meshb) which works with some of the files I tested except for one (see the text below).
I hope I can figure out how to handle this one file and also enable texture support and export to other file formats (probably something easy, like text-only).



definitons:
-------------
vector3d = float x,y,z
vector2d = float x,y

string:
---------
long length
byte*length string data


start:
--------
string MeshName Name of the mesh
vector3d u[4] unknown (maybe for collision detection)

long numtex Number of textures used
string texname[numtex] Texture filenames (incl. path information)

long u unknown, is 0x13 in many files
long numvert Number of vertices or similar
vector3d vectors[numvert] Vertex data
vector3d normals[numvert] Normal data

byte size is numvert * 4 colormap
[in manhole.meshb there are other values, seems to be 4 bytes per entry. maybe vertex lighting data (looks like RGBA color values)]

vector2d texcoords[numvert] texture coords (one vector2d for each vector3d?)

(--> here the difference with manhole.meshb starts, s.b.)
long unknown count usually 0x02
repeated unknown count times {
long id/flags usually 0x0304
long unknown usually 0x00
long facescount Number of faces
word faces[facescount] the faces data
}

long end some end marker (maybe block id), 0x00

I examined bronzehat.meshb and hankey.meshb to find this out.
Another file, manhole.meshb, is different - it only has one "object" (can't think of a better name atm) and doesn't work with these specs completely.
manhole.meshb also has some more data at the end, probably for animation or similar.

(Note: "Usually" means it's the same in all the files above I've checked.)

bgbennyboy
09-02-2003, 10:28 AM
Wow fantastic stuff! Heh you really do work fast.

myzinsky
09-02-2003, 01:25 PM
hi,
my problem is:
i cant speak english very well .... :-(
i want to know:

do you make a program with that i can see th models and i can make screenshots????

i need the models for "sherman toothrott"
( http://www.toothrot.de.vu/ )
this is the biggest fan adventure of monkey island !

john_doe
09-02-2003, 01:59 PM
I've finally found out the format of the "problem" mesh. Now my little tool can display all my test-meshes with a dummy texture.
Next step is to implement the usage of the real texture and to test if it works with all .meshb files.
Then I'll probably write an exporter for Wavefront (easiest 3d format I know).

I didin't look at the .animb files yet but I guess they're much harder for me to do as they contain animation stuff etc. and I know next to nothing about that.

bgbennyboy
09-02-2003, 02:22 PM
Excellent! I cant wait for that.

As a totally neutral party, with no vested interests at all I think you should move onto tiles next ;)

myzinsky
09-02-2003, 06:11 PM
o hope thet i have understood what yo have sayd :-) (bad english im from germany LOL )

can you send me the tool????
myzinsky@web.de

john_doe
09-02-2003, 08:07 PM
@myzinsky:
The tool is not done yet.

(Das Programm ist noch nicht fertig. Ich bin noch am rumbasteln, dürfte aber bald soweit sein daß man wenigstens Screenshots machen kann, falls das hilft.)

myzinsky
09-03-2003, 12:12 PM
(ah ok kannst dich ja dann melden!!!)

i need this toool _:-)

john_doe
09-03-2003, 01:44 PM
The tool is almost done, now it can open the meshes directly from Emi bundles and it also uses the textures (even animated ones, though, only the first frame is used as of now).

Benny, I'll have a look at the tiles, too, but first I want to figure out more about the anim format.
It's not that complicated structure-wise, but it'll be hard to actually animate something with it (for someone who knows little about 3d coding and even less about maths :)).

bgbennyboy
09-03-2003, 01:52 PM
Heh you keep going, you're making great progress.

I'm still looking at the tiles myself but i'm not really sure about the co-ordinates and stuff, they seem very dodgy (http://www.gorman.btinternet.co.uk/Rectangles.txt) when I try and draw them to screen. They must be relative to something like you suggested. I'll keep messing with them then hopefully you wont need to look at them :)

myzinsky
09-03-2003, 06:14 PM
john can you writ in german and english please :-) i can't understand all :-)

john_doe
09-03-2003, 06:56 PM
Whee!
I've now released the first beta. It still has some quirks and few meshes crash it but in general it mostly works.

You can download it from here: gamefileformats.the-underdogs.org/files/emimeshviewer-0.1beta.zip


@myzinsky:
Ok. Also, die Beta-Version vom Programm ist fertig. Download-Link siehe oben.
Es dürfte einfach zu bedienen sein: File->Open bundle... öffnet eine .m4b-Datei (auf der CD). Danach aus der Liste rechts unten ein Mesh auswählen und doppelklicken. Screenshots kann man jedenfalls schon machen, Export kommt später.

bgbennyboy
09-03-2003, 06:56 PM
Excellent, let the testing commence!

bgbennyboy
09-03-2003, 07:35 PM
I'll report any bugs I find, I think you know about them already though.
Using artall.m4b:

fx\screen1.meshb produces the 'texture not found' and 'unsupported texture warnings' ('zu wenig arbeitsspeischer'?) but also every time the mouse moves over the model display window, it produces what looks like an access violation (I cant tell for sure because its in German)

After the access violation when you then select a valid mesh the textures are white, if you click again the normal textures are displayed.

When you minimise or the window goes out of focus, the model doesnt display again until you do a mouseover. So thats just a case of using OnPaint() or its gl equivalent I presume.

Some models appear to have too few polygons, especially on the faces. For example cla_low and nav_low. [Edit] since its _low in the filenames this is probably correct.

Great work though, its really good :)

Just out of curiosity, what other games are you planning to support in your resource viewer besides EMI and Grim?

Oh and Gabez was going to post about this on The Scumm Bar but I said it was better not to for this beta, otherwise you'd be barraged with bug reports. I hope thats ok?

myzinsky
09-04-2003, 12:25 PM
sau geil!!! nur jezt müsst emna wie in poser das model bewegen können!! :-)

john_doe
09-04-2003, 12:54 PM
Yes, the meshes in the fx folder don't seem to work correctly. Don't know yet why.

I know about the "screen refresh" problem but forgot to mention it in the readme. I don't know why this happens - I have a Paint call when it's needed (after loading and in FormPaint). I even call the MouseMove even but doesn't seem to work.


And I want to add support for other bundle-based games as well in my viewer (like Outlaws etc.). I just thought of it and am not sure if it really gets done, but it wouldn't be that hard since I'd just need to create a new bundle-class for the bundle format and the viewers for the textures and stuff. Still not sure, though, EMI and Grim are more important for me.

Currently I'm looking into the animation stuff but it's hard as hell.
I know EMI uses a skeleton-based animation system using quaternions for rotations...but that's it.
I tried to load a skeleton file (.sklb) and display it over the mesh but the bones didn't look to be at their right position.
And there's really not much info about this topic on the net (just very game specific stuff)...

myzinsky
09-04-2003, 01:01 PM
nur jezt müsst emna wie in poser das model bewegen können!!

john_doe
09-05-2003, 10:55 AM
Hi there,

I've found out a lot since yesterday.

I'm still not quite sure how the skeleton files are made up. I think I know where the bone data is stored but there are some more values I don't yet know.

I've found out more about the animation files (.animb).
They store keyframes which tell the positions of a bone at a specific time in the animation.
Each bone has its own keyframe-list. Also, I've encountered two types of keyframe-lists: One that store rotations (using quaternions) and one that stores transformations as a 3d vector.

I've also updated the mesh specs but they've grown to big to post everytime so I'll upload them when I'm at home.

myzinsky
09-05-2003, 02:35 PM
wenn ichs richtig verstanden habe machst du ein update! wo kann ich es downloaden?

john_doe
09-09-2003, 02:05 PM
Now I've found out most of the file specs (meshb, animb and sklb).
I'll put up the specs when I'm at home.
But I just can't get the skeleton to show correctly. It almost looks good but only almost.
There's probably something I'm missing.

If anyone who has experience in 3d stuff reads this please contact me to help if you want.

bgbennyboy
09-09-2003, 02:25 PM
Someone help him, I demand it :¬:

john_doe
09-09-2003, 04:26 PM
I've compiled all my knowledge about the 3d files into a text file that you can download from here:
Escape from Monkey Island model specs (http://gamefileformats.the-underdogs.org/files/emi-mesh-specs.txt)

There's still some stuff missing but the majority of stuff seems to be right.

bgbennyboy
09-09-2003, 05:41 PM
Nice one, its so much better when people document stuff :) Great work.

Krazy
09-28-2003, 08:44 AM
Will you ever be able to see all the characters animations? That would be cool.

myzinsky
09-28-2003, 10:37 AM
eed the tool!!!!!

Serge
09-29-2003, 03:52 PM
Great work, as always, Ben (john)! Which reminds me... Working on something at the moment, something very small, very tiny, and probably never to be finished, much less released. But if it does, may I use the formats you've figured out since I last roamed in the LEC community? (You might have guessed by now what it is) Thanks are given, of course, where thanks are due - and I'm devising a scheme to make it a bit more elaborate than the previous "thank you" lists I've done.

Oh, and may I use your real name, bg, in case you turn up in the thanks list too? :) Just need to gather permissions for something I'll never do anyway ;)

Oh, and if you (bg) have any idea where Murray is, ask him about the cgi-irc thingy. No way for me to get on IRC without it :)

- Serge

Serge
09-29-2003, 03:54 PM
Heck, that SCUMMLord title is really misleading by now :)

- Serge

john_doe
09-29-2003, 04:38 PM
@Serge:

Thanks and of course :)

myzinsky
09-29-2003, 05:07 PM
jon ich hab nicht verstanden was er gemeint hat kannst du das bitte nochmal zusammenfassen??? THX

Tomas
09-29-2003, 08:16 PM
Oh my, I almost fell off my chair when I read Serge's name there.

Really.

Well, umm, that's about all I had to say... :spin:

Serge
09-30-2003, 09:07 AM
Ben: Thanks! :)

myz: Was ich gesagt habe hat nichts zu tun mit der "ripping" von Monkey Island 4 models. Ich benutzte nur diesen "Thread" weil ich wirklich nicht ein langes Thread anfangen will, das über ein Gerücht basiert ist. :)

Ich fragte nur ob ich john_doe's Code anwenden kann, wenn ich vielleicht ein projekt wieder aufnehme.

Excuse my poor German :) Needed to try and use that again...

Tomas: I'm pretty much a constant lurker here... Just never have anything useful to say since I'm not working on anything, and most people here know all that I know anyway, and can answer the questions asked better :)

Oh, and Tomas... If you have some contacts capable of setting up a cgi-irc script like the one Murray once had on some server, so that I can once again access IRC, I'd be eternally grateful.

- Serge

jannar85
09-30-2003, 08:56 PM
Originally posted by Serge

Oh, and Tomas... If you have some contacts capable of setting up a cgi-irc script like the one Murray once had on some server, so that I can once again access IRC, I'd be eternally grateful.

www.dikt.no

click chat on the left

then "Klikk her for å starte webchat! "

then.. advanced

then.. fill in the info :)

and then login ;)

Serge
10-03-2003, 07:59 AM
Ooh, great! Thanks :) Didn't think anyone would provide unrestricted access to servers... :) I'll check if it works this afternoon.

- Serge

Serge
10-03-2003, 12:53 PM
Works fine... Although they only allow one server at a time, and I need to be on gamesnet and freenode at the same time, oh well :) Also feel a bit bad about misusing other peoples' cgi friendliness :)

Oh, ben (John), did I never send you those .3do specs I meant to send to you? Can't tell from the specs you've made - although I CAN tell that a lot is missing, it may be stuff my (almost complete) specs just got wrong. If I didn't, I might as well send them to you in case you ever start working on .3do again.

Can't post them here for various reasons that I won't go into :)

- Serge

khalek
10-04-2003, 01:11 AM
If you're after proven Grim Fandango specs you could have a look at the residual interpreter in ScummVM CVS which renders 3DOs fine and lets you play the game to a rather limited extent.

myzinsky
10-04-2003, 10:13 AM
please translate / bitte übersetzen

thx

Serge
10-06-2003, 10:01 AM
That too, yes, khalek... Which would be better than the specs I made 2 years ago.

And which also reminds me to bow down in awe of the fantastic dedication of the ScummVM team :) Too bad that it's already NECESSARY to do a GrimE engine port. Not just for other platforms, but even for Windows :P

Long live LEC's support for "old" games...

- Serge

john_doe
10-06-2003, 11:15 AM
I haven't updated my specs as you might have guessed, they've been untouched for several years :)

And when I'm in the right mood I'll work on my tool again (mentioned somewhere above) and integrate support for 3do files and maybe (!) also make an exporter or even an importer (i.e. a converter).

But there's so much I want to do regarding "game resource viewers", I'm working on too much stuff :)
Tools for Toonstruck, Broken Sword 1+2, Discworld, Goblins 1-3(..) and a player for Sierra's VMD videos....

khalek
10-06-2003, 12:06 PM
Originally posted by john_doe
I haven't updated my specs as you might have guessed, they've been untouched for several years :)

And when I'm in the right mood I'll work on my tool again (mentioned somewhere above) and integrate support for 3do files and maybe (!) also make an exporter or even an importer (i.e. a converter).

But there's so much I want to do regarding "game resource viewers", I'm working on too much stuff :)
Tools for Toonstruck, Broken Sword 1+2, Discworld, Goblins 1-3(..) and a player for Sierra's VMD videos....

Well for Broken Sword 2 you have the modified version of the original code in ScummVM CVS to look at, and any broken sword questions can probably be answered if need be as well :)

Might I suggest you talk to/collaborate with Mike Melanson regarding the VMD stuff? He is quite interested in all these game video formats as you'll see by poking around http://www.pcisys.net/~melanson/codecs/ or the game formats part of the mplayer sample ftp he maintains. He mentioned in one of his journal entries he has a bunch of VMD files from GK and maybe something else, can't remember now.

john_doe
10-06-2003, 03:37 PM
I know enough of most formats/resources of the games to actually display the sprites, for example.

The only thing I'm still missing is how the sprite codec called "RLE7" in Broken Sword 1 works. It's probably simple but I didn't look that deeply into it.
However, I've made a program for BS2 more than a year ago which displays the rooms or at least the background screen, I didn't know about the multiple layers then, and plays the sprite animations.

And I can play some of the VMD movies from GK2. However, some movies seem to be different than others and they crash my player. This is still quite new, I only started two weeks ago to make a new player. I have an old player I made several years ago and still runs in DOS :)
Still, compared to Smush/Insane the VMD format is a piece of cake. The hardest thing was to find out how the LZ decompression works (I had it disassembled, but my assembly knowledge is at a bare minimum).

Nuff nonsense for today, nag you later.

myzinsky
10-06-2003, 05:23 PM
i dont understand!!!!
in german please!!!

i need the help for the models!!!!

Drigo Zoxx
10-06-2003, 08:17 PM
Originally posted by khalek

Might I suggest you talk to/collaborate with Mike Melanson regarding the VMD stuff? He is quite interested in all these game video formats as you'll see by poking around http://www.pcisys.net/~melanson/codecs/ or the game formats part of the mplayer sample ftp he maintains. He mentioned in one of his journal entries he has a bunch of VMD files from GK and maybe something else, can't remember now.

There is a brand new VMD player by Vladimir Gneushev. I've not tied it yet, but it sounds promising. Also, I know that's totally out of thread, however... :)

http://vagsoft.chat.ru/sci.html

john_doe
10-07-2003, 08:02 AM
That's interesting. I'll test it when I'm home and maybe I can help him, however I think his player is more advanced, he even has a player for the robot files...

john_doe
10-07-2003, 10:35 AM
I just tested the VMD player with a demo of Lighthouse. Works perfectly so far.

Ender
10-22-2003, 12:15 AM
Originally posted by john_doe
The only thing I'm still missing is how the sprite codec called "RLE7" in Broken Sword 1 works.

Did khalek answer you on this?
RLE7 is standard 7bit run-length-encoding. No idea why they use the palette the way they do, this is just copied (into pseudo-code) from the original source:


while (comp_pos < compSize_in_header)

if bit > 127 OR bit = 0
// Single pixel, so just copy
uncompressed[pos] = bit;
pos++; comp_pos++;
bit = compressed[comp_pos];
else
// Color run
run_length = compressed[comp_pos];
color = compressed[comp_pos + 1];
comp_pos = comp_pos + 2;
for i = 0 to runlength
uncompressed[pos + i] = color;
pos = pos + runlength + 1;

khalek
10-22-2003, 04:58 AM
Originally posted by Ender
Did khalek answer you on this?
RLE7 is standard 7bit run-length-encoding. No idea why they use the palette the way they do, this is just copied (into pseudo-code) from the original source:


while (comp_pos < compSize_in_header)

if bit > 127 OR bit = 0
// Single pixel, so just copy
uncompressed[pos] = bit;
pos++; comp_pos++;
bit = compressed[comp_pos];
else
// Color run
run_length = compressed[comp_pos];
color = compressed[comp_pos + 1];
comp_pos = comp_pos + 2;
for i = 0 to runlength
uncompressed[pos + i] = color;
pos = pos + runlength + 1;


yes I sent him an email about it a while back

john_doe
04-01-2004, 10:08 AM
I've worked on the EMI skeletons again, and found out the routine that converts quaternions to angle/axis was kinda different :) So I replaced it with another routine and now the skeleton almost looks right.
Still, some joints seem to be rotated at a wrong angle, e.g. the legs and fingers don't seem to be where they should be, where other joints seem to be at the right place (a lot of seem there :)).

Does anyone know if this might be caused by the fact that I convert the quaternion rotation to angle/axis and there's a "gimbal lock" so the joint doesn't rotate how it should?

Currently, I go though each joint, calculate the rotation/translation matrix, and if the joint has a parent, I add the parent's matrix to the current one.

Or maybe I shouldn't add the matrices but instead add the quaternion rotations and translations, and only calc the matrix when the joint is drawn?

bgbennyboy
04-02-2004, 05:25 PM
I'm afraid I cant help there, I dont have a clue about 3d stuff.

Keep going though, you're doing great work :)

john_doe
04-06-2004, 09:01 AM
Finally! I did it!

The skeletons show how they should! After hours reading tutorials and FAQs about matrix/vector stuff.
Turns out it was the rotation that didn't always work as it should have.

Well, now I can implement animations. I hope this will not take my head as close to exploding as the skeleton stuff (but I'm afaraid it will).

ThunderPeel2001
04-06-2004, 12:11 PM
Wow!! Well done John_Doe!! to think we might be able to improve on the characters (maybe add those "extra" frames of animation from the PS2 version ;)) and generally muck around with MI4 one day.

I've LOVE to be able to mess around with Manny and Co though, I've always wanted to increase the resolution of his skeletal head texture and give him "proper" hands. Also maybe fix Max's (?) cigar.

There's already people doing this for other games, check out the System Shock 2: Rebirth mod... replacement high-polygon models for the ingame characters... very cool!

bgbennyboy
04-06-2004, 12:31 PM
Great stuff! Bloody well done!

Thunderpeel: On a sidenote, Jake and I once tried making high-res textures for grim. It didnt work, Grim didnt like having bigger textures and didnt scale em down, I might still have a screenshot of it somewhere.

DMCBatman
04-06-2004, 01:30 PM
Wow, this is pretty amazing.

Any chance at a mac port someday?

If a recompile is a all that's needed, I could do it.

ThunderPeel2001
04-06-2004, 02:16 PM
BG: Dang :(

That's number 46 on the list then :D

john_doe
04-07-2004, 07:02 AM
Another update:
Now I can play almost all the animations (one I tested didn't work correctly, i.e. the vertices were kinda..weird).
Now I need to calc the correct vertex normals (for shadows/lighting) and there's another problem with unicolored textures. They're not lighted correctly and I still need to find out if it's normal in OpenGL or if I missed some settings.
If everything goes well I'll release the new version towards the end of the week.

ThunderPeel2001
04-09-2004, 04:22 PM
woohoo!

john_doe
04-15-2004, 01:53 PM
I wanted to implement bone weights before I release the viewer but the results look pretty surreal.
If I can't get it to work I'll just release it without it, the aninmations look ok anyway.

fixxxer4ever
05-05-2004, 02:03 AM
Hi,

John_doe what is the progress so far ?! You said you were up to releasing a working version of your model viewer, and we all are still waiting ...

Thanks for your hard work.

john_doe
05-05-2004, 02:48 AM
I wanted to release it but it still needs some polishing in the GUI and I need to remove debug-stuff. I haven't got much time so it'll take a while.

SkullHW™
05-10-2004, 02:03 PM
Eep.

How do i hack EMI bundles?

fixxxer4ever
05-21-2004, 02:09 AM
Hi,

So, is there any progress yet! Sorry for keeping to pop up like this, but being able to view EMI models and animations has always been in my wish-list :)

fx

SkullHW™
05-22-2004, 09:47 AM
Meh.



:fett: My friend Boba Fett here says : "Can i rip Indiana Jones and the Infernal Machine sounds?"