Joa Ebert has been making the blog rounds with PBDT, his extension for Eclipse for PixelBender development. I had been waiting for the Pixel Bender command-line utility release, and somehow missed its announcement at Max 2008, and only came to know about it through PBDT. However that works out, I can now provide an update to my Pixel Bender bundle for TextMate.

There are two major additions. The first is a simple “Build” command, actually called “Compile Kernel” and mapped to Command-B in the source.pixelbender scope (i.e., pbk files). It uses pbutil to compile your current pbk file into a pbj file, using the same base name and putting it in the same directory.

The second is a much more ambitious “Run” command. It’s actually called “Test Kernel” and is mapped to Command-R for pbk files. This one compiles the kernel (to a temporary location, unfortunately), then launches a little Flash widget that loads some images and the freshly compiled kernel. The Flash portion of this is not quite finished, but it’s pretty functional so far. It works well with all of the pbk files supplied with the Pixel Bender download (once you comment out the non-Flash compatible stuff; there is a bug with the compile-time variable AIF_FLASH_TARGET), bringing up sliders for the numeric parameters and even putting a second image into the second ShaderInput if required. However, the whole controls/parameters thing needs some more work for Boolean and Matrix types, and the ShaderInput needs more love. But it’s a good start. The fact that it worked with the 6 sample pbk files was victory enough for me. I’m sure we’ll run into limitations as it gets used more. As a bonus, once the preview is running, you can load in a different image or pbj file.

Hitting Command-R in a PBK file will compile and test the kernel.

Hitting Command-R in a PBK file will compile and test the kernel.

For this to work you need to have the Pixel Bender Toolkit installed. The bundle assumes pbutil is installed in the default location, which is /Applications/Utilities/Adobe Utilities.localized/Pixel Bender Toolkit/pbutil (that’s actually an alias to the tool within the Pixel Bender Toolkit app bundle). Also, you’ll need Flash Player 10, (note that Flash CS4 is not required; the idea here is to do Pixel Bender development outside of the normal Adobe tools). Beyond that, it should just work.

This is still very much experimental; if you have problems or suggestions, please notify me via the comments. The source is all included with the bundle, so if you feel like getting your hands dirty dig in, either with the TextMate stuff or the Flash stuff. If I were to actually take the time to officially release this with a license, it would be one of those open source dealies, so feel free.

Advertisement