New model format

I want to make a new model format for a game.
I need info on how to write import/export scripts using Python.
Any suggestions?

Thanks.

I don’t recommend re-inventing the wheel, but if you feel you must you could check out Campbell Barton’s (Cambo) OBJ import/export or my MD2 Import/Export. They’re commented very well and should help you get started. Feel free to ask me any questions you have and I’ll try my best to help you out.

cheers,

Bob

We develope an open source 3D RPG
That’s why we need a new model format.
We want to make models in Blender.
We need a complete model format, also skeleton.
So OBJ/MD2 don’t fit.
So far I’ve read of ms3d (MilkShape3D) which seems good, but since it’s non-free (I think) we have to make our own.
Can you advise any info on how to create importer/exporter from scratch? And what info should we im/ex|port?
I.e. I don’t even know where to start…

Thanks.

You can export all the information that you need from blender through the Python API. It shouldn’t be that hard. You could base your format off of a known format. I would recommend the Quake 3 MD5 format for a bone animated model. You should have your format nailed down before you try to write your exporter or you’ll end up chasing your tail.

cheers,

Bob

  1. Is it legal to use MD5 format in an open source project?
  2. Where to find description of MD5 format?

Thanks.

it should be perfectly legal to use the format. It’s public knowledge what the format is. http://www.modwiki.net/wiki/Modelling has the format for the mesh and the animation file.

Cheers,

Bob