Saturday, 16 April 2011

Waves and models



A practical application of a wave formula, animating a Manta Ray.

To keep the body steady while animating the "wings" the formula applies amplitude depending on distance from the centre, multiplied by a cosine to give a fairly smooth transition from centre to wing tip. The formula is still fairly simple and can definatly be improved upon. The movement, though graceful is not true to life (yet).

The Coast/Swim button will freeze and start the animation less abruptly then simply turning animation on and off.

This demo was inspired by a WebGL JellyFish by Aleksandar Rodic.

The source files are there. The model, by "Kare Ola" can be downloaded from TurboSquid

Friday, 15 April 2011

Wave Modifier



Spurned on by the success of my first Away3D 4.0 Experiment and what with it being friday afternoon, I thought I'd try another one.
After looking at the docs (I know, cheating really) I tried making a wave modifier.
Considering the maths is all on the CPU it runs quite well. There is massive room for optimisation by making the wave function run as a GPU program. Maybe something for next friday...

Looking at the code it might look complicated, but that's just me over-engineering the demo. The interesting bit is "incrementWave" that basically moves all vertices in the Z plane using a sign function, depending on their x and y positions.

"Change Image" gives you a grid pattern so you can see the wave more clearly.

Thursday, 14 April 2011

Away3d 4.0

Now that the Flash player 11 alpha is in the wild, the Away3d team have released Broomstick, a GPU accelerated version, with the familiar feel of Away.
Development with Molehill is not for the faint hearted, and accessing the alpha technology through an alpha framework is bound to cause you to start smoking again, but hey, it's also fun to pioneer new technology.

For a primer on the "new" way to do 3D, and a sum up of the technologies, you could do worse than check out this presentation, "brief" (about 100 slides) about Flash, WebGL and Unity. http://www.inear.se/2011/04/a-brief-introduction-to-3d/

Lucky for me, I've got time to play with this stuff right now.
Experiments to follow...

Monday, 1 November 2010

Mountains from Molehill

I've always been quick to criticise Adobe for their handling of Flash and the Flash community and so I feel it's only fare to give them deserved kudos in light of recent developments.

I'm mainly referring to the upcoming Molehill 3D API's, but also their inroads into the mobile market.
While we lowly developers will have to patiently wait for the "the first half of 2011" to get our hands on the new Flash Player with access to OpenGL/DirectX, I think it's worth noting that Adobe have been smart enough to allow leaders in the realm of 3D Flash, namely the excellent Away3D and Alternativa teams, early access to the technology. They have already built convincing demos, http://www.bytearray.org/?p=2310.

After a shaky year which has seen Flash scuppered by Apple, only to be reinstated, it now looks like Flash will retain it's title as the absolute most ubiquitous platform for multi-media applications on practically all platforms, web, iOS, Android, Windows mobile and emerging TV technologies.

I am excited to be a Flash developer again. I can peddle my wares with confidence and continue to maintain over for my clients that Flash is the best platform currently available for their projects and will continue to be so, giving longevity to their investments in online/mobile applications.

Just a year ago I was daunted by the idea that I would have to master new technologies and languages to operate in the fragmented world of mobile devices. Now, through the hard work of the Adobe engineers we can effortlessly leverage our flash skills in new areas. It is a wonderful gift they have given us and I am truly thankful (for once!)

My two main skills have always been Flash and 3D. Flash in 3D has always been one huge workaround. To see these two mediums come together so convincingly is truly awe inspiring. I'm looking forward to making Mountains out of Molehill and pushing the *new* boundaries of Flash.

UPDATE: Now Available on Labs! http://labs.adobe.com/technologies/flashplatformruntimes/incubator/

Thursday, 12 November 2009

Marching ants revisited...







When you're creating online applications you often want to mimic the tools people are used to from the desktop. The classic marching ants selection marker is a good example and even easier than before, now that the lineBitmapStyle has been added to AS3.


matrix.translate(0.5, 0);
this.graphics.clear();
this.graphics.lineStyle(1);
this.graphics.lineBitmapStyle(ants, matrix, true, false);
this.graphics.drawRect(downX, downY, extentX, extentY);


Fullpage Example Click and drag to make a marker.
Flash Source

Tuesday, 10 November 2009

Menu in a Bottle

Original? No.
Useful? Not really.
Flashy? Definately!


Forked on Wonderfl

Thursday, 22 October 2009

My HERO


A few days ago I recieved my new phone. With all the recent hype about CS5 and iPhone it may have escaped some flash developers attention that the HERO already ships with Flash player. Currently this only runs AS2, although video is running perfectly (YourTube, TED) in fullscreen, and the F10 player is on the way. What can I say, the HTC HERO is the best phone I've ever seen. It has all the polish and easy of use of the iPhone, but the operating system is open source, and the majority of apps are free. Some of those free apps blew me away. Layar is the first usable Augmented reality app I've tried, though I know there are similar apps out there. The phone comes all rigged up to several Google services, search (naturally), maps, mail and my favourite, a Google app called Sky Map, that instantly turns you into an expert on the constellations. I always wanted to learn the night sky and with this app you just point the phone in any direction and it shows you the names of the stars you're looking at. The first thing I saw looking south out of the window was Uranus. I never knew you could see Uranus with the naked eye ;O)

I am impressed. There was an app I couldn't find though, a magnifying glass, so today I downloaded the SDK and built it! Depsite the fact I've never actually written a Java application before, this evening I made my first Android application, using completely free tools. The Android phone emulator makes developing for Android phones a doddle. When you're used to Flex, using Eclipse for Java is a no brainer. Once you get over the initial differences in syntax, developing Java is very similar to making AS3 projects in Flex and I would encourage any Flashers turned Flexers to give it a try. You never know, it may be the start of a new career...

Over the weekend I intend to get the app finished and on the app store. If that proves possible, it will be the absolute fastest "from-idea-to-market" cycle ever!

If like Bonnie Tyler you've been holding out for a Hero, wondering whether to buy one or not, my advice is go for it, 100%. Apparently the first version with HTC "TouchFLO" was a bit choppy, but that's been fixed and mine came with the very latest BIOS already pre-installed.