   General questions about Collada
  Dear GDNet communityOnly recently have I started to get interested in Collada which is, if I understand correctly, a standardized, XML-based description format for assets such as models, textures, lights, and so on.I had started to write an exporter kind of in the same fashion, that is XML based files describing the exported asset, regardless of the authoring tool and the target platform. However (obviously) Collada stands a billion light year forward from my custom format, which is why I'm very tempted to switch to Collada instead of failing at reinventing it ;)however, I'm still a bit afraid by the number of features Collada supports (sometimes too much is not better than not enough...) For example, I saw that a Collada file describing a single model can take as much as 6 MB. What will it be then when I will export complete scenes or worlds? Too big files can be a pain to manipulate or to manage under version control. Does anyone here has some real world experience to share on that point? For example, I was wondering if popular collada exporters (3dmax, maya...) have some options allowing not to export useless stuff and reduce the file size.Most stuff I read about Collada presents the format as totally cool and flawless, so I'd be interesting in other people sharing their actual experience with it.Regards   
  Collada is a vast format, it supports a lot of stuff like physics, inverse kinematics, breps, etc. Would you need a lot of this stuff?It all depends on what you want to use it for. Is it going to be the file format that all your engine assets use? A format you use to export files from DCC tools like Max, Maya, etc and process into a format suitable for your game engine? Can you preprocess the file to strip out un-necessary information from the file (like physics information if you aren't going to use it for physics)?The size of a Collada file varies depending on the model, there are some models for which the file size is actually smaller than a binary format like a .fbx and vice versa. I've seen a skinned animated model with 9000 triangles and a 3 second animation clip where the file size is about 1 MB less than the same model exported with the .fbx format from Max, probably because a value like 0.0 just takes 1 byte in Collada because it is output as "0" and the same 0.0 would take 4 bytes in a binary file. Like any file format it possesses advantages and disadvantages. The advantages are that it is very flexible and can handle a lot of things, it is human readable while makes it easy to inspect, it is a fairly stable format, it is supported by all major DCC tools, etc. The disadvantages are that the file size can be larger than a custom binary format, it may be overkill for just getting a bit of mesh data into your home brew app, etc.My advice would be for you to take a look at the Collada specification, try to understand how it works, decide if it is good for what you plan to do with it, then decide to use it or not based on your investigation.   ;Quote:Original post by hughelCollada is a vast format, it supports a lot of stuff like physics, inverse kinematics, breps, etc. Would you need a lot of this stuff?Eventually I will, though my focus is somewhere else presently (models geometry and skeleton)Quote:Original post by hughelIt all depends on what you want to use it for. Is it going to be the file format that all your engine assets use? A format you use to export files from DCC tools like Max, Maya, etc and process into a format suitable for your game engine? Can you preprocess the file to strip out un-necessary information from the file (like physics information if you aren't going to use it for physics)?No of course I don't plan to use collada format for runtime assets, only as an intermediate format. I thought of the possibility of striping out the unused stuff but I'd like better not to add another layer in the export pipeline, if possible. I'd rather have this handled directly by the collada exporter.Quote:Original post by hughelit is supported by all major DCC toolsThat is indeed the biggest advantage for me as I'm not too tempted to spend a ton of time writing exporters... Quote:Original post by hughelMy advice would be for you to take a look at the Collada specification, try to understand how it works, decide if it is good for what you plan to do with it, then decide to use it or not based on your investigation.I'v started to do that already, the specs are about 600 pages worth of reading but only a small subset of it is relevant for me now (stuff about geometry, meshes and so on)thanks for your reply.;  To handle it all in the export and not have to introduce an extra processing stage, you would need to modify the exporter code for a free exporter or write an exporter yourself. This isn't a trivial task as I'm sure you are aware (especially since the Collada specification is so vast) and you would end up having to modify existing exporters or write exporters for each DCC tool your plan to support which would negate the usefulness of having it supported by all the major DCC tools.I've only used the bits of the Collada file format that deal with mesh/material/shader constants, skeletal animation and morph target animation. You can pick and choose what you use from a Collada file. The free 3DS Max exporter (source code is available) from Feeling Software lets you export pretty much everything I have dealt with but the export options aren't very detailed. I know they do a free Maya exporter as well, and the export options seem to be far more detailed. I think they have stopped supporting the free version of the exporter though.   ;Quote:Original post by jantaMost stuff I read about Collada presents the format as totally cool and flawless, so I'd be interesting in other people sharing their actual experience with it.RegardsThat's quite funny. Once you get into the details you will see that Collada is far from flawless.The format is much more complicated than it needs to be, the documentation is lacking and the sample application source code (which serves as adhoc documentation) is simply atrocious. ;  Well I doubt not there are flaws (otherwise I wouldn't have created this discussion) but what I really wonder is whether I'll do better with my own format (obviously I won't) Do you have any real world experience to share with me?I guess I'll try it and see for myself anyway   ;Quote:Original post by jantaWell I doubt not there are flaws (otherwise I wouldn't have created this discussion) but what I really wonder is whether I'll do better with my own format (obviously I won't) Do you have any real world experience to share with me?I guess I'll try it and see for myself anywayMy experience, is that using the standard format that comes with engine/toolkit/platform is better than using collada.If that doesn't exist then collada is no worse than any other solution. But collada is only ment as an intermediate. You have to convert it into your own format before use.   