Ok, we admit that everybody’s different. Some Photoshop users can go a lifetime playing with the filters and plugins that come with the package. Some yearn to get a little more, so they go out and buy some custom ones. Some want the ultimate experience—writing their own. Adobe has a developer program that allows for really sophisticated filter and plugin development, but it has an annual cost and requires actual programming skills. If you’re into C++, go for it. If you don’t know what that is, maybe something easier is for you.

Adobe provides a “goodie” with Photoshop called the Filter Factory. It’s not installed when Photoshop is installed; you have to search for the Photoshop goodies folder and read the instructions to install it on your system. Once you do, the Filter Factory is itself a filter that is invoked to create other filters. There are instructions on how to use the filter in the goodie directory of your CD, and there’s also a pretty good tutorial on programming the filter at http://thepluginsite.com/knowhow/ffpg/ffpg.htm. We’re not going to provide a complete guide here; read the other stuff for that. What we’ll try to do is acquaint you with the basic approach.

The Filter Factory is a window-based GUI that lets you apply custom processes to each pixel in an image. When you invoke the filter from Photoshop, you get a window that contains a set of 8 sliders and three or four text panels, labeled “R”, “G”, “B”, and “A”. These correspond to the RGB and Alpha channels of the image; the Alpha channel won’t be there on the background layer. Inside each window is a preset value, which is just the small letter version of the window name; “r” is in the “R” panel. At the bottom of the overall window are some controls for loading and saving.

The basic principle of FF, as it’s often called, is that you can write an expression in each of the labeled panels that describe how the pixel value of that particular layer is to be generated. The capital letters are the output value of that layer’s pixels, small letters represent the input value. What that means is that by putting a little “r” in the “R” panel, you’re telling FF that the Red layer’s pixels are to be created by copying input to output. In short, saving the filter in the form that comes up in FF would create a filter that did nothing.

Gee, that’s useful! Maybe a little more illustration would help. Suppose you changed the R value from “r” to “r-1”? What that would do is to reduce the numerical value of the bit value of the Red channel by one for each pixel. Since a value of 0 is black and 255 is white, this would “dim” the pixel just a tad. You could similarly have said “r/2” to reduce the value to half. If you enter a constant value, you set each pixel in that layer to the constant value you entered, blowing away the original image. Putting a zero in the R panel would turn off red pixels, etc.

You can enter conditions, too. For example, you could say that you wanted to set any pixel greater than 250 to the value 250, but leave the other values alone. This is coded as follows:

r>250? 250 : r

This is an IF (r>250) THEN (make r 250; just code the constant) ELSE (let r alone).

The thng to keep in mind here is that you are coding, in each panel, a single “formula” that will describe how the value of any pixel in the image is created, for each layer. You can’t loop, nest, or do anything but write one formula per layer. Needless to say, this has a limiting effect on what you can do, but it doesn’t mean you can’t do anything useful. You can invert an image horizontally or vertically, you can make it swirl like water going ‘round a drain, you can add a specific color or remove it, etc. You can reference adjacent pixels or pixels in other locations to create the value of your output. You can also reference the value of the same pixel in another color/layer, so you can create a pixel whose red value is derived in part from blue and green.

So what are those sliders for? You can use the value of the slider to alter the value of the pixels. For example, coding “ctl(0)” will return a number from 0-255 depending on the value of the first slider (this is programming, so of course they’re numbered zero through seven). That means that putting the expression “ctl(0)” in the R panel will set all the R layer pixels to the value set on the first slider. You can also use the “ctl” slider references in tests, so you could say “r>ctl(0)? 255; 0” and turn all the pixels with a value greater than the slider to full value and all that are less to off. If you have the thing set up, experiment with doing to this on all the layers and you’ll see some crazy effects as you move the slider around! You can name the sliders and scale the values, by the way, with other commands.

The image above was created by running an FF-authored filter where each of the color layer pixels were created by the formula “x>ctl(0)? 255; 0” where “x” is r, g, or b. What this does is to maximize the value in each layer if that value is greater than the threshold or minimize it if it’s less, which creates a rather strange contrast, as you can see. I’m not saying this is a particularly useful filter, but it’s a good illustration of what can be done. If you want to try a few of these on your own, FF is on your Photoshop disk.

FF filters are also supposed to work with some other programs, like Corel PhotoPaint or Photoshop Elements, but I haven’t tried it and the FF tool may not be available on those platforms, so if you want to try it you’ll probably have to own at least an older version of Photoshop.

Copyright © CIMI Corporation. All Rights Reserved.