First Look To Pixel Bender

September 14, 2008 – 8:36 pm

What is Pixel Bender?

Shortly Pixel Bender Toolkit is small IDE which allow you to create your own Bitmap Filter. With Flash 8 we start to use to filters for display objects. But those filters were basic filters (Glow, Blur, DropShadow etc). If you want to go one step further with filters than you need it to use matrix and color channels. But of course they were all somehow limited.

With Pixel Bender instead of basic filters you can create your own filters or visual effect that you want.

Ps: Click the link at below for basic usage of filters;
http://enginyoyen.com/blog/eng/index.php/using-filters-with-actionscript-30/


How Pixel Bender Works?

Pixel Bender Toolkit is a small IDE. You can create the Filters in this IDE. Pixel Bender Toolkit has three basic areas;

Pixel Bender Toolkit

First part allows you to see the result of code that you wrote on image. The image over here is only for testing and it could be any image on your hard drive. Target is only seeing the result of code in real time.

Second part is the simple code editor.

Third part is place where the parameter of filter being controlled. For example blur filter has a three parameter (blurX, blurY, Quality). BlurX is blur amount that will apply to x coordinate. This is the first parameter of blur filter. If we make the blur filter in Pixel Bender Toolkit this three parameter will take place on third part.

The filters which you create in IDE can be export it as a .pbj file. Pbj is extension of Pixel Bender Toolkit. For using the filter which been export it, first you need to load the file in Flash Player. You can do this by using URLLoader class. After you load the filter file you can use the filters property of display object and apply to filter to any display object you want.

Language in Pixel Bender Toolkit

Pixel Bender is based on GLSL which based on C. If you have experience with C you won’t have problem to use it. If is not it may be hard at beginning.

For more information about GLSL;
http://en.wikipedia.org/wiki/GLSL

PBJ File Format and Working System in Flash Player

The filter which been created in Pixel Bender Toolkit can be export as an external .pbj file. This file has a byte code which represent the filter. The working system over here is similar to swf files. They both carry byte codes. By this way filters doesn’t use the GPU. There is a lot of reason for this. But mostly for stopping or not causing any problem in future for using the filters.
There is one more point that I want to mention; is still not clear what pbj file format do contains. Also there is no documentation about this. I think this will also be more clear or certain in first release.

Platform Support

Pixel Bender Toolkit at the moment is available for Windows and Macintosh platforms. Kevin Goldsmith in his blog said Pixel Bender will support all platforms in January. But much is I know is still not available for Linux. Of course this is not official information. I think after first release they will work on Linux. At least that what I hope.

Advantages

For me the biggest advantage is the way we see the web will change with Flash Player 10 in the meaning of visually. Actionscript developers can make and publish they own filters and that after while there will be rich library for filters. Of course this means much more interesting animation and different way of look to visual materials.

Even if you don’t create your own filter, still you are able to use the filters which have been created by Pixel Bender Toolkit.

Filters are not only for flash Player. You can also use the filters in After Effects.

We can also use the filters as a blend mode in Flash. So if you are not happy from existing blend modes for videos or BitmapDatas you can create your own BlendMode.

Disadvantage

The disadvantage of Pixel Bender for Actionscript developer is the C language. People which is not using or not have any experience with C language will have bit of trouble at the beginning.

Upshot

Using Pixel Bender it might be hard at the beginning. But after getting know the syntax a bit I don’t think will be to hard to create something interesting. In next article I will explain how you can use Pixel Bender Toolkit.

Take Care
Engin Yöyen!


  1. 1 Trackback(s)

  2. Nov 5, 2008: Engin Yöyen - Stay Updated On Web » Blog Archive » Beginning To Pixel Bender - 1

Leave a Reply