01 Nov 2007

Away3D Animated MD2 to AS3

by Fabrice Closier Away3D Animated MD2 to AS3

Broken link, file corrupted etc... we all have experienced those things... In Away3D there is a native export to AS3, you can export any model loaded in your project to the AS3 format: .as. This allows you to compile the final version of your work in Flash without using the original model(s). Not only making the loading procedures easier, it also provides a better way to protect the 3D models from being reused once published. Away3D supports MD2 natively too, and it was already possible to export MD2 like any other supported formats, but not yet possible to export the animation data to AS3. Until now ! The little demo shown here displays an .obj file (the flowers) and an animated MD2 model (the Hummingbird) converted to an AS3 class. The original models were needed just to set up the scale into scenery, then both files were exported as .as files and compiled with the rest of the code. This gives us a nice extra for free: colored declarations in our code eg. new Flower() or new Bird();. The concept "beauty of code" takes a new dimension! Soon some Flash code poetry contests? I've also extended the export option to a fixed decimal count. If you take a look at 3D data, especially when the original model is being rescaled on screen, you often get numbers with more than 10 decimals for all vertex definitions... so one little boolean set allows you to save more than 50% of the .as class filesize (this was the case on the models displayed here). Depending of course on the amount of polygons, the more polygons, the more the 'compression' becomes obvious. At max fixed 4 decimals I couldn't find any problems on renderings. If a particular case generates an ugly artifact, just don't set the boolean! Shown in this demo too, the latest version of the enviroMaterial code. Even smoother! This exporter will be release in Away3D 2.0. Fabrice

COMMENTS

07 Nov 2007 06:53 PM

  Away3D Animated MD2 to AS3 by bas said:

[...] sourced here [...]

06 Dec 2007 08:28 AM

Ricardo said:

hi, it's exemple is magnific, i'm so in deployed in AS3, source code exemple pass for me, please, sorry my english.

tanks

06 Dec 2007 11:20 AM

admin said:

These classes will be released with Away3D 2.0. You can already start working with Away3D 1.9.

02 Feb 2008 02:04 PM

Jason said:

ive really got into md2 for the game sauerbraten. i just wanna make mor characters.
-----

Only registered members can comment. Click here to login or here to register