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
Yet another Collada importer/converter
-
- Gnoblar
- Posts: 14
- Joined: Tue Dec 28, 2010 8:04 pm
- x 4
Yet another Collada importer/converter
Last edited by jaafar on Fri Mar 03, 2017 12:36 am, edited 2 times in total.
-
- Minaton
- Posts: 933
- Joined: Mon Mar 05, 2012 11:37 am
- Location: Germany
- x 110
Re: Yet another Collada importer/converter
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.
-
- Gnoblar
- Posts: 14
- Joined: Tue Dec 28, 2010 8:04 pm
- x 4
Re: Yet another Collada importer/converter
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.
./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.
-
- Halfling
- Posts: 77
- Joined: Fri Sep 11, 2009 7:42 pm
Re: Yet another Collada importer/converter
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
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
-
- Gnoblar
- Posts: 14
- Joined: Tue Dec 28, 2010 8:04 pm
- x 4
Re: Yet another Collada importer/converter
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
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
-
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
Re: Yet another Collada importer/converter
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
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
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
-
- Gnoblar
- Posts: 14
- Joined: Tue Dec 28, 2010 8:04 pm
- x 4
Re: Yet another Collada importer/converter
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.