Posted by rob on August 21st, 2012

The animation system in Away3D has had a fair amount of refactoring in recent times, and as yet, less examples actually demonstrating performance and features. The demo above is intended as a first step to rectify this, in this case for the vertex animation system.
Animation data in this demo is imported via the MD2 format using one of the more well known examples from Quake days, the Perelith Knight. One of the great things about MD2 is its small size – the entire swf comes in at a smidge over 700k – an impressive feat considering the variety of animation and textures included.
Another advantage of vertex animation over other forms such as bones is its playback efficiency. Here we have 400 independently animating avatars with normal maps, specular maps and dynamic shadows, all running at a smooth 30fps on an average machine.
Full source is available for the demo – just select “View Source” from the right-click menu or use the direct link here to view and download. The demo uses the bleeding-edge build in the dev branch of Away3D’s github, so be sure you have updated your source if you are interested in compiling the code.
Posted by rob on April 10th, 2012

One of the cool new features introduced in the recent Flash Player 11.2 release is the ability to lock the mouse when in fullscreen mode. What this allows is a sort of ‘infinite scroll’ effect where the mouse movement directly controls the application, rather than having to rely on the mouse cursor position.
To demonstrate this I’ve added a mouselock feature to a new Away3D demo that allows you to fly around a 3D globe using the traditional click n’ drag approach. If you enter fullscreen by hitting the spacebar, you switch into being able to control the rotation of the camera simply by moving the mouse, which I’m sure you’ll agree is a much more enjoyable experience and frees up mouse clicks for whatever else your application might require.

Of course, the construction of this demo has been about more than just mouselock. I wanted to create a convincing globe simulation using real data and so searched through as many online resources as I could find. The best resource that eventually turned up was from a fantastic NASA archive called Visible Earth. The Blue Marble category is where most of the earth textures come from, although some tweaking was necessary in Photoshop to achieve a slightly more realistic end result.

When creating an earth simulation, a lot of enjoyment seems to come from rendering the perfect sunset from space.
This has many nuances such as Fresnel refraction from the water surface, a band of light forming along the horizon due to atmospheric aberration, visible relief of mountain ranges, artificial lighting from towns and cities on the ground… the list goes on and on. In achieving some of these effects I’ve actually added a few new features to the Away3D material classes, which will soon be available for use on our dev branch – check them out if you’re interested.

Because of the wide range of rendering approaches that have ended up being covered by this little experiment, I’ve decided to include a step-by-step walkthrough of the construction process – a little look behind the tricks techniques used here, as part of my upcoming Away3D training session at BTPlay. The conference is now only a couple of weeks away and something I’m really looking forward to as it will be my first Away3D training session for over a year. So much has happened since then, its sometimes hard to remember what life was like before Stage3D…
If you’re interested in finding out more on mouselock, you can learn how to implement this and other new 11.2 features over at Tom Krcha’s blog in the following article: http://www.flashrealtime.com/mouselock-right-click-middle-click-in-flash-player-11-2/
Posted by rob on February 17th, 2012






Well, what can i say? The impossible has happened and we have managed to actually get a beta build of Away3D 4.0 out the door. Hallelujah!
For those of you who waited, our apologies and thanks in equal measure. While work is by no means done, this milestone puts things back on track for future updates, of which we are expecting many. For a description of just some of the changes made in this release, please read the full article over at http://away3d.com/comments/away3d_4.0_beta_released
There are a few of the usual links to dish out – firstly the following github repos have now has their master branches updated and tagged to 4.0.0 beta:
https://github.com/away3d/away3d-core-fp11
https://github.com/away3d/away3d-examples-fp11
Then there is the updated livedocs page which will now reside at the linksafe address of http://www.away3d.com/livedocs/away3d/4.0 (all older urls will simple redirect here)
And finally, there is the download page for those who prefer their libraries zipped and / or swc’d: http://www.away3d.com/download
While we are still working on new examples and tutorials, many of the older ones have been ported to the beta codebase, tidied up and released as source downloads which you can access by clicking any of the images above. If you like the look of an example and want to see the source, simply use the right click (yes, thats back too) and select “View Source” from the menu. All new code examples will eventually find their way onto github after some tidying up – if you have a code demo of your own that you would like to consider adding to github or are thinking of creating one that you’d be interested in open sourcing then please do get in touch!
The next few weeks are going to be a blur as far as Away3D activities are concerned, and we will be updating everyone soon on what to expect next from the team. As usual, feedback is welcome!
Posted by rob on August 7th, 2009
The Away3d 2.4 & 3.4 update has been recently released on the Away3d.com site, with a completely revamped examples section, for both Flash 9 & Flash 10 versions. To grab your copy, head over to the svn or go straight to the downloads section of Away3d.com for a zip download of sources and examples.

