Anyone else looking at Collada?

BlitzMax Forums/BlitzMax Programming/Anyone else looking at Collada?

JoshK(Posted 2007) [#1]
With bah.libxml, this might not be too hard to load. 95% of the information in Collada DAE files is garbage, BUT it is supported by every modeling package. So if you can support Collada as an intermediate format to convert to/from all your art pipeline problems go away.

Is anyone else interested in this?


Mark Tiffany(Posted 2007) [#2]
I know FlameDuck's a big fan of Collada.


ImaginaryHuman(Posted 2007) [#3]
Nope.


JoshK(Posted 2007) [#4]
Here is the file spec:
http://www.khronos.org/files/collada_spec_1_4.pdf

And here are some sample files:
http://www.collada.org/owl/browse.php?sess=0&parent=28&expand=1&order=name&curview=0&sortname=ASC

I think it might be best if someone more familiar with xml took a look at the file spec and got this started. I'd like to help once there is some kind of framework, but I don't know anything about xml.


Dreamora(Posted 2007) [#5]
Definitely think that Collada should be one of the default supported file formats in any engine.
Its one of the few "we support everything in a clean way" model formats (similar to what X originally intended to become with its "you can create your own chunks" approach) out there and it is a free format to use.

EDIT:
Josh: What is the offer you would be willing to make to the one writing an importer for this quite wide speced format?
Especially as read in means converting to your own mesh format as well.
On the other hand: there are different free collada loading libraries which you just would need to wrap in BM ...


Jake L.(Posted 2007) [#6]
You want someone write collada support for the engine you're selling? Interesting...


JoshK(Posted 2007) [#7]
If other people are interested in a community project for use with MiniB3D and my engine, I would like to help, but I am not the best person for this since I don't know xml.

If you're asking me to pay to have it made, then the code would be for me only, and it would not be used in MiniB3D.

Either way is fine with me.

Here's "Brucey's" response to my email:


I've taken a glance at it before. It's a very capable format indeed.
The easiest way to import this would be to create an XSLT script (think other XML-type code that one can run to parse an XML document and retrieve specific information from).


I've used XML stylesheet transformations on XML documents that represent class models, in order to convert that XML into a completely different formatted file for loading into a legacy tool. In that example, it took me two days to write the script, learning *how* to write the script at the same time. If I had to sit down and write the parser, I believe it might have taken a week or two to get the same result.


I've another module, libxslt, which goes hand-in-hand with libxml, to provide that transformation functionality.


XSLT is designed for transforming XML. Writing an equivalent XML parser (in any language) would be an order of magnitude more involved than learning how to write the XSLT script.


So it looks like bah.libxslt might be the best approach. Is anyone familiar with this?


JoshK(Posted 2008) [#8]
Post by another satisfied Collada user:
I finally replace collada. Now I have more freedom to do the things I want without having to spend months figuring out how to save or read the data. That was a big mistake that cost me more than 6 month of useless code navigation and lots of aggravations.



klepto2(Posted 2008) [#9]
hehe, I believe I know that guy.
Btw I have also quit working on collada, its just to bloated and ... .


Doiron(Posted 2008) [#10]
If not Collada, it must be .fbx (which has been the king way before Collada was created, expecially suited for animation), simply because there aren't other widely used alternatives.

Given the necessity to have support for advanced formats (.x and .3ds are primitive to say the least: you should be able to import as much information as possible directly to the engine, so that most of the work is done inside the modeller), you either have to support at least one advanced format cutting off everyone else who doesn't own a particular modeller, or you use an interchangeable format.

Since interchangeable formats are necessary both in cinematography and videogame development, once you support an interchangeable format, the authors of the modellers will do the hard work for you by keeping support up to date.

An interchangeable format is essential not only because every artist focuses on a different modelling package (as 3DSMax, Maya, Lightwave, and XSI), but also because it is common to switch between packages in order to use the best tool for each part of the job (as an example, Lightwave let you save lots of time for modelling but its scene management isn't on par with XSI).


JoshK(Posted 2008) [#11]
After looking into all of these, I think it is easier to pay someone to write exporters for each modeling package than it is to support these monstrosities.