Collada

SPM

Regular
As with OpenGL, a standard, open, physics data exchange like a good thing for cross platform standardisation. Does this have any application in games?

http://www.khronos.org/collada/
http://sourceforge.net/projects/bullet

What New in COLLADA 1.4?

Core Feature Enhancements

* Mesh geometry
* Skinning
* Morphing
* Animation
* Assets
* Data validation

COLLADA FX
COLLADA FX is the first cross-platform standard shader and effects definition written in XML. It targets high-end systems running OpenGL Shading Language (GLSL) and Cg (HLSL coming), as well as resource-constrained systems (OpenGL ES 1.x profile). It provides:

* Next generation lighting, shading and texturing
* High level effects and shaders
* Support for all shader models (1.x, 2.0, 3.0) under CG and GLSL profiles.

COLLADA Physics

* Rigid Body Dynamics
* Rag Dolls
* Contraints
* Collision Volumes
* Enables data interchange between Ageia (PhysX), Havok, Bullet, ODE and other game physics middleware
 
One other thought. This open source physics engine:
http://www.ode.org/
might allow homebrew programmers to try out physics on a Windows PC or PS3 Linux for free, and then translate it to run on Aega or Havok APIs later using Collanda.
 
I've looked at colloda for my home stuff. It seems to be fairly good now, the maya plugins seems to be getting good enough for use and the import/conversion API also appears to be useable. It really wasn't at version 1.

In fact my next bit of work to do is to hook up a colloda import path for my engine.
Biggest issue I have with colloda is the actual project structure itself, there no clear website just a forum, no list of supported features, whats going on in soon etc. In fact it suffers IMHO in the closed shop mentallity that OpenGL ARB has....
For example does it support blendshapes? Harder than you'd think to get a definate answer or information on.
Still for a free exporter tech, it seems to be better than the MS DirectX one, which is A) buggy as hell and B) hasn't been updated or maintained for a while.

I currently use ODE but the ageia license on PC (free if you support hardware physics) and colloda intergration are tempting me to have a go at that but so far I'm ODE based.
 
[EDIT]
Warning I get into a rant here. Sorry

I'm pretty sure collada was initally intended as a geometry/scene format more than physics.?? maybe.

I've been toying about with collada a bit myself.
I'm considering writing a full blown data importer, however I'm not 100% convinced so far.

Firstly, I can't help feel it's trying too hard to 'be everything for everyone' format, which has ended up bloating it and making it very difficult for the little guys to implement. It's a big format (500kb xsd schema, with little doc), and as I'm finding out quickly, it is difficult to implement.

The spec seems to be in a state of flux too. Maybe I've done something wrong but my the version 1.3 examples do not appear to be valid to the 1.4 spec (and I haven't found and 1.4 examples either). I might have made a mistake though. However the diffences are only in minor ways - such as the asset tag, but it's still annoying.

Perhaps my biggest complaint comes in the geometry format. The spec allows for arrays of data, which can take any format, normals, vertices, whatnot. However, you use a seperate index list for each data stream to link it all up. This doesn't translate at all well to 3D hardware, and will require extra effort to optimse out redundant data, producing the best ballance of stream size and stream count.

There also seem to be multiple ways that the same data types are stored. Maybe this is just my poor understanding of the format though.
Eg:
a vertex could be 0 1 3.1, where an index may be <p>0 1 2 4</p>. The p tags have no obvious documentation and don't appear to have a purpous (from what I've discovered so far).

The schema seems to be over bloated with a lot of things that shouldn't be there either, there is over 1000 lines devoted to openGL ES state.
Most of the ES state is also duplicated for normal openGL.
Why the hell should a model format have a 'GL_MAX_LIGHTS_index' element? Let alone 'GLES_MAX_LIGHTS_index' too. Urgh.

Furthermore, there are many, many types defined. float,float2,float3,int,int2,bool,bool2,short,uint,listofbools,listofints,listofuints, float5,float7, float1x2,float1x3,float2x1... ETC ETC. a lot of redundancy which gets difficult to parse. Then you have different types of strings.

But it gets worse,

ok, so there is a 'ListOfFloat', ok. fine.
but why is there a:

gl_ListOfFloat
glsl_ListOfFloat
cg_ListOfFloat
cg_float2x1
cg_float1x2
cg_float2
... argh

