Yet another Collada importer/converter

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Post Reply
jaafar
Gnoblar
Posts: 14
Joined: Tue Dec 28, 2010 8:04 pm
Contact:

Yet another Collada importer/converter

Post by jaafar » Tue Jun 12, 2012 7:48 am

Hi all,

A recent client has generously open-sourced some work I did for them, and I've picked it up and am hoping to maintain it now, if there's interest from the community. This is a pair of tools based on the OpenCollada parser library:

1) a standalone tool to generate mesh/material files from a .dae
2) a "loader" that creates an Ogre scene graph and meshes matching the scene graph and geometries in the Collada input, in memory

Everything I found online at the time was either based on the unmaintained FCollada library, or was incomplete (the OpenCollada dae2mesh converter, for example). If there's another project out there I'd be delighted to join forces - the code is MIT licensed and thus AFAIK is compatible with Ogre and OpenCollada both.

It would be great to have some feedback from developers. Code is here:

https://github.com/jefftrull/ColladaOgreImporter

A blog post with a little more detail is here:

http://jefftrull.github.io/collada/open ... gre3D.html
Last edited by jaafar on Fri Mar 03, 2017 12:36 am, edited 2 times in total.
0 x

Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany

Re: Yet another Collada importer/converter

Post by Transporter » Tue Jun 12, 2012 4:09 pm

Im really interested in your project. I was searching for a good Collada-Importer a long time. At the moment I'm importing Collada in blender and export it to Ogre mesh. I also prepared my code to use ogreassimp (http://www.ogre3d.org/tikiwiki/OgreAssi ... ture=Tools) because assimp can also read Collada.
0 x

jaafar
Gnoblar
Posts: 14
Joined: Tue Dec 28, 2010 8:04 pm
Contact:

Re: Yet another Collada importer/converter

Post by jaafar » Tue Jun 12, 2012 4:47 pm

I'm glad to hear it Transporter. Hopefully it will work for you. To convert offline as you have been doing you can do this (after you build the project):

./c2mesh /path/to/xxx.dae

which will produce /path/to/xxx.mesh and /path/to/xxx.material files

Alternatively you can load the .dae file directly into your scene graph. Geometries become meshes, instance geometries become entities, and the scene graph is attached starting at a SceneNode you supply. See "simple_viewer.cpp" for an example.
0 x

Stefan Lundmark
Halfling
Posts: 77
Joined: Fri Sep 11, 2009 7:42 pm

Re: Yet another Collada importer/converter

Post by Stefan Lundmark » Sat Jun 16, 2012 12:59 pm

Hi Jafaar,

That's refreshing! I've seen other engines use Collada like this (and like mentioned in the blog to create a scene, which behaves like a single object.. very useful) as a intermediate format and it's very effective. The ability to be able to export from any package and treat them all the same is so useful.

I don't know if you're the author of the blog but incase you are; you don't need to show the actual window when you convert the file. You can simply hide it. This is done by FMOD for example, when they need to spawn their DirectSound instance (which requires a window).

I'll download the source as soon as I can to take a look. Are animations in yet? That seems like the biggest hurdle.

Sincerely,
Stefan
0 x

jaafar
Gnoblar
Posts: 14
Joined: Tue Dec 28, 2010 8:04 pm
Contact:

Re: Yet another Collada importer/converter

Post by jaafar » Sun Jun 17, 2012 9:42 pm

Thanks Stefan! I appreciate the feedback. I'm the author of the blog as well. I'll investigate how to hide the window; to me that's the most egregious "hack" I have in there so far - it seems silly to require a windowing system for a format conversion...

I haven't investigated (or even used!) animations, but you are the second person to ask for them. If you have a simple test case I can try doing a prototype. This code was primarily used for converting large static models output from Sketchup so that may give you an idea of where its strengths and weaknesses lie.

Regards,
Jeff a.k.a. jaafar
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: Yet another Collada importer/converter

Post by jacmoe » Mon Jun 18, 2012 7:48 am

It's great to see a Collada importer/converter rising above what we didn't have.
There were so many different projects and none of them made it to the point of being usable.

I have a feeling that this is different.
Kudos :)
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

jaafar
Gnoblar
Posts: 14
Joined: Tue Dec 28, 2010 8:04 pm
Contact:

Re: Yet another Collada importer/converter

Post by jaafar » Fri Mar 03, 2017 12:36 am

Hello all! Five years have passed but I fixed a bunch of bugs recently, including Windows builds and some limitations on the dae files it can process, plus an update to Ogre v1.10. Everything's still in the same place. I'm happy to answer questions and make bug fixes.
0 x

Post Reply