Search code examples
android3dcolladaopenscenegraphartoolkit

How to display Collada (.dae) file on Android with layers support?


The project I am working on is the augmented reality Android app. I need to display 3D objects in any way using Collada file format (.dae). The client want to use Collada because it is easy to export 3D projects into this format and .dae supports layers system. Unfortunately, the libraries and frameworks I use doesn't support .dae format in any way (ARToolkit and Android SDK + NDK). And it is not adviced to work with such files on the mobile phone. Supported formats are simple .obj and OpenSceneGraph formats (.ive, .osg, .osgb). They are displayed in the Android using OpenGL ES directly, or using OpenSceneGraph framework. I am quietly frustrated and don't know which way to choose:

  1. To write some script to convert .dae collada file into the .obj file? With so many .obj files as layers count in collada file. And switching between this objects will be imitation of adding/removing layers.
  2. Or may be using OpenSceneGraph framework, convert collada into .osg or .ive? I don't know yet how OSG works with layers.

Could you give some advice, where to move in this situation? Or perhaps there is the way I don't see.


Solution

  • DAE/COLLADA is a content creation format, but NOT a good final distribution format.

    Authoring tools work with DAE, but you shouldn't use it in your final runtime. When the file is finished being designed, use a build of OSG that was compiled on a PC to convert DAE to OSGB (or IVE) and distribute THAT. It's much easier to load.

    The dependent libraries needed by the OSG COLLADA loader are very hard to build on Android or iOS.