Jump to content
  • Advertisement
Sign in to follow this  
striker87

How to make a parser for fbx

This topic is 2543 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 was wondering if there are any tutorials on how to write a parser so I can parse a .FBX file into my own format. I'm using 3ds 2011 to make my models and if you have any suggestion of a better format to export to I'd like to hear that as well. Any suggestions and advice will be greatly appreciated.

Share this post


Link to post
Share on other sites
Advertisement
I wouldn't try to parse FBX. There's a library available for extracting information from it, isn't there?

I've heard painful stories of people trying to extract info from FBX. Seems great as a format to interchange between apps, maybe overcomplicated for someone's pet model format

I personally just use JSON and wrote an exporter to get the data I need in an easy to understand format

Share this post


Link to post
Share on other sites
I believe there is an FBX sdk, you can probably find it at the autodesk site. Although I would advise against using a complicated format like fbx if you have 3d studio. Youre probably bettter off building a plugin with the 3ds max sdk that exports to your own format.
There are C\C++ libs for JSON, its just formatted text, doesnt really belong to any one language.

Share this post


Link to post
Share on other sites
I remember it took the XNA folks a few iterations to get their FBX importer up to snuff; it's a complex format and not for the faint of heart. If you're interested in supporting one of those grand interchange formats, what about Collada? You could use ASSIMP to gain that support, as well as for other formats too.

Share this post


Link to post
Share on other sites
I've just specified my own simple model format and loader (in SlimDX / C#). Working on an fbx parser now. Not sure how far I can take it, but I'll let you know in the coming days / weeks how successful I am. If you're using C++, you should look at the Maya API and build an exporter. I would except I hate C++ and refuse to use it. And as mentioned, there is an fbx sdk, which again is C++, so you should look at that.

If you want to just write your own parser as I am, go for it, what I'm finding is that yes, the file format is very verbose, but you can ignore most of it, just parse through to the objects block, there you'll find your vertices, indices, normals and your UV's. I'm going to constrain my models (to start with) to single mesh models, though I'm guessing it won't be impossible to extract multiple mesh parts, though I'll have to update my Model format first. Even single mesh models should give me a lot of power to start getting models out of max/maya and into SlimDX.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!