Interchange mesh format and binary dependent format strategy

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
elander
Posts: 193
Joined: Tue Oct 05, 2004 11:37 am

Interchange mesh format and binary dependent format strategy

Post by elander »

The typical way of working to handle the mess of different mesh formats that i see in many engines is supporting an interchange format and a binary format that is dependent on each engine version (almost like a serialization of the engine classes) for the fastest loading possible, then either have an external command to convert from other common formats to this format or load these formats directly. Another way, when loading a model in the interchange format, check if there is a binary version with the same name and modification date compatible with the engine and in case there isn't convert automaticaly. Similar to the way python syncronizes .py and .pyc files.

A command to generate binary meshes would be something like this:

model2irr.exe -xml dwarf.x

To convert a mesh to the interchange format. If the engine can read Collada directly any 3d tool with a Collada exporter can do this must better than any simple command.

To convert from the interchange format to the engine dependent binary format:

model2irr.exe -bin dwarf.dae

To convert a mesh to the current engine version format.

Im not saying that Irrlicht should get rid of all the other loaders. Anyone can simply remove them from compilation if they realy want to. Thats not the point.

The latest version of Irrlicht can already serialize to xml. What would be cool was a command like the above and the possibility of irrlicht to read and write a fast binary format.

Also i think some engines write images in a custom binary that is just raw image data with an header for the fastest image reading speed possible.

If it's necessary to compress size then the entire game data (both binary images and models) could be zip into a package and read all at once into memory.
TheRLG
Posts: 372
Joined: Thu Oct 07, 2004 11:20 pm

Post by TheRLG »

Are you suggesting that Irrlicht adopt this? I think it's a decent idea, but it has to be designed well to actually allow for some real optimization. So far you have meshes and textures, so something like

*.IMF -- Irrlicht Mesh Format

and

*.ITF -- Irrlicht Texture Format

?

and then you just convert your data to these formats before use with the engine to allow maximum speed during loadtime? well goodluck elander, thats quite some work ahead of you :P
Post Reply