Jump to content

  • Log In with Google      Sign In   
  • Create Account

COLLADA or FBX?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
17 replies to this topic

#1 remmus   Members   -  Reputation: 72

Like
0Likes
Like

Posted 13 May 2013 - 06:08 AM

Which one is better for importing assets with skeletal animation and why: COLLADA or FBX?



Sponsor:

#2 RobTheBloke   Crossbones+   -  Reputation: 2341

Like
1Likes
Like

Posted 13 May 2013 - 09:13 AM

Neither and both. Evaluate the API interfaces and choose the one that seems most sane to you.



#3 Grimshaw   Members   -  Reputation: 655

Like
0Likes
Like

Posted 13 May 2013 - 10:03 AM

I'd really use Assimp for this. They're both a mess, and vary from the modeling packages you use to export them.. Assimp will make your life easier in every way and will probably increase the odds you get something reliable working.


Indie Game Developer - Daeva Theory Studios

 

Twitter - Facebook

 

Next

Terra - rise of mankind

 

Previous

SFML Game Development (Book)


#4 RobTheBloke   Crossbones+   -  Reputation: 2341

Like
1Likes
Like

Posted 13 May 2013 - 10:50 AM

I'd really use Assimp for this. They're both a mess, and vary from the modeling packages you use to export them.. Assimp will make your life easier in every way and will probably increase the odds you get something reliable working.

 

That's just a collada problem primarily - and assimp won't make that problem disappear.



#5 remmus   Members   -  Reputation: 72

Like
0Likes
Like

Posted 13 May 2013 - 12:35 PM

But what problem has COLLADA?I searched a liitle on google and i found that fbx is buggy.But COLLADA seems very clean and it has animation,skeletal animation,uv,materials etc.. And it has also a very good physics simulation integrated,with Bullet Physics(used also by GTA IV and V!!) and other engines...materials with friction etc....


Edited by remmus, 13 May 2013 - 12:40 PM.


#6 L. Spiro   Crossbones+   -  Reputation: 14262

Like
1Likes
Like

Posted 13 May 2013 - 12:38 PM

FBX is the clear winner and for a very good reason: It supports inspecting a scene at any given time within an animation.

 

Actually you don’t really need to inspect the scene at various times within an animation but it can help beginners with some things.

However, it makes it implicit that tracks can be evaluated at certain times within animations.  At run-time you want to perform only linear interpolation between key frames, as linear interpolation is the fastest.  In practice, there are many ways to perform interpolations between key frames, but using the FBX SDK you can create a run-time system that only uses linear interpolation.

 

Basically you run through an animation and set a bunch of key-frames, then you eliminate any key frames that don’t change the result if linearly interpolating between the 2 key-frames around it.

 

The FBX SDK will generate all the values for each track considering each interpolation mode for you, so with the FBX SDK it is very easy to handle efficient animations and key-frame reduction.

 

 

L. Spiro


It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#7 remmus   Members   -  Reputation: 72

Like
1Likes
Like

Posted 13 May 2013 - 12:51 PM

but collada has the linear interpolation integrated...so you just make the animation in your 3d programme and import it to your game when it is needed...also fbx is very buggy and people who worked with fbx sdk are very unpleased...



#8 L. Spiro   Crossbones+   -  Reputation: 14262

Like
1Likes
Like

Posted 13 May 2013 - 07:34 PM

I’ve worked with FBX for years, I have encountered no bugs, I am not displeased (I have gripes with it but the same gripes apply to COLLADA, mainly being related to lack of support for physically based material values), and COLLADA does not have “integrated linear interpolation”.  That’s a misleading term for “scene evaluation”.  You can linearly interpolate between frames of any format.  The difference is that FBX will actually evaluate the scene at any time within an animation and will handle different types of interpolations between key frames, such as evaluating Catmull-Rom splines and stepping.

 

The point is not all animations are linearly interpolated, but FBX handles multiple types of interpolations for you when running over an animation track and allows you to reduce the track to nothing but linear interpolation.  COLLADA doesn’t.

 

Also, did you just suggest that you would import directly from COLLADA to your game?

 

 

L. Spiro


It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#9 RobTheBloke   Crossbones+   -  Reputation: 2341

Like
2Likes
Like

