Login - Create Account

How Selection Affects Filter Output

Filter Forge supports the usual convention accepted in bitmap editing software that requires all operations, including filters, to constrain their output to a user-selected area known as 'selection'. The easiest approach to implement this would be to simply prohibit a filter from modifying pixels outside the selection (or, more precisely, use the selection as a mask for the filter's output). However, blocking the filters from accessing and modifying pixels outside the selection would prevent the filter authors from creating effects that spread outside the selection, such as fire, smoke and glow.

On the other hand, end-users expect the filter output to be masked by the selection. Therefore, the question is how to allow complex filters that modify the image outside the selection but at the same time to make the majority of filters limited by the selection. Here's how Filter Forge deals with this problem:

  • If a filter uses the Selection component, Filter Forge assumes that the filter needs to modify pixels outside the selection. In this case, Filter Forge does not mask the filter output with the selection – the filter output simply overwrites the original image ignoring the selection. Authors of filters that use the Selection component should perform the selection masking manually by adding appropriate components.
  • If a filter uses the Image component but no Selection component, Filter Forge considers the filter to be an image-based effect such as a distortion, and combines its output with the original image by linear interpolation using the selection as an interpolation coefficient, so that the filter output is restricted by the current selection.
  • If a filter uses no Image or Selection components, Filter Forge considers the filter to be a texture generator, and blends the filter output with the original image using the selection as a mask – the same method as in the Normal blending mode of the Blend component. The original image is 'seen through' the transparent areas in the filter output – the texture generated by the filter is 'laid over' the original image.