Away3D is a powerful realtime 3D engine for use with Flash and Flex. There are few 3D engines available for Flash that can make use of the new features of Flash Player 10, but Away3D support it smartly.
Following are some Away3D Pluses:
- Performance seems fantastic for this initial trial.
- The learning curve (at least coming from PV3D) is pretty freaking low.
- I love the Skybox6 class. So much easier than creating your own cube and trying to size it nicely as is required in PV3D (though making your background image seems a bit tricky and I just used one that comes with the Away3D demos download.
- While I haven’t tried them yet, the Pixel Bender filters that come with the Flash 10 release look freakin’ awesome. I’m sure PV3D X will do something similar, but I can’t wait to have the time to dig into these and see what can be accomplished.
- The materials available are terrific and slightly easier than their PV3D counterparts.
Because the program is conceptually split into two areas: the "engine" and the "application", Away3D can be used easily. The following are some basic tutorials, I hope they are helpful for you.
In this tutorial I will be showing you how to get a basic Away3D program up and running. This will be the first in a series of tutorials, and as such we will lay down a lot of foundation here that we can build on. This means that while the outcome will be quite simple, we will be creating a few classes as a result.
This tutorial will make use of the code established in the last tutorial to build an application that demonstrates the use of the Flash filters with Away3D objects, and you’ll notice that we only introduce one new class, and a few new functions.
Mouse interactivity is a must for all but the most simple web applications, and 3D flash applications are no exception. Not only does it allow the application to respond to a users requests, but allowing the user to click on and interact with an application also entices the user to investigate your application further. You’ve probably already seen this user interaction with a lot of Flash advertisements. Thankfully it is quite easy to respond to mouse events with Away3D.
The away3d.primitives namespace includes a number of common (and one or two not so common) 3D shapes that you can create and display without the need for external mesh files.
Environment mapping is a process that aims to fake the look of the external world reflected on an object. I say "fake" because even the fastest home PCs don’t have the processing to ray trace the actual world reflection in real time (at least not in any scene that has any sort of detail).
Learn how to integrate the Flint particle system with Away3D.
Away3D does not have a particle system of its own, which is a shame because particles are a great way of displaying complex effects without requiring a lot of processing power.
See how to implement bump mapping in an Away3D application.
Bump mapping is a common technique that is used to give 3D models more detail without adding more polygons. It does this by changing the brightness of the texture pixels according to a normal map and the location of a light source.
See how to use video files as textures in Away3D with this tutorial.
Although Flash started out as a vector animation tool, it has evolved to encompass a lot more. One of the features of Flash that has been very popular is its ability to play videos – YouTube is probably the best example of this.
Learn how to add a skybox to an Away3D scene.
A skybox is used to encompass a 3D scene with an image of some distant scenery. The viewer of the 3D scene can never get close to the scenery, giving the illusion that it is infinitely distant.
Learn how to integrate the Jiglib Flash physics engine with Away3D.
Away3D can load a number of model formats, one of which is the Quake 2 MD2 format. Even though Quake 2 is quite a few years old now, a number of animation tools exist to create MD2 files, and the free models already available
Learn how to load Quake 2 MD2 models in an Away3D application.
Learn how to implement the depth of field effect in Away3D.
Depth of field referrers to an effect in photography where an area of a scene is in focus, and everything before and after that area is blurred. In 3D rendered scenes normally everything is in focus unless some special effort is made to implement a depth of field effect. In Away3D this effect can be achieved by using the DofSprite2D class.
Learn how to add 3D text to a scene in Away3D.
A new feature to Away3D 3.4 is the ability to create 3D text. The 3D Text screensaver for Windows is a good example of this effect. This ability actually comes from the swfvector library, which the Away3D TextField3D class uses to create a 3D model from a font definition. The TextExtrude class can then be used to create characters with depth.
At this first part. we look at getting the Away3D engine up and running by creating a UIComponent that will contain and initialize the necessary Away3D components.