AS3 Geom Exporter [EN]

AS3 Geom Class Exporter is a 3DS Max designed script that allows you to directly export 3D models to AS3 classes.

he benefit is that you don’t need anymore to load and parse a texte file (collada, ase, obj, 3ds).
You just have to import the class and to create an instance, like you do with usual objects like plan, sphere and box classes.

This script is compatible with the following AS3-3D engines :
Away3D Lite 1.0 v1.06
Away3d v1.00
Sandy 3.0 v1.00
Papervision 1.5 v1.00
Papervision 2.0 thx to Mr Doob v1.00

2 simple way to use:
Download zip file and unzip in any folder.

  • In 3DS Max, select « MAXScript » tab and « Run Script » now select the
    AS3GeomExporter.ms file and TADA a floater window apear !
  • you can also drag&drop the AS3GeomExporter.ms file into the 3dsMax program and TADA a floater window apear !

Options :

- Package : the exported class package
- ClassName : the class name
- Engine : the 3D engine you want to use
- Scale : scale the 3D object
- Swap face normal : with some 3D models, the faces export is swapped, you can fix this by selecting this box.

Download demo sources and 3ds max script




  1. Jerome ,can you put a note or a link to the modified version of the exporter I made which now exports to AWD1 ? It could be great.

    Besides wanted to say your lab stuff is awesome. I wish I had time to mess around with that kind of stuff :)

    • Sven K
    • 14 avril 2011 3:13

    Hi Jerome,

    I created an AS export of a simple model with your script which worked fine. I cannot create an instance of the AS class in broomstick though.

    It says there are quiet a few definitions missing on compile:

    C:\Documents and Settings\Administrator\Desktop\MolehillTest\src\PrimitivesTest.as(34): col: 27 Error: Type was not found or was not a compile-time constant: Mesh.
    private var importModel:Mesh
    ^
    C:\Documents and Settings\Administrator\Desktop\MolehillTest\src\PrimitivesTest.as(60): col: 28 Error: Access of possibly undefined property mesh through a reference with static type Party.
    _ctr.addChild(importBox.mesh);
    ^
    C:\Documents and Settings\Administrator\Desktop\MolehillTest\src\Party.as(11): col: 67 Error: Call to a possibly undefined method Vertex.
    private function v(x:Number,y:Number,z:Number):void{varr.push(new Vertex(x,y,z));}
    ^
    C:\Documents and Settings\Administrator\Desktop\MolehillTest\src\Party.as(12): col: 60 Error: Call to a possibly undefined method UV.
    private function uv(u:Number,v:Number):void{uvarr.push(new UV(u,v));}
    ^
    C:\Documents and Settings\Administrator\Desktop\MolehillTest\src\Party.as(13): col: 82 Error: Access of undefined property FaceHelper.
    private function f(vn0:int, vn1:int, vn2:int, uvn0:int, uvn1:int, uvn2:int):void{FaceHelper.addFace(new Face(varr[vn0],varr[vn1],varr[vn2], null, uvarr[uvn0],uvarr[uvn1],uvarr[uvn2]));}
    ^
    C:\Documents and Settings\Administrator\Desktop\MolehillTest\src\Party.as(13): col: 105 Error: Call to a possibly undefined method Face.
    private function f(vn0:int, vn1:int, vn2:int, uvn0:int, uvn1:int, uvn2:int):void{FaceHelper.addFace(new Face(varr[vn0],varr[vn1],varr[vn2], null, uvarr[uvn0],uvarr[uvn1],uvarr[uvn2]));}
    ^
    C:\Documents and Settings\Administrator\Desktop\MolehillTest\src\Party.as(16): col: 7 Error: Implicit coercion of a value with static type Object to a possibly unrelated type away3d.materials:MaterialBase.
    super(init);
    ^
    Build halted with errors (fcsh).

    Is you exporter not compatible with Away3D 4 broomstick ?

    Best,
    Sven

    • Seraf_NSS
    • 14 avril 2011 3:25

    Hi,

    the available exporter is not for broomstick

    the broomstick version is still in development

  2. Hi Seraf,

    Did you get round to updating for Away3D 4.0?
    I notice they write you used an exporter for the Broomstick demos…

    Cheers!

    • Seraf_NSS
    • 28 juillet 2011 6:48

    Hi Peter,
    the exporter i made for the demos is not finished
    i need more time and i think about release it for september