How to create a new 3d file format ??

Hi,

I’m actually writing a 3d engine and i would like to create a plugin who will export from 3D Studio Max 4 all the data of an object such like vertex, face, materials, etc into a new 3d format file that i ll can load in my engine.

Is there any tutorials on this subject or web sites ?

In terms of data layout, look to existing data form,ats such as obj,ase etc. these are usually laid out quite thoughfully, but are often lacking in certain areas.

If its trouble coding the export plugin, then have a look on www.highend3d.com , they have a few useful formus for people writing plugins.

Thank you man !!

Look at the ascii file format this is a very easy to use format. It lacks data for normals and texture mapping. But colour and alpha levels are stored.

there you go!! already made for u!! http://nate.scuzzy.net/programming/

Before you design it decide what the aim of your file format is. Like at one end of the scale you could have a quick loading format which just stored materials and vertex data sorted by material then load the whole lot in one and just assign pointer offsets. The other end of the scale would be a format that included the object hierarkey in a chunk based format so as to allow for version control of your file elements. There is a middle ground the first example being for a game system where you don’t want memory fragmentation on loading i.e a console and the second format being for some kind of editor you may want to build.