3D engines for Flash
I’ve been following from afar the progresses in 3D engines for Flash for some years. Recently I wanted to dive in the Z dimension, be it fake nevertheless. So here’s an overview of the current situation.
The good
Performances
Until the likes of Papervision, dynamic 3D rendering was rarely used in Flash websites. The latest Flash Players brought some consequent changes upon processing speed. Hence it allowed some 3D engines with reasonable performances to peek their nose in the community.
3D engines give an extra dimension to creativity, though they aren’t fit for complex scenes yet. Even the Alternativa engine has its limits, those of the Flash Player. It’s been a few years since the community asked for hardware support so that we can get rid of some slow performances. Well, with the Flash Player 10, you will be able to choose different display modes like normal, direct and GPU. You have to be very careful if you decide to set the GPU mode.
These modes in general should be considered still in beta, there may be a lot of bugs until possibly Flash Player 11 so use caution.
This quote is by Jody Brewster who gives some precious Flash Player 10 GPU acceleration tips on his blog.
Gimme the sources
Most of the 3D engines in Flash are free, both for personal and commercial use. And most of them are open source (except Alternativa, to my knowledge).
The bad
Looks
3D engines also mean an extra dimension of complexity, and increased risks to make bad visual designs. This can lead to an “UGH” factor where the 3D looks either dull or slow or complicated.
It usually holds true that the bigger the scene, the slower and laggier. Same goes for details and the amount of objects on the scene. Your bitmaps may also look very jaggy or aliaised so you will loose the “smooth” graphics factor. You can always try to make up with nice 3D motions.
Do not expect your 3D to look as smooth as a 3D video render from a software like 3DSMax. Depending on the engine, you might as well endure backface culling problems, basically meaning some polygons of your 3D object won’t show up when supposed to do so.

In the image above, you can see a part of msnbc Spectra. You can easily distinguish that the text on the violet panel is weirdly distorted with the Papervision engine. The “wow” effect is here but this visual bug makes it a little less impressive. FIVe3D would have been commandable here as it displays fonts using the vector API of Flash. That “detail” aside, Spectra is still a very nice example of a good 3D user interface.
Update on 23 July 2008 (by Seb) :
The reason for that distortion is that the FlashPlayer can only perform skew transformations on bitmaps; in order to get any kind of 3D stretch we need to resort to using this hack.
Things are however improved with FlashPlayer version 10 — we now have the ability to do proper 3D perspective stretching on bitmaps, and so this horrible distortion should be a thing of the past.
Overkill
You have seen it coming, why not build 3D Flash banners ? A 3D engine (in activity) consumes a lot of CPU power. Think twice before going all out with a super-3d-banner-of-the-death which plays continuously heavy 3D stuff. Who said common sense ?
Hack and slack
In the end, Flash is still not ready for 3D. The Z dimension is now affordable thanks to the devoted work of some flashers but their engines are built on a weak platform, that is the Flash Player. It still cannot handle bitmap processing quickly, which is the biggest barrier to 3D. Alex Cove (author of the 2D physics engine APE), asks “does it always have to be a hack ?” truthfully. Is Adobe waiting for some miracles from the community to move on to 3D ? Flash Player 10 is a beginning to this but it doesn’t even include Z-sorting so you end up doing it manually…You end up taking Away3D and waiting for the Flash Player 11 patiently.
Still, Adobe has been listening a tad bit to the community’s requests (business obliges), as Macromedia did in the past. Changes like that take some time, especially for the Flash Player which wasn’t meant for 3D in the first place.
3D real time engines
Sandy
Sample : Telenor Body Language, Sandy demo
Originally, the project had several members but it is bit of a rundown now, with only one member left, Thomas Pfeiffer.
Sandy is not to be overlooked however. It’s the first open source 3D engine and it has some very powerful features with light rendering.
Papervision
Samples : Audi Rhythm of lines and msnbc Spectra
Papervision rose with a better communication and is backed by some notorious Flash personalities. All that Sandy didn’t have.
It’s by far the most famous of the 3D engines available, and one of the most complete too. It is available at version 1.5 on the blog’s download links. The next Papervision 2, called GreatWhite, is in beta currently and only available on SVN repository.
Away3D
Sample : Fifa Street 3
It is considered as an extension of Papervision, though the two authors had to rewrite a lot of the base classes. The project is hosted on away3d.com.
Away3D still lacks documentation a lot. From what Rob Bateman said, this will be solved soon.
As announced in an article on Papervision’s blog, Away3D is planned to merge with Papervision GreatWhite. Update on 12 July 2008 (thanks Seb) : Papervision has by now integrated a part of Away3D’s features. Both projects are still on going.

