Jump to content

Home

Help Moneky Island 4 Models


myzinsky

Recommended Posts

  • Replies 68
  • Created
  • Last Reply

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.

 

Link to comment
Share on other sites

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.)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :)).

Link to comment
Share on other sites

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 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 :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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)...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...