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's amazing node based editor has been invaluable in giving us the power to create textures that make the most of today's real-time pixel shaders.
Visual Effects Lead Artist
“I'm thinking Filter Forge should come with a warning: 'This Product could be Habit Forming'.”
“It's a powerful and logical way of creating effects that's relatively easy to learn by seeing how other effects are built. Creating filters from scratch is time-consuming, but for a wider user group, it's a great way to modify already-created effects.”