many new features have been added to this release, including:
- Vector graphics and fonts support.
- Typed-checked loader support.
- Geometry modifiers for exploding, welding, mirroring…
- Depth material for creating depth masks.
- Normalmap and Bumpmap generators from geometry.
- Light pre-baking on textures.
plus the usual stability improvements and a ton of bugfixes. Documentation will soon be updated at away3d.com/livedocs

Special thanx must go to Guojian Wu of wu-media.com for his excellent new as3 library swfvector, which allows you to convert any shape outline or textfield in a swf into as3 data. This is used to great effect in the new release, easily enabling the drawing of textfields and shapes in 3d

The examples interspersing this post can be accessed by clicking on their images – each comes with it’s own source which can be downloaded by selecting “View Source” in the right-click menu. Or you can download these and other examples (both .as files and .fla files) by going to away3d.com/downloads. The Basic_Swf example also uses the excellent as3dmod library (which you can download from here) for producing the bend effect. Now you can twist and deform vector graphics in 3d, thanx to as3dmod, swfvector and Away3d 2.4 /3.4
Enjoy the new release!
Posted by rob on April 26th, 2009

Augmented Reality (the practice of superimposing rendered 3d on top of realtime tracked camera footage) has become an interesting presence on the web recently, with the good people at Saqoosha providing the conversion magic necessary for monochrome marker tracking in Flash. The FLARToolkit is derived from the Java based NyARToolkit, which in turn is a conversion of it’s C stablemate ARToolkit, an open source framework coming out of the University of Washington that resolves the output from a webcam into a series of tracked marker coordinates in 3d, based on shape recognition algorithms.
The above demo is an example of the FLARToolkit running with Away3d as it’s renderer. The actual process for integrating the two frameworks is very simple – centering around two classes FLARBaseNode and FLARCamera3D located in the away3d package of the FLARToolkit library. There have been some modifications made here that allow the latest 2.3 Away3d release to function with the FLARToolkit – please use the modded library supplied with the source to successfully compile the demo code, until the official FLARToolkit svn has been updated.
Currently the FLARToolkit can track multiple marker shapes in a single camera output, but in this case it is somewhat limited by the speed at which tracking calculations are made. However, you can still have a lot of fun with it! To use in a non-open source commercial project, special licenses are available to purchase from ARToolworks that grant you permission to use the library free of the more restricting GPL license.
To use the above demo you will need to download and print out the tracking marker. With the ARToolkit it is possible to train an AR app to track any monochromatic shape.
The original ARToolkit has gone through a few new incarnations including the ARToolkitPlus and more recently, Studierstube. The latter allows for many more tracking options (including full color markers), and boasts a vastly improved tracking algorithm that with any luck will find it’s way back to Flash in future AR conversions.
Posted by rob on March 5th, 2009

Away3d’s flash10 branch has recently been updated to the 3.3 version – a parallel release that now runs alongside the 2.3 version for Flash 9. Initially a compatibility release, the flash10 branch is now being used as the place where Flash 10 optimisations are made to the engine.
One such optimisation is in the area of shading, where Pixel Bender filters allow far greater render speeds than standard Flash filters. The demo above is an illustration of the kind of power now available with the latest update – normalmapping becomes a good deal faster and smoother than before, thanks to per-pixel normalising and the abandonment of layering which was previously the only way to achieve a shaded effect.
Special thanx go to Eddie Carbin for supplying the model, and David Lenaerts for the HDR filter that creates an extra ‘blooming’ layer to the view for an accentuation of highlights and shadows in the shading. Source for the demo can be accessed via the usual right-click in the movie, or directly from here. Don’t forget that to compile this demo you will require the 3.3 version of Away3d, downloadable from http://www.away3d.com/downloads or from the flash10 branch in the svn.
Posted by rob on February 12th, 2009

