Search code examples
actionscript-3game-enginemayaflare3d

How to load load maya 3d models using flare3d 2.0 framework


I wanted to test and try away3d and flare3d to make a choice.

I started with flare3d, it has mentioned it supports maya obj files and other formats. However, the tutorials/documentation I have come across does not have any mention only about f3d which is the output of 3d max models generated using a plug-in for 3dmax.

It looks like the Scene3D.addChildFromFile() expects a f3d format file only, so how to load other formats? especially the maya files?


Solution

  • I discovered that current Flare3D 2.0 does not support direct .mb or .obj files but it supports .dae files

    this is how I did

    var tree:Pivot3D;// = new ColladaLoader("aerial_dragon_attack_2.dae");
    scene.registerClass(Flare3DLoader1);
    //ColladaLoader; // this did not work for me so commented and used above line
    tree = scene.addChildFromFile("empresstree_opencollada1.dae",null,ColladaLoader);
    

    Useful info:

    The second line is mandatory as currently the scene class does not import ColladaLoader class by default, some one said just writing ColladaLoader; above the addChildFromFile would import the class to avoid the error, but that didn't work for me so I used registerClass method which I tried to fix from the error message

    ** Error: The Flare3DLoader1 class was not found.
    ** Please call to scene.registerClass( Flare3DLoader1 ) to enable Flare3D v1 compatible models.
    

    Hope this helps someone out there