Jump to content
  • Advertisement
Sign in to follow this  
SanePumpkins

File format for 3D Meshes and Animations

This topic is 1127 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
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.

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!