?
why?
let alone the rest of the formats.

Ok I'm frustrated now :(
 
Last edited by a moderator:
I think it's so complex because it's meant as a data interchange format between tools, and definitely not the format you will stuff on your PS2 game disc.

I haven't looked closely at it but you often get severe design flaws with these commitee designed formats...
 
I do understand it is not designed for run-time use, only for data import. But still, at some stage you still need to pay someone to make that data importer. And I could easily see myself spending a week or more making a solid importer.

There is an example importer available, however it doesn't suit me for a number of reasons.

I got a bit carried away in my previous post I think :)


Are there other alternatives?
 
I would think that the best option is to use Collada only for interchange between tools, and still write an exporter directly in a given tool. Writing a 3dsmax exporter seems to be much simpler than a Collada->game binary tool, and probably more flexable too. I can see no disadvantage of the former approach.
 
Collada was a good idea, make the vendors write and support the reading/writing of an intermediate format,

I can write one exporter, and theoretically support lots of art packages.

The problem is that the Scheme has grown and grown and it isn't really precise enough in some areas. What it's really done is increased the size of my test matrix by the number of art packages I claim to support.

There is also little documentation on how something should be reflected in the Scheme.

It's still a good thing, since it's a read/write format I can consider it a source asset. However it does significantly increase complexity of the backend of the exporter tool.
 
Just another quick nod to ODE. It sure is fun to work with :smile: And I see they just released an update in June (it had been a while).

I haven't really played with Collada yet, but my initial impression is that unless your tool-chain is nearly bottomless, it might not be worth the added effort/complexity. That is, the Unreal engine may benefit from it, but my hole-in-the-wall engine might not.

Anyway, after Graham's rant, I'm not exactly inspired to dig in :LOL:
 
Q&a

(Thanks to Telamon for pointing this thread out)

* Biggest issue I have with colloda is the actual project structure itself, there no clear website just a forum, no list of supported features, whats going on in soon etc. In fact it suffers IMHO in the closed shop mentallity that OpenGL ARB has....

COLLADA has a web site: http://khrnons.org/collada where you will find the specification, the schema, up to date presentations (the latest from SigGraph and Eurographics), some demonstration videos (including physique and FX) as well as links to PR and articles.

It also has a forum: http://www.collada.org, where you can have all your questions answered. Also, COLLADA has now a book, which provide a guide to the specification and a lot of informations about what design principles are enforced. http://www.amazon.com/Collada-Sailing-Digital-Content-Creation/dp/1568812876/sr=8-1/qid=1158710087/ref=pd_bbs_1/002-3971021-9680857?ie=UTF8&s=books


We can always improve the COLLADA presence on the web of course. Could you post your suggestion on the forum.

In regard to the list of supported features, I do not agree that it is not clear what COLLADA does support or does not. The specification and the book will give you that information very clearly and detailed. If you are looking for a bullet point list, you will find this in any of the latest presentations.

But I do agree that it is not clear if a given plug-in has support for a given feature. It is a good suggestion that we make this available. Note that our goal is to define a conformance test, and have products go through this conformance test, which will provide you with a feature list and quality reference for the various plug-ins.

In regards on what is 'going on soon',this information is available on the forum, for example: https://collada.org/public_forum/viewtopic.php?t=570. Please do not hesitate to ask if you need more information.

* There is also little documentation on how something should be reflected in the Scheme.

COLLADA is one of the most documented format, with 298 pages of specification, 250 pages of book, several source code available API such as COLLADA-DOM, FCOLLADA, Whoola, all the plug-ins are available in source code, detailed presentations, and a very active forum. But I agree with you that some aspects still need more clarifications, and we are working on it. BTW, if there are aspects of the spec that are not clear to you, please let us know on the public bugzilla: http://www.khronos.org/bugzilla, we have fixed all of the issues reported there for the 1.4.0 specification in the 1.4.1 patch release for instance.


* I currently use ODE but the ageia license on PC (free if you support hardware physics) and COLLADA integration are tempting me to have a go at that but so far I'm ODE based.

Please note that COLLADA Physics is best supported currently by Maya (with both the NIMA and COLLADA plug-in) and Blender. The 3dsMax AGEIA plug-in claims it export COLLADA documents, but instead export something that vaguelly looks like a COLLADA document.
AGEIA run-time seems to hae good support for COLLADA, including the capability to export COLLADA Physics files from the run-time, which is really good for debugging physics issues.

