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...