picture home | art | events | music | rack extensions | downloads | pixel blog | qt_tools

omino pixel blog

pixels, motion, and scripting
david van brink // Sat 2009.03.14 14:20 // {after effects pixel bender}

AE CS4: Pixel Bender Quick Notes

Here are some super short notes about using Pixel Bender inside of After Effects CS4. This post is just another dicing of the available info culled from the After Effects help, and the Pixel Bender Developer Guide.

But it’s the stuff that I most needed to get started, as well as a handy copy-and-paste source for the parameter control types.

This is about Pixel Bender in After Effects specifically.

Installing

Let’s start at the end. To use a Pixel Bender kernel in After Effects, just drop it in the Plug-Ins folder.

  • By default, it shows up in the Pixel Bender effects category.
  • It won’t show up until the next time you start After Effects
  • If it has any syntax errors, AE will warn you as it starts up, and reject the kernel.
  • Any changes to the kernel won’t show up until you quit and re-run After Effects. (Purge-all doesn’t seem to reload it…)
  • (And you can put it in a subfolder of Plug-Ins, of course, to keep things organized.)

Authoring

Source Image To work with After Effects, near as I can tell, it must take at least one image4 source. Even if the kernel is a pure generator, it needs to take an image input.

Multiple Source Images If the kernel takes more than one source image, the additional sources can be chosen in AE by a layer control. (Grand!)

Control Types By default, all parameters show up as sliders. But you can request a different control in the parameter description.

Example

Here’s an example of a Pixel Bender kernel that just generates a solid color. It has several parameter controls on it of the different supported types, and accepts a second layer as input. These are all ignored! But we can see how the controls are displayed, which is handy.

Here’s a screen capture, with the About box. (Trivial bug, the display name isn’t used in the About box…)

pbSolidColor.png

And here’s the code for the kernel, showing the various descriptors.

<languageVersion : 1.0;>

kernel solid_color
<namespace : "omino"; 
 vendor : "Omino PixelBlog 2009"; 
 version : 2; 
 description : "Generates a solid color.";
 displayname: "Solid Color";
 category: "omino"; >
{
 input image4 src;
 input image4 src2;
 output pixel4 dst;

 parameter float4 color 
  <defaultValue: float4(1,0,0,1); 
   aeDisplayName: "Color"; 
   aeUIControl: "aeColor";>;

 parameter float angle 
  <defaultValue: 45.0; 
   aeDisplayName: "Angle"; 
   aeUIControl: "aeAngle";>;

 parameter float2 point 
  <aePointRelativeDefaultValue: float2(0.5,0.5);
   aeDisplayName: "Point";
   aeUIControl: "aePoint";>;

 parameter int popup 
  <defaultValue: 3; 
   aePopupString:"Zero|One|Two|Three|Four"; 
   aeDisplayName: "Popup"; 
   aeUIControl: "aePopup";>;

    void evaluatePixel()
    {
        dst = color;
    }
}

Onward

With this amount of flexibility, and the instant cross-platform nature of Pixel Bender kernels, the barriers to entry for effects development have been dropped to almost nothing. Great stuff!

Comments are closed.

0.0250s
(c) 2003-2013 omino.com / contact poly@omino.com