Good news for script authors: Filter Forge 3.0 introduces new API functions that allow access to the blending modes, uniform noise and Perlin noise.
This API is very easy to understand and use. Each blending mode has its own function, e.g. blend_normal(), blend_multiply() etc. Each of these functions accepts two RGBA colors to blend, opacity percentage and a HDR flag (not all of the modes support HDR though), and returns four return values representing the resulting RGBA color. Here's an example:
The uniform noise is an essential foundation for implementing any graphic algorithm that requires randomness. The core of the Filter Forge 3.0 uniform noise API is the get_noise() function that accepts three coordinates (yes, three: X, Y and Z), takes into account the random seed which you can set by calling the set_noise_seed() function, and returns a single value representing the noise amplitude at the specified coordinates. This example uses different Z coordinates to obtain different noise values for R, G and B channels:
Here's a filter that uses the uniform noise API to generate a randomly-colored tile pattern:
And here's another sample filter that uses the uniform noise API to implement Worley noise:
While the uniform noise API basically offers a random number generator tied to sample coordinates, the Perlin noise API implements a well-known, award-winning noise algorithm that offers smoother, natural-looking noise with adjustable scale. The core of this API is the get_perlin_noise() function which accepts three coordinates (you should definitely play with the "animated" Z coordinate in the example below) and a scale factor, and returns a single value representing the noise amplitude at these coordinates:
The noise generated by the Perlin noise API can be made seamless. You can even specify the region to be tileable:
The Perlin noise API offers a single-octave noise, so if you want a more complex noise you'll have to implement the layering yourself. Here's an example filter that emulates Filter Forge's built-in multi-octave Perlin noise via the script API:
Filter Forge is – by quite a margin – the most powerful plug-in we've looked at here. That's because it's a tool for creating plug-ins, both generative texture-creation tools and effect filters.
“So often software will advertise one thing and not deliver. Your program not only delivers but does it with ease.”
“Filter Forge does more than any of my other plugins all in one spot! I'm a kid in a candy store right now just having fun trying everything out. Fun, fun!”