Reverse engineering the structure of a custom binary Ogre mesh

Problems building or running the engine, queries about how to use features etc.
Post Reply
Posts: 1
Joined: Mon Aug 08, 2022 10:28 pm

Reverse engineering the structure of a custom binary Ogre mesh

Post by sp00n »

Ok, this is probably an unusual request for this kind of board, and if such a request goes against the rules for this board, please close or delete the post.

I'm looking for help to reverse engineer the structure of a custom binary Ogre mesh format, namely for the game Rebel Galaxy Outlaw (and probably its predecessor Rebel Galaxy as well).

The lead programmer at one point mentioned that he could eventually release the custom exporter for 3dsmax, but he has since abandoned his job as a programmer and apparently never released any modding tools.

According to that post linked above the custom format contains both the mesh itself and the materials file, so I hope that eventually a simple split might be enough so that the Ogre tools will be able to read the binary format and do a successful conversation, which currently fails.

Here's a screenshot of the most simplest .mdl file I could find. I'm not sure if I'm allowed to post links to actual .mdl files here.

As you can see, the serializer string is "MeshSerializer_Runic", but changing it to e.g. MeshSerializer_v1.40 alone doesn't suffice. It also seems the materials data is prepended before the actual mesh file in binary form as well, so I'm hoping anyone might be easily recognize where the two data sets are joined, and therefore can be splitted.
The section I marked are probably the face indices in a 4 byte format, but I'm not sure (all the other mesh formats I've looked at have this in 2 byte). And the data following it are probably the vertices data. At least I get something when I use these values.


Ideally I hope that a simple split would be enough to make the mesh be recognized by Ogre's tools and that no further conversion would be required

Posts: 416
Joined: Wed Mar 18, 2009 3:03 am
x 218

Re: Reverse engineering the structure of a custom binary Ogre mesh

Post by rpgplayerrobin »

The OgreXMLConverter tool might help to debug it?: ... tools.html

If you manage to get it as xml data instead, you could possibly see how the data is structured, and it might even help to reverse engineer it.

Otherwise I would have no idea how to do this without the custom import code.

OGRE Team Member
OGRE Team Member
Posts: 1790
Joined: Sun Mar 30, 2014 2:51 pm
x 936

Re: Reverse engineering the structure of a custom binary Ogre mesh

Post by paroj »

OgreXMLConverter will not help as it is tied to the Mesh class.

Also, it does not seem that simply splitting the binary file will get you anywhere.

Instead you should familiarize yourself with the Serialiser class as used e.g. here: ... r.cpp#L104

Specifically, look at Serializer::readChunk

Post Reply