UnitZeroOne

Avatar

A blog written by Ralph Hauwert, freelance front-end developer, specialized in rich internet applications, games and visualisation.

FITC Chicago and Seoul & Papervision3D Workshops.

I just returned from teaching the Papervision3D workshop in Sweden; it was an awesome group and good fun! For all those who attended : Thank you very much for the good and fun workshop, you where an awesome group! Also many thanks for Johan and Marcus from the local usergroup for helping out with the event!

This week Saturday I’ll be heading off to Chicago to be part of the FITC Chicago event. I’m looking forward to doing my Flash 2D & 3D effects session as well as a 1 day workshop on Papervision3D. If you haven’t registered yet, make sure you do so as there are still some tickets left, but they are going fast!

Register here for the RMI Papervision3D 2.0 workshop Chicago.

Sorry for the silence on this blog lately, personal matters take priority and as such it will be more quiet here over the coming months. But expect a nice blog on some exiting news here tomorrow. Looking forward to see any of you attending FITC Chicago.

And then some more exiting news; FITC Seoul is happening and I am lucky enough to be invited to come over and speak amongst these great names ; Joshua Davis, Erik Natzke, Kyle Cooper, Richard Galvan, Marcos Weskamp, and Euna Seoul. With such an awesome line up, I’m sure this will surely be a success and a opportunity for us to reach out to the korean / asian community! Looking forward to see any of you there!

Bustrip to Multimania ! Still places left !

The Adobe User Group Netherlands has organized a bustrip from the Netherlands to belgium…yes, an oldschool bustrip ! The FREE Multimania event will be held on the 23rd of this month, and will feature speakers like Aral Balkan, Mario Klingemann, Jason Levine, Serge Jespers, Dave Schroeder and incidentally, I, Ralph Hauwert will be speaking there too.As such I’m looking forward to hopefully see you at my session and/or have a beer and a chat afterwards! It promises to be a lot of fun; for those of you in the Netherlands, wanting to join the organized trip, here’s the invite from the Adobe Usergroup Netherlands (dutch, sorry) :

Ga mee met AUG naar MultiMania 2008!
De Adobe User Group Nederland organiseert een reis naar MultiMania, dat vrijdag 23 meivoor de 8e achtereenvolgende keer in Kortrijk, Belgie plaatsvindt. MultiMania is het grootste gratis multimedia event van Europa, en met maar liefst 30 internationale sprekers en presentaties op het gebied van design, development, audio, video, 3D en game development is er voor iedereen wat wils. Aan het einde van de dag is er een exclusief feest, gesponsord door Boulevart. Ga mee met de AUG in de touringcar naar MultiMania!

Sprekers op de conferentie zijn onder andere Group94, Rob Chiu, Aral Balkan, Mario Klingemann, Jason Levine, Sander Lipmann, Ralph Hauwert, Serge Jespers, Capt. Luke en nog veel meer. Kijk hier voor het volledige programma.

Er is door de AUG een touringcar geregeld die vanuit Amsterdam, via Utrecht en Breda naar Kortrijk in Belgie rijdt. In de avond wordt iedereen door dezelfde bus weer netjes naar Nederland gebracht. Geen gezeur met gemiste treinen, vertragingen of ‘de bob zijn’ maar met vakidioten en studenten een gezellig uitje met de Adobe User Group! De kosten van deze bustrip bedragen 39,50 euro en als je student bent betaal je maar 24,50 euro. Om jezelf aan te melden voor deze trip, ga je naar de inschrijvings pagina. Hopelijk tot ziens op de 23e!

OpenSource Image Dithering for AS3. (demo+source).

Intro

As promised in my previous post, here’s a small opensource project from my side. It’s tiny, really, but I hadn’t seen an ActionScript implementation of any form of Image dithering before.

Dithering….what ?

Just a brief explanation what dithering in this context means. From wikipedia :

Dither is an intentionally applied form of noise, used to randomize quantization error, thereby preventing large-scale patterns such as contouring that are more objectionable than uncorrelated noise.”

Words to take note of in that sentence are quantization, and “intentionally applied form of noise”. In our case quantization is the removal or swapping of colors. The form of noise applied differs over the several implementations and in so called “ordered dithering” it’s hardly noise, rather a carefully chosen threshold matrix.

Dithering, why ?

Dithering imagery has been around for some time. Put a close eye to any black and white printed newspaper’s pictures and you’ll see the effect.

It’s basically been around a lot longer then I have in my 28 years of life…that’s for sure. I first learned terms like “ordered dithering” and “Floyd-Steinberg Error Diffusion” in my young and early days on the Amiga hardware. See, in those days computer hardware wasn’t capable of displaying the huge arrays of colours like now-a-days. Since you then had few colours to spare (a typical amiga workbench ran at 16 to 128 colours or so), you needed to be creative to get yourself a nicely pimped desktop image, whilst still sparing colours for your icons.

A better example of a dithering implementation for our industry is probably that checkbox when you want to save for web in Photoshop, using GIF. Or when you print something on a pure black and white printer.

Conclusion; dithering is normally used to create the illusion of tones on a device which is otherwise not capable of displaying it. So why port this to our ARGB/32Bit enabled Flash Player ? Part of the reason why I worked on this is because I just like the aesthetic of the effect. It just brings back wonderful memories of pimping my Amiga desktop.

Dithering in AS3

So, the algorithms for dithering are really quite simple. I was playing around with hydra Pixel Bender and had some ideas on converting some old algorithms to have them run in realtime. Then I thought I could make this run in realtime on Flash 9. So, first I did a version of the Algo in pure AS3. I played around with converting it to something fast enough to run at at least 20 frames per second on an average machine…and painfully failed. The remains are the AS3 version (hydra Pixel Bender version still in progress)….and I decided to clean that up a bit, and have it released as an OS project for anyone to use.

Currently it only contains so-called error-diffusion based ditherers. They make the most sense anyway, since the ordered ditherers really have nasty visual sideeffects, like Bayer’s crosshatches. Check the variants out in this little demo application using the class.

The Demo : try and use “No Dithering” first to see the effects of regular palette conversion.

The Source

Usage :

ImageDithering.dither(bitmapData, type, levels, grayscale);

Where :

BitmapData is the image to be manipulated.

Type is the form of dithering, currently supported :

  1. ImageDitheringType.FLOYD_STEINBERG
  2. ImageDitheringType.FALSE_FLOYD_STEINBERG
  3. ImageDitheringType.STUCK
  4. ImageDitheringType.NO_DITHER

Levels is the amount of colour levels to quantize to per channel.

Grayscale is a boolean indicating whether to convert the image to grayscale before the process is ran.

Right click and viewsource on the example to see how it’s implemented in Flex.

Quick update : Mario Klingemann, working on Aviary’s Peacock did a quick test with it. My effort had some use anyway!

Next,

Search

Projects & Work

A selection of current work

Advertising