File format for 3D Meshes and Animations

Started by
14 comments, last by Doug Rogers 8 years, 7 months ago

I am quite new to the 3D-part of rendering. I was wondering what'd be the best way to load and display animated models on the screen. Searching the Net, I found a lot of people recommending to write a custom file format for the models and the animations.

This seems like a pretty complicated task, and I was hoping if there were any documentation available on the subject. I didn't manage to find any myself. Furthermore, I was wondering if it would be better practise exporting to my custom file format from an intermediate file format, like FBX, or write a Maya or Blender exporter.

If anyone could help me out with these questions, that'd be awesome.

Thanks in advance!

Advertisement
Hi.
If you're using d3d, you could start with using the X file format. Which is relatively easy to read using microsoft's "official" d3dx (or replacement) library. If you aim high, you could start with writing a custom file exporter, taking other frequently known formats (3ds, max, obj, X, etc.) as input. Using a library like assimp for this makes life easier (you don't have to learn all the nuts and bolts of each format). That way you can export any format to the format your engine accepts and processes most efficiently.

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me

Hi.
If you're using d3d, you could start with using the X file format. Which is relatively easy to read using microsoft's "official" d3dx (or replacement) library. If you aim high, you could start with writing a custom file exporter, taking other frequently known formats (3ds, max, obj, X, etc.) as input. Using a library like assimp for this makes life easier (you don't have to learn all the nuts and bolts of each format). That way you can export any format to the format your engine accepts and processes most efficiently.

I am working with OpenGL, so I can't use the X file format.

I thought about using assimp, but I heard it looses quite a bit of information.

you can use.x with everything you want.

Don't waste your time with *.x files.

Just grab the Assimp library from GitHub and use it.

If Assimp isn't your thing (I highly doubt) you could go heroic and use FBX SDK.
If you want to go Mythic? write an export plugin.

It is normal to export to .FBX (or sometimes .DAE) and then build your own file format via the Autodesk® FBX® SDK.
Maya -> FBX -> Custom Format

There is no need for a guide on how to do this. You need to know how to use the Autodesk® FBX® SDK (or how to parse whatever intermediate format you choose) but the decisions on what goes into your file and how are entirely your own.


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

It seems like I will go with COLLADA (.dae) because FBX is proprietary and has no C bindings.

You might also want to check out OpenGEX:

http://opengex.org/

You might also want to check out OpenGEX:

http://opengex.org/

I read a bit about that, but it doesn't really seem to have a lot of support (there's a few unofficial exporters I suppose). I also read a lot of criticism on the way it stores stuff. (For example animations are part of a mesh)

You might also want to check out OpenGEX:

http://opengex.org/

I read a bit about that, but it doesn't really seem to have a lot of support (there's a few unofficial exporters I suppose). I also read a lot of criticism on the way it stores stuff. (For example animations are part of a mesh)

The exporters on the opengex.org website are official. As for the criticism, please realize that not everyone who posts an opinion on the internet has the same qualifications. Some people are educated and experienced, and they probably know what they're talking about. Other people have never actually been a professional software developer, and yet they like to bash everything as if they were some kind of expert. There is a lot of praise for OpenGEX out there in addition to the few negative opinions you might have read. It's up to you to decide whether somebody's opinion actually holds water based on their qualifications. And if you can't find out what their qualifications are, then they probably don't have any.


I read a bit about that, but it doesn't really seem to have a lot of support (there's a few unofficial exporters I suppose). I also read a lot of criticism on the way it stores stuff. (For example animations are part of a mesh)

You should consider, that most intermediate formats are really only a temporary step between your modelling tool and your game. FBX and collada are really bloated and are not suited for any serious game project. A common way is, to export to one of the intermediate formats and then convert these formats to a custom format which will be used by your game.

I've used collada for several years, but the (blender) support was really bad and the format is quite complex. Afterwards I have written a custom FBX reader I use up to now. The FBX format is structured in a more clearly way, but it is not a open format.

I would have wished, that I know about OpenGEX before I wrote my FBX converter. Collada and FBX are not designed to be used in a game engine and have lot of stuff which is not really useful in game development, OpenGEX has been designed to be used by games and I would try it out first nowadays.

This topic is closed to new replies.

Advertisement