Pixel Bender Toolkit
From Adobe Labs
| Table of contents |
Introduction to the Adobe Pixel Bender Toolkit Technology Preview Release 4
This Pixel Bender Toolkit Preview Release 4 includes a high-performance graphics programming language that Adobe is developing for image processing, named Pixel Bender (previously codenamed Hydra), and an application to create, compile and preview Pixel Bender filters and effects. The toolkit contains a specification for the Pixel Bender language, several sample filters, and sample images provided by Pixel Bender team members.
The Pixel Bender technology delivers a common image and video processing infrastructure which provides automatic runtime optimization on heterogeneous hardware. It currently ships in After Effects CS3 and will be used in other Adobe products in the future. Flash Player 10 will leverage Pixel Bender to enable developers to create custom filters, effects and blend modes. To see Pixel Bender in action, go to the Flash Player 10 feature demos (Flash Player 10 Beta required).
Pixel Bender is a programming language used to implement image processing algorithms in a hardware-independent manner. Some benefits of Pixel Bender include:
- Familiar syntax that is based on GLSL, which is C-based
- Allows the same filter to run efficiently on different GPU and CPU architectures, including multi-core and multiprocessor systems
- Abstraction of the complexity of executing on heterogeneous hardware
- Supports 3rd party creation and sharing of filters and effects
- Delivers excellent image processing performance in Adobe products
For more details, please see the Pixel Bender language specification that is included in the Pixel Bender Toolkit.
If you would like to see the Pixel Bender presentation from the 2007 Adobe Max Conference, it is available for download as PDF from here.
Note: Your use of this site including software downloads, submission of comments, ideas, feature requests and techniques on this and other Adobe maintained forums, as well as Adobe’s rights to use such materials, is governed by the Terms of Use.
System Requirements
The minimum system requirements for the Pixel Bender Toolkit are:
Windows
- Pentium 4 or greater Processor
- 512 MB of Memory
- 50 MB of Disk Space
- Windows XP SP2 or greater
Macintosh
- G4/G5/Intel Processor
- 512 MB of Memory
- 80 MB of Disk Space
- OS X 10.4.10 or greater
Video Card Support
The following table lists the video cards supported by the Pixel Bender Toolkit.
Note: Pixel Bender Toolkit Preview Release 4 supports filter execution on the GPU and the CPU. Support for software-based rendering is available in this updated preview release.
| Manufacturer | Series | Model Numbers |
|---|---|---|
| NVIDIA | QuadroFX Series | FX 5500 SDI, FX 4500 SDI, FX 5600, FX 5500, FX 4600, FX 4500 X2, FX 4500, FX 4400 (discontinued, replaced by the FX 4500), FX 4000 SDI, FX 3500, FX 3450, FX 1700, FX 1500, FX GO 1400, FX 1400, FX 1300, FX 570, FX 560, FX 550, FX 540, FX 370, FX 350 |
| 9 Series | GeForce 9800 GTX, GeForce 9800 GX2 | |
| 8 Series | GeForce 8800 GTS/GTX/Ultra, GeForce 8600M GT, GeForce 8500 GT | |
| 7 Series | GeForce 7950 GT/GS, GeForce 7900, GeForce 7800, GeForce 7600, GeForce 7300, GeForce 7200 GS, GeForce 7100 | |
| 6 Series | 6800 Ultra, 6800 GT, 6800 GS, 6800, 6800 XT, 6600, 6500, 6200, 6200 TurboCache, 6200 LE, 6100, 6150 | |
| AMD/ATI | Radeon HD3800 series | |
| Radeon HD2000 Series | HD2900, HD2600, HD2400 | |
| Radeon X1000 Series | X1950, X1900, X1800, X1650, X1600, X1300, "All In Wonder" X1900 (X1900 GPU), "All In Wonder" 2006 PCI Express cards (Based on X1300 GPU) | |
| FireGL | Avivo PCI Express, V8650, V8600, V7600, V5600, V3600, V3300, V3400, V5200, V7200, V7300, V7350 |
Installation Instructions
Installing the Pixel Bender Toolkit is a simple process.
To install the Toolkit:
Windows
- Download the Pixel Bender Toolkit ZIP file.
- Unzip the package, navigate to the unzipped location, and run the Setup.exe application.
- The Pixel Bender Toolkit files will be installed into your \Program Files folder under \Program Files\Adobe\Adobe Utilities\Pixel Bender Toolkit.
Macintosh
- Download the Pixel Bender Toolkit DMG file.
- Double-click on the DMG item to mount the installer virtual disk.
- In that virtual disk, there is a Setup application, double-click to launch it.
- The Pixel Bender Toolkit files will be installed into your Applications folder under /Applications/Utilities/Adobe Utilities/Pixel Bender Toolkit.
To uninstall the Toolkit:
Windows: Use the "Add or Remove Programs" helper from the Control Panel.
Macintosh: Use the uninstaller application for the Pixel Bender Toolkit under "/Applications/Utilities/Adobe Installers".
Getting Started
Note: If you installed Pixel Bender Toolkit Preview Release 1, you must review What Changed in Preview Release 2 and make required changes to existing Pixel Bender files.
Windows
- Launch the Pixel Bender Toolkit from the Start menu: Pixel Bender Toolkit\Pixel Bender Toolkit.
- Load a Pixel Bender file into the toolkit by choosing "Open Pixel Bender File" from the File menu or by pressing Ctrl-O.
- To try the filter, click on the Run button on the bottom right corner, underneath the code editor window.
- If the filter requires an image for processing, you will be prompted to open an image file. If the filter has parameters, you will see editing controls in the panel on the right edge of the application.
Macintosh
- Launch the Pixel Bender Toolkit from the Applications Folder: /Applications/Utilites/Adobe Utilities/Pixel Bender Toolkit/Pixel Bender Toolkit.
- Load a Pixel Bender file into the Toolkit by choosing "Open Pixel Bender File" from the File menu or by pressing Cmd-O.
- To try the filter, click on the Run button on the bottom right corner underneath the code editor window.
- If the filter requires an image for processing, you will be prompted to open an image file. If the filter has parameters, you will see editing controls in the panel on the right edge of the application.
Tutorials
A tutorial describing how to write a simple Pixel Bender filter is available as HTML or PDF.
Pixel Bender Gallery
Share your own Pixel Bender filter creations by posting them to the new Pixel Bender Exchange on Adobe.com.
Earlier creations can be found on the Pixel Bender Gallery.
What Changed in Preview Release 2
This section contains a list of changes and new features included in Pixel Bender Toolkit Preview Release 2. Some of these changes will break existing Pixel Bender programs.
- Supports both GPU and CPU execution of Pixel Bender filters. A filter will automatically run on the CPU if your graphics card is not supported by the application.
- Supports user preferences and their persistence across application launches. The preferences include:
- Flash Warnings and Errors - with this preference checked, Pixel Bender code will be checked for validity against the subset of Pixel Bender that Flash Player supports.
- Render on Idle - this setting determines if the toolkit should try to render as often as possible. You may choose to turn off this setting to conserve power when running using battery power on a laptop.
- Force filters - this setting forces your Pixel Bender code to run on the CPU even if your graphics card is supported by the application.
- Supports exporting a Pixel Bender filter as Pixel Bender Byte Code for future use with Flash Player 10.
- Installs to a new location on your hard drive. Any pre-existing symlinks or shortcuts created against Pixel Bender Toolkit Preview Release 1 will stop working.
- There have been some changes and additions to the Pixel Bender language. Details of the changes and additions:
- Conditionals are supported in Flash-compatible Pixel Bender - you are now able to use 'if' statements in your Pixel Bender for Flash programs.
- A languageVersion statement is now compulsory in Pixel Bender files - the language version must be the first interpreted line in a Hydra file(comments excepted). This change requires updates to any existing filters.
Examples of usage:
- <languageVersion : 1.0;>
- kernel SingleDefringe
- <languageVersion : 1.0;>
- library PSBlendModes
- Images are now parameters - images are now available by name in the kernel scope instead of the evaluatePixel scope. That means that they can be used more easily in the per-frame functions like evaluateDependents and the region reasoning functions.
In addition, the function signatures for the needed and changed functions have been simplified. The input_index has been replaced by an imageRef and the domain of definition array is no longer passed in. There is a new built-in function – "dod" – that returns the domain of definition of an image. These changes require updates to any existing filters.
Here's an example of the old and new syntax:
- kernel OldSyntax
- {
- parameter float k;
- void evaluatePixel(
- in image4 foreground,
- in image4 background,
- out pixel4 result)
- {
- pixel4 fp = sample( foreground, outCoord() );
- pixel4 bp = sample( background, outCoord() );
- void evaluatePixel(
- result = mix( fp, bp, k );
- }
- region needed(
- region output_region,
- int input_index,
- region input_DOD[])
- {
- if (input_index == imageIndex( background ))
- return input_DOD[ imageIndex( background ) ];
- else
- return output_region;
- if (input_index == imageIndex( background ))
- }
- region needed(
- }
- <languageVersion : 1.0;>
- kernel NewSyntax
- {
- parameter float k;
- input image4 foreground;
- input image4 background;
- output pixel4 result;
- void evaluatePixel()
- {
- pixel4 fp = sample( foreground, tCoord() );
- pixel4 bp = sample( background, tCoord() );
- result = mix( fp, bp, k );
- }
- region needed(
- region output_region,
- imageRef input_image)
- {
- if( input_image == background ) )
- return dod( background );
- else
- return output_region;
- if( input_image == background ) )
- }
- region needed(
- }
- There are two new built-in functions in Pixel Bender to support pixel aspect ratio (PAR):
float2 pixelSize(image)
float pixelAspectRatio(image)
You can use these functions anywhere inside the kernel, as long as the image parameters to both functions are the declared global input or output image variables.
Here are a few examples:
- <languageVersion : 1.0;>
- kernel Test
- {
- input image4 src;
- output float4 dst;
- void evaluatePixel()
- {
- float2 srcSize = pixelSize( src );
- float2 dstSize = pixelSize( dst );
- float srcPar = pixelAspectRatio( src );
- dst = sample( src, outCoord() );
- }
- }
- =============================
- <languageVersion : 1.0;>
- kernel PixelSize
- {
- input image4 src;
- output pixel4 dst;
- dependent float2 srcSize;
- dependent float2 dstSize;
- dependent float srcPAR;
- void evaluateDependents()
- {
- srcSize = pixelSize(src);
- dstSize = pixelSize(dst);
- srcPAR = pixelAspectRatio(src);
- }
- void evaluatePixel()
- {
- dst = sample( src, outCoord() );
- dst.xy = srcSize;
- float temp = srcPAR;
- }
- }
- =============================
- <languageVersion : 1.0;>
- kernel Test
- {
- input image4 src;
- output float4 dst;
- region changed(region output_region, imageRef i )
- {
- float2 size = pixelSize(i);
- float par = pixelAspectRatio(i);
- return dod( i );
- }
- void evaluatePixel()
- {
- dst = sample(src, outCoord());
- }
- }
What Changed in Preview Release 4
Pixel Bender Toolkit Preview Release 4 includes some bug fixes as well as the final icons for the Pixel Bender Toolkit application, installer, and files.
Known Issues
- Some generator filters cause poor performance or may cause the Toolkit to hang when run on the CPU.
- Workaround: Run the filter on the GPU.
- The Toolkit does not support loading .exr files.
- Workaround: None. This issue will be addressed in a subsequent release.
- On some Mac systems, installing Preview Release 4 after having installed Preview Release 1 fails to remove the files installed with Preview Release 1. In some cases, the files are removed but empty folders remain.
- Workaround: Manually remove the files in the "/Applications/AIF Toolkit" folder after installing Preview Release 4.
- On a Mac, when installing the Preview Release 4, the installer Options screen displays the installation path as /Applications/Utilities/Adobe Utilities.localized/Pixel Bender Toolkit. The files are actually installed in /Applications/Utilities/Adobe Utilities/Pixel Bender Toolkit.
- Workaround: None.
Discussion Forum
Discuss the Pixel Bender Toolkit in the Labs forums
FAQ's
This section will be updated from time to time with answers to questions frequently asked in the Discussion area. If you don't see your question answered here, click on the Discussion tab to send us your questions or feedback.