The Feeling Viewer http://www.feelingsoftware.com/content/view/40/66/lang,en/ has support for physics, which is quite cool. It also support animation, shader FX, skinning, morphing..

* I can't help feel it's trying too hard to 'be everything for everyone' format, which has ended up bloating it and making it very difficult for the little guys to implement. It's a big format (500kb xsd schema, with little doc), and as I'm finding out quickly, it is difficult to implement.

The great thing about COLLADA is its design in libraries. Which means that you can create a COLLADA document that contains only physics, or only Effects, or only a visual scene and extenal reference other documents. This is actually very cool to do concurrent development on a level. You can have artists working in separate packages on their models, have a separate FX library, and use one of the tools to simply instantiate the models, assign the effects. When an artist update their model, simply update the reference.

This work really well with tools like XSI for example, where you can use 'GATOR' to take all your skinning/morphing parameters, and apply them to a new instantiated model.

It is really not that hard to implement. Here's an example of another open source physics library where the author implemented COLLADA support in a week or so: http://www.continuousphysics.com/Bullet/
Since this is an open source project, you can look at the source code to see how this is done. Bullet als has support for run-time export of physics data in COLLADA format to help with debugging.

* The spec seems to be in a state of flux too. Maybe I've done something wrong but my the version 1.3 examples do not appear to be valid to the 1.4 spec (and I haven't found and 1.4 examples either). I might have made a mistake though. However the differences are only in minor ways - such as the asset tag, but it's still annoying.

On the contrary, the specification is really stable, and will stay stable for more than 9 months now. The 1.4.0 specification is the first standard specification, published by the Khronos group, everything prior to this is not part of the standard. There is no backward compatibility between 1.3 and 1.4, and the reason is that we needed to make major changes before it became a standard, because once it is a standard, it has to be stable, and no more changes of this nature can be done.

In regards to the samples, I agree this is very confusing since we did not post any 1.4.1 samples ! I have fixed this and now 1.4.1 samples are available, and I removed the post about the 1.3 samples. Sorry about the confusion.

* The spec allows for arrays of data, which can take any format, normals, vertices, whatnot. However, you use a seperate index list for each data stream to link it all up. This doesn't translate at all well to 3D hardware, and will require extra effort to optimizes out redundant data, producing the best ballance of stream size and stream count.

COLLADA is not targeted to be the format to use directly in the game engine, it is designed as an intermediate format for tools to communicate. Some say it is an interchange format, but it really is an intermediate format. Please read this for the details : http://www.hexus.net/content/item.php?item=6664&page=1


This said, COLLADA *can* be used at all level of the pipeline, and it is designed so that you can take the non optimized data that come out of a DCC package (any DCC package), and process it to create another COLLADA document that contain data that is fully optimized for your application. This is quite easy to do so with the COLLADA-DOM. We actually provide a sample tool to do this: Refinery and a bunch of ready to use conditioners. http://sourceforge.net/project/showfiles.php?group_id=157838&package_id=196258

* The p tags have no obvious documentation and don't appear to have a purpous (from what I've discovered so far).

You can see how <p> is used page 111 of the documentation, but I agree that there should be more on this element.

<p> provide the indexes for the vertex attributes that are used in a primitive (<triangle> <polygon> <line> ...)
The number of index per vertex is given by the the max offset of all the <input> of the primitive.

* Most of the ES state is also duplicated for normal openGL.

The shader FX part is the only part of COLLADA that is platform / API specific. You do not have to use this part if you are not doing anything platform specific, and use the common profile for effects. But unfortunatelly, if you want to do advanced effects, you will have to use pipeline description and shader languages that are specific to a given platform. In other workds, those definitions are exclusives, if you are targeting GL ES, you are not considering the OpenGL State.

* Furthermore, there are many, many types defined. float,float2,float3,int,int2,bool,bool2,short,uint ,listofbools,listofints,listofuints, float5,float7, float1x2,float1x3,float2x1... ETC ETC. a lot of redundancy which gets difficult to parse.

