Thursday, September 07, 2006

Sun, Moon, Clouds and SWFs

Thought I'd post a progress update.

Done some work in flash recently. I've uploaded the .swfs for viewing.


Firstly : Motion Capture.

This is just our basic motion capture system. Using Colour tracking. Hold a colour in position over the x in the bottom right corner, press the 'space' key, and the program will attempt to track that colour. Still needs work. ( you need a webcam to view this ).

URL : Colourgrab_05_testthresh.swf


secondly : The Sky.

Because we're doing two things (interactive sky, and simulated sky), We needed a sun that would accurately plot time. So I made this :

timeofday_timelapse.swf

It's a timelapse version of an accurate program. The code places the sun / moon in the approprate spot depending on the time of day. This timelapse program is exactly the same code, however it's me manually setting the time at a faster speed. Just so you can see the effect.

finally : Clouds.

I've spent a long time trying to get our clouds to look right.

We had so many options. Using actual images of clouds. 3d modelled clouds. Perlin Noise generated clouds.

I wanted to go with the perlin noise ( for those of you who dont know what perlin noise is, it's fractal - based noise. Great for organic textures / shapes like wood, or clouds. More information here ).

However I had *great* difficulty in creating clouds that looked right.

The closest I got was this : Noise_Xp_2.swf

I was not happy with that.
So I sat down and started again.

I decided to create clouds out of particles. Each cloud would consist of a number of these particles depending on the 'density' setting. Then I could create a randomly generated dynamic cloud with a dynamic number of particles.

Chuck a couple of filters on it, and voila - we have clouds.

I also discovered something neat along the way. Dynamically LIGHTED clouds.

Here are the clouds, minus all the filters, have a look at the shading on them as they pass the sun.

particle_clouds_03.swf

The dynamic lighting looks GREAT.
But is VERY VERY VERY cpu intensive. Unless I can find another way to do it. Im scrapping it for now.

Anyway

This is what Im happy with for now :

particle_clouds_04.swf

Keep in mind, this is just for the prototype, and I can add detail and the likes later. But I think they look pretty good! ( and most of them are draggable ).

So that's just a quick update of what I've got working so far. Now it's just a matter of writing some more code over the weekend. And I think by monday I should have 3 working prototypes. Maybe longer for the motion capture. I m still waiting on a response from a flash expert for some help with that.

Ben is currently working on getting me some RSS / XML data
Bonnie is collating sounds

And we're still waiting on a spot / shorthrow projector so we can get our specs and (Hopefully) start building soon!

No comments: