3D geometry/animation and what file format to use

So I was thinking up some different ways to load meshes, and animations into my game engine. Although I like OBJ files, and their really easy compatibility with graphic libraries that rely on geometry like OpenGL, they don’t really have very many animation options… None at all I think. I also looked into ID-Software’s MD5 skeletal animation system, and I was considering that.

I’ve done some research, and some brainstorming, and I’m really confused on what people normally use for this kinda thing. I really only need 3D geometry information + linear-interpolated animation. But that’s easier said than done. :confused:

I’ve also searched around the forums, and I couldn’t find anything useful…

Hi

Maybe have a look at Collada. It’s too much for you if you just need key frame animations. You can look at MD2 and MD3 too. Feel free to look at our importers in JogAmp’s Ardor3D Continuation. The problem is that there are a few animation formats correctly supported by most modelers (including Blender). In my case, I have an exporter to WaveFront OBJ even for key frame animations in order to use full animations and keep the compatibility with the modelers. MD5 is a lot harder to support than MD3 especially if you don’t use skeletal animations. My source code is on Github:
https://github.com/gouessej/Ardor3D/tree/master/ardor3d-extras/src/main/java/com/ardor3d/extension/model

What really irks me is that the FBX format is supported by Maya, 3DSMax, Blender, and Cinema4D, but not a single importer can be found for games, so you’d have to write your own. \rant

Anyway the down side with using .obj files for animation is that you’re using a bunch of memory for meshes and the animations won’t always be smooth if you have stutters in frame-rate.

COLLADA has tons of info/tuts on it so that would be one of the easiest ways to go.

As far as I know, LibGDX has a FBX importer, please can anybody confirm? The problem is that this format is neither open nor standard. In my humble opinion, if you really want to use it, export your models both in binary and in ASCII. It would be safer not to use it to store your models on the long term. I’ll explain those things in details in my next tutorial about JogAmp’s Ardor3D Continuation.

Actually, the format of the file that you use in input has an impact on the duration of the import, sometimes on the accuracy of the data, but most of the time it has no impact on the animation themselves except if you load each key frame one by one at runtime when you animate a model, which is typically what I don’t do. You can use a format to store your models on the long term, another format more suitable to edit your models in any modeler and another format to load your models faster in your favorite engine. This engine should store the data of your meshes and the key frame, a float is a float whatever its origin. I’m not sure that using a WaveFront OBJ file for animations is noticeably worse than using a Collada file as in both cases, I assume that the modeler loads all key frames in memory. Yes any ASCII format uses much more memory, there are different formats for different needs.

Collada is well documented but it takes a long time to support all its features when writing an importer. You can implement only a subset of them if it’s enough for your need.