Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

After careful consideration to use middleware, I have decided on creating my own 3d file format format to export meshes from 3D authoring application (Softimage) into my game.

I will need to export the following:

  • Vertices
  • Indices
  • Normals
  • UVs
  • Material Information
  • Animation information (no clue, how to import it)
  • Collision mesh
  • Game Properties defined within 3D authoring tool (object intelligence, aggressivity, etc..)
  • ..another assets..

Can I kindly ask for a hint, how to construct my custom file format. How to organize data within my files, please? Does anoybody have a good adivce on exporting animation information, especially when the mesh changes its geometry?

I would be thankful for advices that could point me into right direction. It would be nice to save some time instead of wasting it on incorrect approaches.

I use Softimage as my 3D authoring tool. Target platform is OpenGL ES 2.0 running on mobile devices (iOS, Android). Programming language: C++.

share|improve this question
    
Personally it seems like you're going in the reverse order. Figure out what your engine needs (and how it's organized), and then just put that data in a file format. –  Tetrad Apr 29 '11 at 20:32
    
@Tetrad: Thanks for your comment. I have already created the core of my game, so it is basically up to me, how I decide to format the data. I will have to write file importer in my game as well. –  Bunkai.Satori Apr 29 '11 at 20:35
    
What sort of animation are you doing? Keyframed mesh interpolation (one new mesh per animation frame), or keyframed skeletal animation (mesh with vertex weights, bones, etc.)? –  ChrisE Apr 29 '11 at 20:58
    
What sort of collision meshes do you need? Actual meshes, or can you fake it with a cylinder, or what? –  ChrisE Apr 29 '11 at 20:59
2  
I don't mean to be mean--I'm just trying to figure out the bare minimum subset you need for what you are doing. I've done a (pretty fast) binary static mesh format, and some of these questions let us simplify your problem space. Also, you don't mind writing a tool to handle import to your format, do you? If you don't, that also significantly simplifies your issue--you can just use AssImp to digest whatever Softimage puts out, and convert to your own file format (would suggest this, in fact). –  ChrisE Apr 29 '11 at 21:01

1 Answer 1

up vote 0 down vote accepted

Because, I haven't received any answer so far, to provide you with some solution, let me tell you how I solved it.

In the beginning, I use text file format. It is easier to read and debug my application. The text format is based on WaveFront .obj file architecture, and I simply add the tags, as needed.

When I have complete text file format, I will create binary format, that will reflect the data stored directly in my application, so I will minimize the need for parsing, to make the format as fast as possible.

share|improve this answer
    
Am I missing something, but couldn't you just save to a binary format and just adjust your loading algorithm (thus much faster load/read times)? –  The Communist Duck May 18 '11 at 10:27
    
@The Communist Duck It's usually much better to save in a interchange format that can be reopened again in your DCC app, and then compile it to a app specific format. This will reduce a lot of engine/game code and you will have a lot foster loading since you don't have to translate data or change layout. –  void May 18 '11 at 10:58
    
@The Communist Duck: The reasons that led me toward text file format firstly were my skills level. I needed to see what data gets exported from 3D authoring application. When sloving bugs, I needed to quickly edit and change data in the file, to search for the causes of problems. If I go with binary file format from beginning, I thought, things would be too messy for me to progress quickly. –  Bunkai.Satori May 18 '11 at 13:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.