Posted 14 May 2013 - 08:22 AM

But what problem has COLLADA?



There is only really one flaw. It attempts to write data into 'common profiles', and also allows 'custom profiles'. The theory is that anything you write into the common profile will work with all packages. In practice, what actually happens is that a lot of exporters simply dump data into a custom profile instead. This can lead to a number of if(max) elif(maya) elif(xsi) code constructs.

It's not really a deal killer though - it's just something you might encounter if you need to support mroe than one of: Max/XSI/Maya/Houdini.

FBX is the clear winner and for a very good reason: It supports inspecting a scene at any given time within an animation.



That argument is a fallacy. The question here is which data transfer protocol is most useful for the OP. Being able to evaluate animation and geometry deformations does not help you transfer data, it's just another feature that you won't be using within your game.

At run-time you want to perform only linear interpolation between key frames, as linear interpolation is the fastest.
In practice, there are many ways to perform interpolations between key frames, but using the FBX SDK you can create a
run-time system that only uses linear interpolation.



No. At the very minimum you want to use normalised linear interpolation for rotations, and linear interpolation for everything else.

Basically you run through an animation and set a bunch of key-frames, then you eliminate any key frames that don’t change the result if linearly interpolating between the 2 key-frames around it.



That's one of the worst compression schemes available for runtime animation systems. It fails to provide any random access capabilities at all, so you'll be forced to utilise precious memory bandwidth to find the correct keys. It simply won't scale.

The FBX SDK will generate all the values for each track considering each interpolation mode for you, so with the FBX SDK it is very easy to handle efficient animations and key-frame reduction.



As will Maya, Max, Xsi, Motionbuilder, Endorphin, Morpheme, Houdini, and even blender. That kind of processing is best left to the artists. Doing it at the asset packaging stage is only going to introduce animation accuracy glitches that will only appear within the game. Taking the control of anything away from the artists is always a bad idea imho.

I’ve worked with FBX for years, I have encountered no bugs, I am not displeased



Appeal to authority fallacy.

I've worked with FBX for years, and I think it's a horribly broken system that requires far too much hand holding from animators to make it work reliably.

By far the biggest problem with FBX is the excessive number of memory allocations the SDK utilises when performing interpolation internally (pretty much one alloc per float-key). It's just about ok to sample the keys from a single character, but if you have multiple characters & takes within an FBX, then you will have to start jumping through numerous hoops to keep the number of allocations within check (as in, you will be writing a custom memory allocator for the library, usually followed up by an extremely unhelpful chat with the Autodesk devs).
 
The second related problem, is that FBX has a notorious failure rate as soon as you start using secondary animation generated from expressions / constraints / IK rigs / etc. Now, if you've never seen it go wrong, you're ether not doing anything that complicated with it, or you're working with a bunch of artists who know how to correctly bake out their animations before export. If you are simply exporting characters from Maya or XSI, FBX will fail more often than not. I'd go so far as to say that most animation/rig import problems I saw when working on morpheme, were as a direct result of FBX.

Collada has pros and cons.
FBX has pros and cons.
dotXSI has pros and cons.

Evaluate them all yourself, and choose the one that works best for your project. They're all crap in one way or another, so don't spend too much time worrying about the right choice....
 

#10 remmus   Members   -  Reputation: 72

Like
0Likes
Like

Posted 14 May 2013 - 04:51 PM

Rob,thanks for this opinion.I decided to use COLLADA,because i don't need anything but 3dsmax...:D. And,if you use more 3d programmes, you can import all your models to 3ds max and then export to *.dae ...also,3ds max will make the best rigging for you(biped),that's why i don't see why would you choose another programme for that...so,collada has more pros than the others,and(for me) no cons...



#11 Promit   Moderators   -  Reputation: 7608

Like
0Likes
Like

Posted 14 May 2013 - 05:24 PM

I've been fairly happy using 3dsMax -> FBX SDK for all of our work. It seems to behave far more consistently than anything else, plus the FBX SDK can load Collada and a few other things. The FBX APIs are kind of wonky and it's a hassle to do initial setup, but once it works it's pretty solid.


Edited by Promit, 14 May 2013 - 05:25 PM.


#12 jellyfishchris   Members   -  Reputation: 300

