Sign in to follow this  
Long

3D import format - fbx or collada?

Recommended Posts

I have to decide about a new import format for my own 3D Engine.
So far I am using .xsi from softimage but thats not sufficient any more.
So fbx or collada? Or other proposals?

Which one would you recommend?
Which one is more commonly used?
Which one has or lacks important features you need for realtime 3D?
Which one is easier to implement?
Which one is more future-safe?

I would like to use:
Geometry (of course), Normals, UV's, Materials, Texture Filenames, Hierachies, Animation, Skinning & Bones, Custom Parameters...

Of course it would be best to have all formats, but ... (you know).

Thanks, Ole

Share this post


Link to post
Share on other sites
Quote:
Original post by Long
I have to decide about a new import format for my own 3D Engine.
So far I am using .xsi from softimage but thats not sufficient any more.
So fbx or collada? Or other proposals?

I haven't done a lot with 3D recently, but from what I know, Collada is mostly useful as an intermediate format - you probably don't want to support it directly.

Most games/engines use custom (game/engine-specific) formats and provide tools to convert the output of popular modeling tools. Perhaps one of these formats (and toolsets) fits your requirements. Otherwise, you may need to come up with your own and build a couple of tools for it (a viewer, parameter tweaker, whatever is useful).

Quote:
Of course it would be best to have all formats, but ... (you know).

For the engine itself? No. One format should be enough. For the toolchain? All you need to support are the 3D modeling tools that your artists are using.

Share this post


Link to post
Share on other sites
The problem with using popular export formats for your game engine is that many of them (especially collada) are human readable and quite verbose. This becomes a load time nightmare when you have to parse 100k plaintext vertices in an xml tree, you're going to be waiting a long time every time you start your game for these things to parse and load (could be several seconds or more per model).

Consider the difference between parsing a gigantic xml tree and having to search every character for brackets, keywords, proper syntax, and then finally performing a string to float conversion for EACH vertex, versus loading your vertices from a binary format in one line:

float vertices[300000] = file.read(300000*sizeof(float));


Share this post


Link to post
Share on other sites
Quote:
Original post by karwosts
...versus loading your vertices from a binary format in one line:

float vertices[300000] = file.read(300000*sizeof(float));
While I agree with your underlying point about eschewing human-readable formats, I think you're going to want a wee bit more structure in your format than a raw list of floats. :)


Share this post


Link to post
Share on other sites
Quote:
Original post by karwosts
The problem with using popular export formats for your game engine is that many of them (especially collada) are human readable and quite verbose. This becomes a load time nightmare when you have to parse 100k plaintext vertices in an xml tree, you're going to be waiting a long time every time you start your game for these things to parse and load (could be several seconds or more per model).
This is why you shouldn't use the same format in both your game and your content pipeline.

If you use collada throughout your asset pipeline, then all it requires is a small conversion tool to produce an optimised binary format from the collada file.

Share this post


Link to post
Share on other sites
Um, yes I know that. Thats why I wrote "import format" not export or private format.
And thats also why I want to choose and not support them all.
SOME Input format I will need. Otherwhise I would have to write plugins for all those 3D-Programs which I don't want.

Share this post


Link to post
Share on other sites
Quote:
Original post by Long
Geometry (of course), Normals, UV's, Materials, Texture Filenames, Hierachies, Animation, Skinning & Bones, Custom Parameters...

I would choose collada because collada is an open standard, whereas fbx is a proprietary format from autodesk(3d max). Additionally autodesk has a free fbx-collada converter you could use to convert fbx files when using a modelling tool with limited collada export support (like blender).

I use collada files which will be converted to binary game format. This features are supported:
- geometry
- normals
- uv
- materials
- hierachies
- animation
- skinning & bones

I got some issues with texture filesnames, but I blame blender and not collada in this case. Although I don't know if custom parameters are supported by collada/fbx.



Share this post


Link to post
Share on other sites
Check out Assimp, a free 3d file format loading library. Supports many a different formats, among them Collada (and FBX in development).

Collada does support everything you named, though resolving all the cross references to get the actual data isn't trivial. FBX does also support all the features you named, but it's a closed standard which is only accessible through a library they provide. It might be no smart decision to lock yourself into such a closed format, especially when free alternatives are also available.

Share this post


Link to post
Share on other sites

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