Archive for May, 2008

May 23, 2008

Using Pixel Bender in Flash Player 10

Lee Brimelow has posted a code snippet to show you how to load Pixel Bender filters in your Flash projects at runtime. I expect a zillion fun Flash-based image and video processing apps to spring from this…

Tinic Uro has posted a really nice backgrounder on how Pixel Bender works in the Flash Player and how it is different from running in the Pixel Bender Toolkit. A must read if you want to understand the nitty gritty.

If you’ve got the Astro beta, you should check out the new version of the TubeView filter that Petri Leskinen wrote. This has been one of my favorite filters to demo with because of all the fun James Bond-ish possibilities…

4:25 PM Permalink
May 21, 2008

the formatter in action!

I forgot to post the example! Here is the Fade To History kernel I posted yesterday, run through the formatter:

<languageVersion1.0;>

kernel FadeToHistory
<   namespace : “Kevin’s Tutorial Filters”;
    vendor : “Kevin’s Filters, Inc”;
    version : 1;
    description : “Fade from color to B&W to sepia”;
>
{
    parameter float crossfade
    < minValue0.0;
      maxValue2.0;
      defaultValue0.0;
    >;
    const float3 lumMult = float3(0.30.590.11);
    
    input image4 src;
    output pixel4 dst;
    
    void
    evaluatePixel()
    {
        dst = sampleNearest(src,outCoord());
        float luminance = dot(dst.rgb, lumMult);
        float3 sepia = float3( dst.r * 0.4 +
                               dst.g * 0.769 +
                               dst.b * 0.189,
                               dst.r * 0.349 +
                               dst.g * 0.686 +
                               dst.b * 0.168,
                               dst.r * 0.272 +
                               dst.g * 0.534 +
                               dst.b * 0.131 );
        
        float3 startMix = dst.rgb;
        float3 endMix = float3(luminance);
        float mixValue = crossfade;
        if ( crossfade > 1.0 )
        {
            // normalize mix value to the range of 0-1
            mixValue -= 1.0;
            startMix = float3(luminance);
            endMix = sepia;
        }
        dst.rgb = mix(startMix, endMix, mixValue);
    }
}

6:59 PM Permalink

Pixel Bender HTML formatter

While the PRE tag is ok for displaying code, it always bores me. I like my code to look more interesting. When I was posting the code yesterday, I was asking around the company for formatting tips and I realized that it might be fun to do my own formatter, so I fired up Flex, read up on the String class and created the tool below. Usage is pretty simple, paste your code into the upper text box, hit the "Convert To HTML" button, see the text appear in the second text box and then hit the "Copy HTML to clipboard" button and paste into your blog or web page as raw (and very ugly) HTML code.

(sorry for the size, narrow blog templates)


6:43 PM Permalink
May 20, 2008

the return of the Fade into history

I was prepping the Fade Into History filter that I had written as a tutorial here for the Pixel Bender Exchange. I realized how much the language had changed since I first wrote it. So in addition to having it on the exchange, I thought I’d post the updated source here, so that you could have it. Also, I’m including the .pbj version (Pixel Bender Bytecode for Flash) in case you are looking for something to play with in the Pixel Bender Demo for Astro.

Here’s the source:

<languageVersion: 1.0;>

kernel FadeToHistory
{ parameter float crossfade ; const float3 lumMult = float3(0.3, 0.59, 0.11); input image4 src; output pixel4 dst; void evaluatePixel() { dst = sampleNearest(src,outCoord()); float luminance = dot(dst.rgb, lumMult); float3 sepia = float3( dst.r * 0.4 + dst.g * 0.769 + dst.b * 0.189, dst.r * 0.349 + dst.g * 0.686 + dst.b * 0.168, dst.r * 0.272 + dst.g * 0.534 + dst.b * 0.131 ); float3 startMix = dst.rgb; float3 endMix = float3(luminance); float mixValue = crossfade; if ( crossfade > 1.0 ) { // normalize mix value to the range of 0-1 mixValue -= 1.0; startMix = float3(luminance); endMix = sepia; } dst.rgb = mix(startMix, endMix, mixValue); } }

Download the pbj file

11:32 AM Permalink
May 16, 2008

The Pixel Bender Exchange is now live!

Waay easier to post on than the Pixel Bender gallery wiki page…

We’ve primed the pump with some of the filters from the install of the toolkit and we’ll add some more from the team soon.

http://www.adobe.com/cfusion/exchange/index.cfm?event=productHome&exc=26

or

http://www.adobe.com/go/pixelbender/

10:08 AM Permalink
May 14, 2008

Astro Beta and new Pixel Bender Toolkit now available!

Big news tonight!

Finally, you don’t have to just hear about Pixel Bender Filters and play with them in the toolkit, now you can actually try some of them out! The beta of Astro is now available. Check out the demos to see Pixel Bender Shaders running on images, vectors and video in real time!

Also, today we released a new Pixel Bender Toolkit on our new Pixel Bender wiki pages. What is new in this release? The new name, obviously, but also some bug fixes and some new features (check out the preferences dialog box!)

More info soon!

10:47 PM Permalink
May 5, 2008

Hydra is now Pixel Bender!

Hydra is an awesome name for a language like the one we created. At the very beginning, Jonathan Shekter came up with it as a code name for this cool language that could run on different kinds of hardware efficiently. The problem is that it’s a great name for any kind of technology that does multiple things, so it is pretty popular. We didn’t want to confuse folks, so we worked with the Adobe branding team to come up with a new name that we could use moving forward. That name is Pixel Bender ™.

So from now on, if you hear me say “hydra” in a 1:1 conversation (sorry, conference talks are out), you can call me on it and I’ll give you a cool limited-edition hydra pin (while supplies last).

Along with the name change of the language, we’re also changing the name of the “AIF Toolkit” to be the “Pixel Bender Toolkit.” The file extensions will also change. We should be posting a new version of the toolkit soon with these changes.

very obscure reference/fact
It is only partially true that the name Pixel Bender won out over another internal favorite “Shektran” because I was hoping to finagle a visit to Rough Draft Studios or The Curiosity Company (joke).

5:14 PM Permalink