Blender Exporter Updated: ActionScript Vectors Support (FP10)
Posted by Dennis on Feb 23, 2010 in 3D, ActionScript, Blender • 2 commentsAnother update to the Blender to ActionScript exporter. I’ve added the option to export to ActionScript Vectors. This way you can use the exported data with native Flash Player 10 3D. The export is quite basic, there’s still stuff you have to do yourself. This is the data that is exported:
- vertices
- indices
- texture coordinates
- scaling
- translation
- rotation
This example source code is a quick & dirty example of how it can be used:
package
{
import __AS3__.vec.Vector;
import flash.display.Sprite;
import flash.events.Event;
import flash.geom.Matrix3D;
import flash.geom.PerspectiveProjection;
import flash.geom.Utils3D;
import flash.geom.Vector3D;
public class TestScene extends Sprite
{
private var sphere : Sphere;
private var pp : PerspectiveProjection;
private var proj : Vector.<Number>;
public function TestScene()
{
super();
init();
}
private function init() : void
{
sphere = new Sphere();
pp = new PerspectiveProjection();
pp.fieldOfView = 45;
proj = new Vector.<Number>();
addEventListener(Event.ENTER_FRAME, draw);
}
private var ry:Number=0;
private function draw(event:Event):void
{
var tr : Matrix3D = new Matrix3D();
tr.appendRotation(ry++, Vector3D.Y_AXIS);
tr.appendTranslation(10,14,70);
tr.append(pp.toMatrix3D());
Utils3D.projectVectors(tr, sphere.v, proj, sphere.u);
graphics.clear();
graphics.lineStyle(0.1, 0x000000 );
graphics.drawTriangles(proj, sphere.i );
}
}
}
The updated exporter script can be downloaded from the usual location here.




I say it’s time for this to go on google svn or github, so that people could join in and add/tweak export code.
Yes, open source would make people to contribute to this great project.
A question: I use 3Ds Max. If I want to use this plugin, probably I should export the model to Blender format and open it in blender. What is the file extension for Blender?
Anyway, I think most useful would be to concentrate on Collada >> AS3 class exporter, because this way anyone could export Collada files and then transform them to as3Class, using any 3D application
Thanks