WoWEngine
Sample : technical demo
Jerôme Birembaut developped the WoWEngine and nicely made it available to everyone on his blog.
This engine is very interesting because it mixes some bases of Sandy with an extension Jerome wrote of the 2D physics engine APE. The result is a 3D engine with physics features like collisions, cloth and rope simulations to name a few.
It is very likely you’ll use this engine if you want both 3D and physics interactions within your application.
Alternativa
Sample : 3 demos on their website.
This engine is a killer. It is developped by a russian team. They’re invited at the coming Adobe MAX at Milan, in december (2008), one extra reason to attend this huge event.
Alternativa has been publicly released but it is free for personal use only. Licences must be purchased for commercial use. You should take a look at what this engine can do. One word for them : Отлично !
FIVe3D
Samples : FIVe3D homepage itself which includes 5 samples
Mathieu Badimon wrote a small 3D Engine as “an open source code for the conception of interactive vector-based 3D animations”. The FIVe3D homepage is a good implementation of the engine.
This engine relies upon the Flash Player to handle vectors, rather than bitmaps with the aforementionned engines.
One of its strengths, aside from being very light (10KB), comes from the way the engine handles fonts. With FIVe3D, you can use any font you want to any size without barely any aliaising or ugly text artifacts you might see in Papervision. A good choice for titles and headers. The little shortcoming to this is that you have to use additional font data (stored as an AS3 class). It is fortunately generated automatically by the tool Mathieu provided on the FIVe3D web site but it still weighs around 50KB for simple fonts.

Update on 23 July 2008 (thanks Seb, again) : attempting to render a lot of text with FIVe3D will result in a framerate drop due to the heavy calculations that the vectors imply for the Flash Player.
What engine shall I pick for my project ?
You don’t necessarily have to choose only one 3D engine. You can easily use multiple engines, each for a different use. This point was discussed last month at the AUGG (Adobe User Group of Geneva) meeting about real time 3D engines.
So for instance you could make some intro with large titles with FIVe3D, then display some simple textured objects with Papervision and constraint them physically with WoWEngine. Even among the samples listed above, there are certainly some cases where several engines were used together.
Not to mention many projects don’t rely on sole 3D but also blend some videos of 3D renders as you can see in the Fifa Street 3 sample.
Can I import 3D models ?
Yes you can. Sandy, Papervision and Away3D can import Collada files to display complex meshes (read less simple than just a sphere or a few boxes).
Some 3D softwares can’t export do not have a built-in exporter for Collada files yet. If you want to export using this format, you’ll certainly find some free exporters since Collada is an open standard based on XML.
Another possibility is to use the AS3 Geom Class Exporter either for 3DSMax or Blender. It will generate .as files and the advantage is that the engine won’t have to parse the file since it’s ActionScript already.
Isn’t Flash CS4 going to wipe out those engines ?
No it isn’t. If ever Adobe adds a fully fledged 3D platform within the Flash Player, the 3D engines of then will adapt and make use of its new benefits. Some engines like FIVe3D might be in direct challenge with the next Flash CS4 features. However I don’t think Flash CS4 will be released before late 2008 and it’s not even sure if the so-called “3D” features will be as easy to use for coders as what’s available currently through open source projects.
Is it worth it to go 3D finally ?
Without a doubt, yes it is ! Just imagine : you can dynamically render basic 3D. For instance, the amount of CoverFlow components for Flash/Flex has exploded thanks to those 3D engines listed above. A proof that simple and effective UIs are also relevant in 3D sometimes.
And it is not limited to commercial entertainment websites at all. Embedded user interfaces are yet another market you can target. The InteliSea application presented last year at MAX 2007 includes some simple 3D to display the sea state for a boat. Another proof you can make “serious” applications with 3D (and sometimes it might be mandatory).
I will talk in a further article about GIS (Geographic Information System) and 3D with Flex. It’ll be a nice follow-up.
About this entry
You’re currently reading “3D engines for Flash,” an entry on Théâtre magique
- Published:
- 06.18.08 / 4pm
- Category:
- Flash/Flex
15 Comments
Jump to comment form | comments rss [?] | trackback uri [?]