The 2.3 update of Away3d has been released! This new version comes in two flavours, a legacy Flash 9 version for all people wishing to carry on using Away3d in their current projects, and a new Flash 10 version for those lucky enough to be already developing in cs4 and Flash 10.
Added features in the version are many and varied! Some highlights include:
- Frustum and nearfield clipping
- Object culling (using frustum calculations)
- Camera lenses
- Advanced normalmap tools
- Bezierpatch tool for creating smooth surfaces
- Improved memory management
- Improved extrusion tools
- Billboard mesh objects
The Frustum room demo shows the new frustum clipping class in action. The 3d room can be navigated with no clipping artifacts that are usually a common problem with interior scenes such as this. The frustum technique involves slicing triangles to the viewing window rather than removing them.
Use the mouse and cursor keys to navigate, and the keyboard shortcuts listed in the demo to see various different render options for a comparison between old and new.
As always, the source for the demo is available here, or by right-clicking in the demo window.
Frustum culling is only one of the new features on offer – for more information on others, head over to away3d.com!
Posted by rob on December 24th, 2008

Inspired by the fantastic new Audi VDT site produced by ArtificialDuck using Away3d, I decided to go on a little exploratory tour of the current Away3d codebase to see what could be done about fast(er) rendered 3d particles.
My results use a new set of classes soon to be uploaded to the trunk in the 2.2.6 dot release of Away3d – basically with this update it will be possible to create single 3d objects containing many particles, greatly reducing the number of matrix calculations required for rendering a collection of particle objects (or billboards as they’re more commonly known).
The above test is a bit of an extreme case so may run slow on older machines – 4096 stars are being rendered independently per frame, with a bit of mouse-influenced movement nicked from the Audi site
The classes have yet to be properly optimised, but I hope to be able to provide full source soon along with an update to the Away3d trunk once things are complete. In the meantime the demo has a bit of a festive look, so seemed fitting to release over the winter break. Hope you like and merry christmas!
*****Update*****
Source is now available for the demo above via the usual right-click menu or this direct link. You will require the latest trunk version of Away3d from the svn, version 2.2.6. On a side note, the default demo now renders 1024 stars to get a smoother framerate. With this number of billboards, things fly!
Posted by rob on September 29th, 2008

Away3d 2.2 is now released! So it is time to start dipping into the new features available, and demo some of what’s on offer.
One of the biggest new features in 2.2 is triangle caching. This is a way to speed up scenes with static cameras, and (some) static content. The demo above shows how Away3d can now handle around 50,000 polys rendered to screen without too much hassle, while maintaining interactivity and framerate. This is accomplished by automatically detecting when a triangle mesh require redrawing, and skipping that step when it isn’t required.
You can view the turtles from any angle, but in order to maintain framerates while moving around, a wireframe model is swapped in from the point the camera starts moving. Once things are static again, triangle caching automatically kicks in. The beauty of this feature is that it will work on your existing Away3d applications without any modifications – if triangle caching can be employed, Away3d will use it!
Source code is available here, or in the right-click menu of the demo. The use of ownCanvas in the source is something to note – it essentially allows boundaries to be defined for different areas of caching in a scene. When an object has it’s own drawing canvas with ownCanvas enabled, it has it’s own caching routine that updates separately to other areas of the scene. So if you have a definite separation between objects that are static and objects that move (or in this case have their materials updated), enabling ownCanvas on a moving object will ensure only that container has a redraw triggered, allowing the rest of the scene to remain cached and keeping framerates high.
More demos of the new features of Away3d 2.2 should be arriving here soon. In the meantime, check out the latest svn source or visit the Away3d downloads page for zip files.
Posted by rob on September 4th, 2008

The latest trunk version of Away3d (currently version 2.1.7) has several new and exciting features which are to be officially released in the upcoming 2.2 version. However, being the enterprising souls that you are, i thought you may want to see some of whats on offer a little ahead of schedule!
This demo shows off a new feature to Away3d – full support for collada bones animation. A nice feature about bones is that they can control any number of meshes without incurring significant extra processing overhead. Of course, full source is available here, but make sure you have the latest trunk version of Away3d before compiling.
Those of you who were at the recent Flashforward conference many have seen me stumble through a whistlestop rundown of Away3d features at the Speaker Slam, after being denied a place to plugin my laptop.
However, had I been able to do so, this demo is part of what you would have seen. At my next speaker gig at Flash on the Beach, I’ll have more opportunity to reveal the whole piece that this fits into… not wanting to give things away, but it ends up involving wiimotes. Stay tuned!