During the last days, I checked in some new features into the Irrlicht svn: A loader for a new file format with the extension .irrmesh and mesh writers: Irrlicht will now be able to write out every mesh again if wanted. I implemented and checked in writers for the COLLADA as well as the .irrmesh file format.
So, what's .irrmesh now? Basically, it's Irrlichts built-in file format for static meshes. That's right: Irrlicht now has it's own file format. Finally. Irrmesh is xml based and quite lean: Single vertices and indices don't have their own tags, similar to how the COLLADA format works. An .irrmesh file simply is a dump of the contents of the
IMesh interface: A list of mesh buffers, one material per buffer, and a list of vertices and indices. In this way, .irrmesh is the best supported file format and if people start writing exporters for .irrmesh, they can be sure these files will be always displayed 100% correctly in Irrlicht. But also without the not yet existing exporters it is easily possible to get your hands on .irrmesh files: You can for example use Irrlicht as converter, just load any file
of the many supported file formats and write it out again using the new IMeshWriter interface. Or even simpler: Just wait some days for the next
irrEdit release and use it as converter then.
The current mesh writers write .irrmesh and COLLADA files as UTF-16 encoded xml files. Like with all text based file formats, these files can get big for huge scenes, but I plan to reduce this a bit by adding UTF-8 xml writing support to Irrlicht in the near future. A format for animated meshes will also follow.
Here is a demo irrmesh file:
example.irrmesh (94KB).
The scene in the image in the top right corner shows the first bigger scene I tested the loaders and writers with. It contains several ten thousand polygons and the loader is very fast already. But there are still places where it could be optimized a bit.