COLLADA is strongly typed. This serve a purpose, to be able to validate a document with the schema with standard tools. This is a strong point about COLLADA, and save so much time and money. The more we provide information in the schema about what data is expected, the more the standard validators can do a good job at validating the data.

It may not be the simplest thing to parse, but with the provided COLLADA-DOM and FCOLLADA source code libraries, it is a piece of cake. And if you apply the principle of doing a COLLADA->COLLADA optimization, you can even reduce the complexity of what subset of COLLADA you get at the output, and write a simple parser for your engine.

* Writing a 3dsmax exporter seems to be much simpler than a Collada->game binary tool, and probably more flexable too.
I strongly disagree with this statement, and have several real usage case that indicate the contrary. I would stongly recommand writing COLLADA conditionners, and at the last stage a COLLADA-> binary format. Not only this is simpler to do, but also work with *any* tool you may decide to use. More important, several other tools such as FXComposer can be then mix and matched in your content pipeline....

* The problem is that the Scheme has grown and grown and it isn't really precise enough in some areas. What it's really done is increased the size of my test matrix by the number of art packages I claim to support.

It is true that COLLADA is not your grand-mother simple triangle (obj) format, and have much more expresivity enable. I have seen many implementation relying on sample data, and being surprised that other tools would output something different. But if instead the implementations were done using the speicifcaion/schema, or/and rely on available API such as the COLLADA-DOM and FCOLLADA, this would not be such a problem.

But you are right that sometime the specificaion is not clear enough, and we are often surprised to find out how many ways can different people interpret the same sentence of the specification ! The COLLADA community would be obliged if you would notify on the public bugzilla what part needs to be clarified.


* That is, the Unreal engine may benefit from it, but my hole-in-the-wall engine might not.
There are so many open-source engines that are already benefiting of COLLADA. To name a few: C4 engine http://www.terathon.com/, Unity3D http://unity3d.com/, Ogre engine http://www.ogre3d.org/, spineless http://spineless.sourceforge.net/ and many others ..
 
Well thank you for clearing that all up.

There is a lot of needless confusion when it comes to collada.

Most people who will be looking to implement support will go to collada.org.
If on this page, there were clear, *large* text/links saying something like:

'1.4.x is not compatbile with 1.3'
'download the spec here'
'an overview of how the format works is here'
steps to get an implementation up and running quickly, ie, ignore all the GLES stuff, etc, as this was very confusing.

I've been putting a bit of time into an importer recently. Nothing fancy yet, just the raw geometry at the moment.
In the end I basically used a combination of the samples and the schema to implement an importer.

Interesting that 1.3 samples fall over spectacuarly. Any reference to 1.3 really should be removed imo.

collada.jpg


getting there...
 
Last edited by a moderator:
I would stongly recommand writing COLLADA conditionners, and at the last stage a COLLADA-> binary format. Not only this is simpler to do, but also work with *any* tool you may decide to use. More important, several other tools such as FXComposer can be then mix and matched in your content pipeline....
I can believe that - I've not actually attempted to write a COLLADAexporter/convertor myself, so maybe it's easier than people seem to imply ;)

That said, my main beef is with people importing COLLADA (or any similar format) directly into a production game engine. A run-time import of raw art data can be useful in development, but I see no excuse for using anything other than a pretty-much-direct binary dump for the release version. Even in development the tool chain could just as easily output a game-ready binary (potentially from a COLLADA file).
 
Last edited by a moderator:
IMO Collada works as intended.

I think we here are approaching it from the wrong angle; this isn't for your game engine, though it could be.
 
I'll just state I never said or believed collada was a good format for storing data in. I knew it was a intermediate format. It doesn't change the fact that it was very confusing; simply having examples in one format, and a schema in another was enough to drive me utterly bonkers. But thankfully that is being cleared up.
 
There is a lot of needless confusion when it comes to collada.

Most people who will be looking to implement support will go to collada.org.
If on this page, there were clear, *large* text/links saying something like:

'1.4.x is not compatbile with 1.3'
'download the spec here'
'an overview of how the format works is here'
steps to get an implementation up and running quickly, ie, ignore all the GLES stuff, etc, as this was very confusing.

Thanks for the feedback. I just wrote a 'getting started guide' https://collada.org/public_forum/viewtopic.php?p=2145. Please let me know if you think of ways to improve it.

Regards
 
Back
Top