Original Post
Hello guys.
After doing a lot of research on what people tend to do with their model assets and the likes, I decided that what I want to do for my game engine is to create a new tool that allows me to convert certain formats (such as COLLADA and OBJ) to my own binary format that will be used by my engine. This seems to make the most sense for both convenience and performance, however I am more or less in the dark when it comes to this because it's all very new to me. For this reason, I would greatly appreciate if I could get some input here to push me in the right direction.
OBJs have worked so far for me. The only reason I'm doing this now is because I'm looking into doing skeletal animation (from Maya). I'll probably end up going with COLLADA, since MD5 is apparently not very supported by Assimp, which is what I'm using to import model/scene data into my converter tool. While reading this, please assume that I'm looking to do this in one of the simplest ways possible. I do not wish to extend this too much, as it will become very time demanding - which I'm rather short on at the moment. :-(
Anyway, enough ranting.
This is the current format I have thought out for my binary file. At the moment it's very basic, and I have no doubt that it's missing stuff.
The location header data would simply be 0 for data that isn't used. When something is non-zero, the importer would go to that location and start reading data. I was thinking of simply putting in tightly packed floating point values, for example "vX,vY,vZ,nX,nY,nZ,tS,tT" for mesh vertex data.
Since I have never done animation before, I do not know if this approach is viable for skeletal and animation data.
Every little piece of advice is helpful! This area of programming has probably bewildered me the most out of all of them until now.
After doing a lot of research on what people tend to do with their model assets and the likes, I decided that what I want to do for my game engine is to create a new tool that allows me to convert certain formats (such as COLLADA and OBJ) to my own binary format that will be used by my engine. This seems to make the most sense for both convenience and performance, however I am more or less in the dark when it comes to this because it's all very new to me. For this reason, I would greatly appreciate if I could get some input here to push me in the right direction.
OBJs have worked so far for me. The only reason I'm doing this now is because I'm looking into doing skeletal animation (from Maya). I'll probably end up going with COLLADA, since MD5 is apparently not very supported by Assimp, which is what I'm using to import model/scene data into my converter tool. While reading this, please assume that I'm looking to do this in one of the simplest ways possible. I do not wish to extend this too much, as it will become very time demanding - which I'm rather short on at the moment. :-(
Anyway, enough ranting.
This is the current format I have thought out for my binary file. At the moment it's very basic, and I have no doubt that it's missing stuff.
<magic_number>
<uint:meshLocation>
<uint:materialLocation>
<uint:textureLocation>
<uint:skeletonLocation>
<uint:animationLocation>
<data:mesh>
<data:material>
<data:texture>
<data:skeleton>
<data:animation>
The location header data would simply be 0 for data that isn't used. When something is non-zero, the importer would go to that location and start reading data. I was thinking of simply putting in tightly packed floating point values, for example "vX,vY,vZ,nX,nY,nZ,tS,tT" for mesh vertex data.
Since I have never done animation before, I do not know if this approach is viable for skeletal and animation data.
Every little piece of advice is helpful! This area of programming has probably bewildered me the most out of all of them until now.