I understand that I'm quite new to this community and this engine, but I'm no stranger to game programming, or render technologies, and I gladly jump at the opportunity to aid an open source project. Especially one that is organized and has a good following.
I intend to create a mesh file format just for irrlicht. There are multiple reasons I think this is a big requirement for this engine, but the two biggest I see are speed, and control. Having a native file format would give irrlicht more control over a mesh, and would make it quite easy to serialize the file in and out of irrlicht. The feature list I have come up with is as follows:
- Basic Mesh data - That is vertices and indices, and important vertex information such as position, format, color, and normal information
- Frame Transformation Data - Most likely stored in matrices as its the easiest to work with (at least in my experience) and would allow for mesh defomration animations.
- Material information - That is U-V coordinates and a material script that can be used to "template" different material "effects" or maps
- Serializer
- Access to vertex/index buffers
- Bounding box/ellipse
- Sub-Meshes - These would have to be created by the modeling program by spliting a mesh into different polygons, which varies depending on the program.
- Skeleton - Structure for storing bone information. Not sure if I would take the same approach as Ogre did by using a seperate file for skeleton structures, or just embed the information into one file.
First of all I intend to implement this format using xml, because its easy to read, write, and serialize (at least in my experience). The root of the file will be an irrMesh. An irrMesh consits of subObjects, which consits of faces, and geometry. A subObject has a material parameter.
Each geometry object has vertex buffers, which of corse hold vertices. Vertices contain position, color, normal, and texture coordinate information.
Code: Select all
<irrMesh>
<subObject material = "some.mat" >
<geometry numVertices = "1">
<vertexBuffer XYZ = "true" normals="true" texCoords = "1">
<vertex>
<Position>
<X>50</X>
<Y>0</Y>
<Z>20</Z>
</Position>
<Normal>
<X>0.0308391</X>
<Y>-0.998866</Y>
<Z>0.0362719</Z>
</Normal>
<texture>
<U>1.0</U>
<V>1.0</V>
</texture>
</vertex>
</vertexBuffer>
</geometry>
</subObject>
</irrMesh>
I have not worked out how I'm going to fit the transformation data in there. Perhaps each subObject will have frame entries that hold transformation data, similar to the way .X stores its transformation data.
I also plan to make a bone representation similar to the Ogre skeleton format, but I want to get the above working first.
You can see how information can easily be imported into the engine with this layout. The biggest challenge of corse is writing all the exporters for modeling programs. There is the option of making a converter similar to the one LightFeather uses, but I'd rather start with all the information from a modeling program, rather then use the limited information of an exported file.
At any rate, I'll keep you all updated on my progress, and if there are features I left out, which I'm sure there are, please do let me know. Of corse I could always use a hand, so if anyone is interested in helping drop me a line.[/code]
