Mesh Format Specification?

Problems building or running the engine, queries about how to use features etc.
Post Reply
Slinky730
Gnoblar
Posts: 2
Joined: Mon Mar 05, 2007 6:09 am

Mesh Format Specification?

Post by Slinky730 »

Hey, there. I'm certain this has to be somewhere in the forums or documentation, but I've been searching for two days now, and everything's come up dry. Is there a nice piece of documentation for the OGRE mesh format? Not having to dissect the code would be awesome.

Thanks!
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

The XML format is described in ogrenew/Tools/XmlConverter/docs. The binary format is always subject to change at any time, which is why it's not documented. If you need to read/write it, just use the Ogre::MeshSerializer class.
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
Slinky730
Gnoblar
Posts: 2
Joined: Mon Mar 05, 2007 6:09 am

Post by Slinky730 »

The reason I was asking is I was under the impression that it was a completely open format? It seemed like a more convenient choice than md2 for a non-OGRE project. What sort of license is the format under? LGPL, right?
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 7
Contact:

Post by haffax »

The format itself doesn't need a license. You are free to use it for you own project, but of course you are not free to derive your implementation of a loader from the Ogre source, unless you stick to the LGPL terms. Implementing a loader of your own from scratch is ok and a few sneaky peeks at Ogre's source are covered by most countries copyright laws too.

The binary format is tersely documented.
You'll find all you need in ogrenew/OgreMain/include/OgreMeshFileFormat.h

The file format is versioned, newer versions can come up without notice, but they are identifyable by their header.
team-pantheon programmer
creators of Rastullahs Lockenpracht
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

Slinky730 wrote:The reason I was asking is I was under the impression that it was a completely open format? It seemed like a more convenient choice than md2 for a non-OGRE project. What sort of license is the format under? LGPL, right?
The .mesh format is optimized for Ogre's consumption -- you can use it for other purposes I suppose but I don't really see why you would. If you just want a general binary mesh format, creating your own is fairly straightforward.
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

Someone else ripping our mesh file format? Jeez ;)

The format is open in that you can see the guts quite easily but the structure is subject to change at our whims. We have serializer classes that handle all the binary work and manage things like upgrading previous versions of the mesh format automatically, so we always tell people to use those classes and not access the binary format directly. If you want to directly use the binary format that's your choice, but don't expect us to support it.

In design terms the binary format is an implementation, not an interface - the interfaces are the serializer classes and the XML format. So we reserve the right to change the implementation any time we like.
Post Reply