Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting Collada file to a a3d (Android3d) object

I am looking into Renderscript capabilities and stuck with the A3D (Android 3d) file format. I can't find an easy way to convert a Collada file into an A3D format to store my blender model.

I was wondering if you guys have an idea I could try maybe?

Does anyone have a working code sample so that is can see what im doing wrong?

More info: http://developer.android.com/reference/android/renderscript/FileA3D.html

Edit: Not to be mistaken for the Asci3d file extention ( also *.a3d )

like image 576
Mark Mooibroek Avatar asked Apr 26 '11 10:04

Mark Mooibroek


2 Answers

As of Ice Cream Sandwich (perhaps earlier) there is a tool in the Android source to convert between Collada and A3D.

The tool is called a3dconvert; you can browse the source online here (in the ICS branch): https://github.com/android/platform_development/tree/ics-mr1-release/tools/a3dconvert

Usage: a3dconvert input_file a3d_output_file Currently .obj and .dae (collada) input files are accepted.

This tool has been removed as of newer releases (Jelly Bean, it looks like). This probably because the graphics portion of Renderscript has been deprecated.

like image 138
thekidder Avatar answered Nov 12 '22 09:11

thekidder


I'm not sure A3D is a good format but if you have to write a converter here is a description of both formats:

http://scorpion.tordivel.no/help/UsersGuide/General/ImageOperations/ImageFormats/ImageFormats_a3d.htm

http://en.wikipedia.org/wiki/COLLADA

And here is some sample code to read Collada:

http://sourceforge.net/projects/colladaloader/

like image 37
Ed Burnette Avatar answered Nov 12 '22 07:11

Ed Burnette