Away3D ObjExporter

Flash

For the next release of Away3D, one of the classes we’ve added is the ObjExporter class. Beyond the obvious of allowing you to export your object3D’s to the WaveFront obj format, this class allows you to see the dynamic generated geometry into a third app in order to improve the balance between both types of data. In fact that’s the reason why I’ve wrote it in the first place.

For instance, you have an elevation dynamically generated and you want to place a house, some trees etc.. modeled with an external 3d app on it, chances are high you will have sorting issues, because the house or tree would traverse the floor of your terrain, too big, too high on the Y axis… Its very easy to loose hours on this…
Now that you use extrudes, primitives, imported models or you are simply lost in your own 3D world, you can now see and fine tune your scenery and yet keep the hudge avantage of dynamically generated models. Just load the export in your 3d app, adjust, delete the objexport and save just what you need! Back in Away they’ll have a perfect fit!

Of course you can use it just as the name says: an exporter to the obj format!

The implementation is very easy:
import away3d.exporters.ObjExporter;
[..code..]
new ObjExporter(myObject3D);

open a textEditor, make new file, paste and save as myobj3d.obj.

Note that this release do not support the mtl generation yet, this feature will be added soon.
But uv’s are exported, so if you load the material image in your 3d app and apply it, it will be textured the way it was textured into your Away3D scene.