Like
0Likes
Like

Posted 15 May 2013 - 12:38 AM

FBX hands down, after writing my own collada loader and fbx loader as part of a personal project. FBX is much much much easier.(For me atleast)



#13 L. Spiro   Crossbones+   -  Reputation: 14262

Like
1Likes
Like

Posted 15 May 2013 - 05:16 AM

Rob,thanks for this opinion.I decided to use COLLADA,because i don't need anything but 3dsmax...biggrin.png.

That doesn’t make sense. 3DS Max can export .FBX files just as well as .DAE files. What RobTheBloke wrote in reply to my reply is almost entirely inaccurate. For example:

Being able to evaluate animation and geometry deformations does not help you transfer data, it's just another feature that you won't be using within your game.

Transferring data, no, converting data, yes. As mentioned there are multiple ways to handle interpolations in animations, for example between X and X+1 keyframes we use stepped interpolation, meaning we pick either value from X or X+1 and use that the whole way between key frames. And which value we pick (X’s or X+1’s) is a parameter of the interpolation, expensive to evaluate at run-time. Again, you want to reduce this to nothing but linear interpolation at run-time to avoid run-time overhead of branches etc. for various types of interpolations.

That's one of the worst compression schemes available for runtime animation systems. It fails to provide any random access capabilities at all, so you'll be forced to utilise precious memory bandwidth to find the correct keys. It simply won't scale.

Being unable to provide random access to any time within the animation is simply false. Either way it’s a key-frame system. The only difference is that with my suggested way you always know how to interpolate between key frames and there are no branches. Either way, you can always go to any point in any animation—as far as that is concerned there is no difference in run-time overhead or capability.
This reply simply doesn’t make sense, as both methods use key-frames and allow random access. The method I explained avoids run-time branches because the interpolation is known in advance. Knowing the method of interpolation in advance does not prevent random access. It’s simply absurd to say so.


I am sorry if you have decided to use COLLADA. I outline their primary differences in my upcoming book and FBX is, despite its shortcomings, still the way to go. FBX actually has an SDK, for example. Autodesk is also aware that I am adding a chapter about the FBX SDK in my book and have agreed to fact-check it, but at the same time they know this is going to be a published work that reflects back on them, and I believe they are going to fix some of the gripes I have with the FBX SDK. We will see if that actually happens, but in the case of COLLADA we can be certain it won’t. They both have severe shortcomings in a lot of ways but at least there is hope for FBX.


L. Spiro

Edited by L. Spiro, 15 May 2013 - 05:17 AM.

It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#14 _swx_   Members   -  Reputation: 990

Like
0Likes
Like

Posted 15 May 2013 - 05:55 AM

FBX SDK is so much easier to work with than any of the COLLADA libraries. It is also nice with native support for FBX in all Autodesk products. COLLADA support is very poor in most applications. Sure, FBX is not perfect but it's much better than COLLADA.

#15 remmus   Members   -  Reputation: 72

Like
0Likes
Like

Posted 15 May 2013 - 09:56 AM

But i find FBX SDK hard...i don't find any tutorials about FBX SDK. how have you learnt it?



#16 HyperV   Members   -  Reputation: 872

Like
0Likes
Like

Posted 16 May 2013 - 01:14 AM

But i find FBX SDK hard...i don't find any tutorials about FBX SDK. how have you learnt it?



there are alot of information about the SDK at the Autodesk webpage about the SDK ,they even give you examples about how you implement them into your source 

 

here are some links that could help you otherwise Google is your Best friend

http://www.autodesk.com/products/fbx/overview


http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=14376160



#17 remmus   Members   -  Reputation: 72

Like
0Likes
Like

Posted 17 May 2013 - 03:02 PM

But is it free? May I use it for commercial games?



#18 Promit   Moderators   -  Reputation: 7608

Like
0Likes
Like

Posted 17 May 2013 - 03:32 PM

The FBX docs are... minimal. The way to learn to use it is basically to follow their ViewScene sample code, which actually goes through all the necessary (and many optional) steps to load stuff. It's not the easiest thing, and I definitely had a day or two of frustration trying to understand what they were doing. Once things fall into place though, it works well.

 

And as far as I know it's free and fine for commercial.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS