c++jsonthree.jsogre

ogre exporter for three.js


I have to export a 3d model created with a c++ software to make it work with WebGL. I choose to use three.js to make the import with a json easier.

I have no experience with Ogre. It seems you can work with either .mesh.xml or .scene (but it is not clear to me how to do so).

How can I have a valid json file for three.js from these format ?

Also, I have found you can export easily 3d models from blender to json. So what is the best flow :


Solution

  • After a few days, i found a well working solution.

    The first step, is to convert your .mesh (binary format) to a .mesh.xml format. It is done with the following tool : http://www.ogre3d.org/tikiwiki/OgreXmlConverter

    So after some research, the way Ogre-> Blender -> Json is working, but seriously outdated as you need an old version of Python and Blender. If you want to try, follow this link : http://www.ogre3d.org/forums/viewtopic.php?f=1&t=66545

    Then, as the specs of both ogre xml and three json are available, the way Ogre -> Json is definitely possible, but need some work as I haven't found a project doing it. However, you can inspire yourself with the python blender scripts.

    The best way I found is to use the XML directly. Thanks to this blackcancer guy. https://github.com/blackcancer/three.XMLOgreLoader