Away3D Lite: 1000 animated 3D sprites
3d Flash, Away3d Lite code demos October 27th, 2009Get ready for Mariogeddon!
Away3D Lite has seen two important additions in its 1.0.2 dot release: MovieMaterial and Sprite3D. The former is a direct port of the standard library counterpart - the latter a slightly more advanced version of the Sprite2D class that accepts a material rather than a bitmap as it’s primary skinning technique.
Combined, these additions allow new and interesting setups like the one demoed above! Here we have 1000 Marios created using Sprite3D objects, fed from a single MovieMaterial. The material uses a second (hidden) view to render the actual Mario object. It would be virtually impossible to do this effect any other way, as the mario model has around 500 faces, multiplying up to a whopping 500,000 faces if each were an actual 3D object.
Some controls on the demo allow you to navigate around - click and drag to spin the cube, use Up & Down cursor keys to zoom in & out, and if you get bored with the slightly regimented nature, press the Spacebar to animate!
Another feature of the new Sprite3D object used here is an optional positioning technique which helps with simulating perspective. As the Sprite3D object is just a simple quad in 3D space, it needs to be constantly rotated to face the camera in order to appear face-on. In standard billboarding, the orientation is made to appear uniform at any position in the view (ie. as if the sprite’s bitmap has just been scaled). With the Sprite3D object in Away3D Lite, we can use a trick that counters this uniform look to appear more natural at wider angles, called “viewpoint orienting”. Check out this article which explains what i’m on about much better than i can here.
Further additions in 1.0.2 are the introduction of quads to a face object (which reduces sorting costs), the brand new AwayStats panel (with more than a nod to DoobStats
), and the welcome return of the View Source menu item! Right click anywhere in the demo to open the menu, or access the source files directly from here. Of course, compiling requires the very latest update from the Away3dLite svn repository.
Stay tuned for a more official Away3D Lite release (v1.1.0), coming soon…

















October 27th, 2009 at 8:50 pm
Nice! The demo produces a pretty nice tunneling effect as you see through different alignments in the Mario invasion cube…
October 28th, 2009 at 12:16 am
FR 3/60 A 4
this flash 3D thing is not for my PC any more
October 28th, 2009 at 8:06 am
Wow Rob! I just tweeted this, do you know when we get to see this kind of action in regular Away3d?
October 28th, 2009 at 9:16 am
@makc
Damn! what are you running?!
@Peter
thanx for the tweet! The core of Away3D Lite is optimised for Flash 10 so benefits will only ever be ported across to the Flash 10 version of Away3D. But we certainly hope to be doing this in the next few months.
November 4th, 2009 at 10:34 am
I just wondering what are you using to build/compile source? i tried with flex builder and flashdev with 3/4 sdk and i cant receive any performance like in yours demo.
everything works fine but frame rate in yours is 5 times better. So what i’m doing wrong?
thanks for your thoughts
November 4th, 2009 at 11:11 am
@manurespreader
could be that you need to compile a release build? running a flex project in debug mode can halve some framerates, although that may not explain everything. If you are using osx 10.2 or 10.3 on a mac, Flash 10 is severely slower. Finally, your computer spec may be lower - what are you running?
November 4th, 2009 at 12:54 pm
yes sure… tried to compile a release build and its increased from 3 average fr to 17 much more better
thanks again
November 23rd, 2009 at 8:37 pm
what is wrong about the website “away3d.com”,I can’t view it.I’m in China。