Dealing with the COLLADA situation

Let me first and foremost say, I understand that COLLADA is not preferred and there are various alternatives available.

That said, I have a mountain of DAE’s that I’d really like to make use of still. I also REALLY enjoy JME3 and would love to continue working and possibly contributing in the future. So. A few questions:

  1. Has anyone found a reliable way to convert DAE’s to a supported format in a robust way? (Preferably Ogre, preferably not OBJ).

  2. For the sake of conversation, let’s say I wanted to cut my losses and write an importer for COLLADA into JME3 and contribute it back to the community. Is there a straight-forward way of doing so?

Again, I don’t mean to insult anyone’s intelligence on the topic, I’ve read the forums and the documentation, I’m just trying to get a clear picture of how my project should move forward.

Thanks in advance!

Doesn’t blender support COLLADA? The import path to JME from Blender is fairly well tested.

For 2 then you would write it as a contribution plugin, then anyone who had a use to it can just install it from the plugins list.

I daresay blender does, but I guess I was hoping for something I could script together to make a directory full of DAEs turn into a directory full of Ogre files.

RE: 2) I realize that I would likely contribute it as a plugin. Before I do that, I sort of need to know where to start in terms of code-writing. I’ve no idea how one takes in an OBJ and produces a scenegraph, for example. Basically, I’m looking for an API to follow as an example.

you could probably write a python script for blender, to load each model in a directory and convert it (some may exist already). You don’t necessarily need ogre, saving it as a .blend should be fine, and use the blender importer

@jagwire said: 2) For the sake of conversation, let's say I wanted to cut my losses and write an importer for COLLADA into JME3 and contribute it back to the community. Is there a straight-forward way of doing so?

Again, I don’t mean to insult anyone’s intelligence on the topic, I’ve read the forums and the documentation, I’m just trying to get a clear picture of how my project should move forward.
Thanks in advance!


Well I guess we’d be glad to have a collada support of some sort.
Someone tried like 2 years ago if I remember correctly and just gave up (the format is kind of complicated if I recall, and just discouraged the contributor).
Maybe @erlend_sh remembers his name.

The way to go would be to get the collada specs, and tr to extract useful information from it to convert the model to j3o. (could be a SDK plugin like we have for blender).
One thing you could look at is the ogre importer we have in the engine.
http://code.google.com/p/jmonkeyengine/source/browse/#svn%2Ftrunk%2Fengine%2Fsrc%2Fogre%2Fcom%2Fjme3%2Fscene%2Fplugins%2Fogre
Not completely sure it’s gonna help, but the ogre format is pretty straight forward so it’s easy to understand how JME is fed with the data.
Collada supports a lot more things than ogre of course, but for a starter, I guess that would be already great.

Else Blender has python scripting, you may be able to load batches of files and convert to blend or w/e format. Maybe someone with more experience than me in blender scripting could confirm that

1 Like

… since we just added ways to start and use blender in the SDK, I guess a python script would make most sense. We could add it as a model importer to the SDK (DAE->python->.blend->j3o) and you would be able to convert the models just like any other. So you’d just copy all your DAE’s to the assets folder, select all of them and press “convert to j3o” :slight_smile: If you can blender make the .blend file by going “./blender -b -p converter_script.py” (starts blender in the background with no window and executes the script) I promise I will add the rest of the functionality to the SDK “for you” :wink:

1 Like

Update: Found out there was basically a template to do this in blender, working on it :slight_smile:

1 Like

Et voilà :slight_smile: http://hub.jmonkeyengine.org/forum/topic/3ds-collada-import-through-blender-in-sdk/

3 Likes