Sign in to follow this  

File format for 3D Meshes and Animations

This topic is 820 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Edited by imoogiBG

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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)

Edited by Binero

Share this post


Link to post
Share on other sites

 

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.

Share this post


Link to post
Share on other sites

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.

Edited by Ashaman73

Share this post


Link to post
Share on other sites

FBX and collada are really bloated and are not suited for any serious game project.

…we’ve used FBX in several projects at work here, as well as on all of my own engines (in all cases as an intermediate step before out own proprietary formats, of course).


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

Perhaps not useful in hobbyist game development. We use(d) quite a lot of it, and if we don’t support something it is at least nice to know it is there if we want to support it later.
You also get to select what you want to load from an FBX file, so in the end excess data is neither cumbersome nor slow. It’s just there if you need it.


L. Spiro

Share this post


Link to post
Share on other sites

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.

 

The exporters on opengex.org aren't official, in the sense they weren't made by the tool they are for. Blender and AutoDesk seem to not really care about the format that much. I completely agree with your point about criticism, but I don't know of anyone who uses it and is content about it. People in this topic seem to recommend it without having ever used it themselves. This makes me a bit skeptical about the format. 

Share this post


Link to post
Share on other sites

 

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.

 

The exporters on opengex.org aren't official, in the sense they weren't made by the tool they are for. Blender and AutoDesk seem to not really care about the format that much. I completely agree with your point about criticism, but I don't know of anyone who uses it and is content about it. People in this topic seem to recommend it without having ever used it themselves. This makes me a bit skeptical about the format. 

 

 

Didn't Eric create the OpenGEX format and actively uses it in the C4 engine? lol

Edited by Syntac_

Share this post


Link to post
Share on other sites

 

FBX and collada are really bloated and are not suited for any serious game project.

…we’ve used FBX in several projects at work here, as well as on all of my own engines (in all cases as an intermediate step before out own proprietary formats, of course).


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

Perhaps not useful in hobbyist game development. We use(d) quite a lot of it, and if we don’t support something it is at least nice to know it is there if we want to support it later.
You also get to select what you want to load from an FBX file, so in the end excess data is neither cumbersome nor slow. It’s just there if you need it.


L. Spiro

 

Sorry to be unclear on this topic, you are right.

I mean, that FBX/Collada will not be used directly in a game engine using one of the SDKs, but only in form of a converted, game engine internal format. I think, that FBX (Collada) are the standard way (using a converter) to get you model data into your game nowadays.

Share this post


Link to post
Share on other sites

I went through exactly this so let me tell you what I do. I export my models, including animations, to FBX files. I then use the FBX SDK to import them directly to my engine:

 

3ds max -> export as fbx file -> load fbx file in engine (using fbx sdk)

 

I plan on doing the following now that the hard part is done:

 

3ds max -> export as fbx file -> convert fbx file to custom format (using fbx sdk) -> load cutom format in engine

Share this post


Link to post
Share on other sites

I agree with L. Spiro.

 

Export FBX from your art tool and convert that to your own internal format using the FBX SDK in a separate tool.  There are some things that do not convert well from FBX, but those are rare.  You also will not have to create your own exporter this way, just a conversion tool.

 

The issue with using FBX files directly is that the FBX format is not well suited to real time rendering.  It needs some processing that can be done offline.  Creating your own conversion tool frees you from having to use the FBX runtime in your app.

Edited by Doug Rogers

Share this post


Link to post
Share on other sites

This topic is 820 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this