Pena Contents
Introduction
Control Pane
Brush Pane
Texture Pane
Effects Pane
Color Picker
Save/Load Pane
Selection Pane
Preferences Pane
Intelligent Canvas
Wacom Bluetooth Stylus
Jot Bluetooth Stylus
 
The Effects Library
Effects Introduction
Color Source Effects
Procedural Source Effects
Color Filter Effects
Spatial Filter Effects
  • Color Filter Introduction
  • Airbrush
  • RGBA Discard
  • RGBA Replace
  • Selective Discard
  • Selective Replace
  • Star Template
  • Stipple
  • Texture Displace
  • XY Ripple
  • XY Rotate
  • XY Twist
  • Math and Logic Effects
    Special Effects
     
    Artists Gallery
    The Artist Gallery
     
    Pena Support
    Troubleshooting

       

      Previous SectionHide ContentsNext Section


      Effect:Selective Discard
      Category:Spatial Filters
      Speed:Medium

      Description: The Selective Discard Effect is extremely important in Pena as it lets you ignore a particular range of color while painting. This is a more complex to setup version of the RGBA Discard Effect, but also offers finer control over the results.

      Discard Effects let you set a range of color that are not written to the Canvas. A simple example of how this is useful is when painting some Effect that contains black. You can use a Discard Effect to ignore black, or a range of dark colors, allowing your brush to be more integrated with the Canvas.

      Selective Discard lets you specify a range for each color channel. This means you can set a Red, Green, Blue, and optionally Alpha range to compare against.

      If the Minimum Value is higher than the Maximum, then this acts as a Notch Filter. Colors below the Maximum and colors above the Minimum are discarded.

      To help illustrate this consider the following:

      In the above image, black represents the value 0 and white is 255. In the top illustration you can see that when the Minimum is lower than the Maximum, the colors in between those two values are discarded. However, in the bottom illustration Maximum is below Minimum. You can see that the opposite colors, from the first illustration, are discarded.

      You will also notice that there are no Output Color options for Selective Discard, and there is no way for this Effect to work on Color 2. This is because the discard operation actually inhibits drawing to the Canvas. Since Color 2 is never drawn to the Canvas, this Effect can only operate on Color 1.

      It is important to understand how a Discard works. When a color is discarded, nothing is written to that pixel, regardless of what Effects are yet to be executed. A Discard stops the execution of the rest of the Effects, for that pixel. If you do not want execution to stop consider using the Selective Replace Effect with Color 2 set to a transparent color.

      Note that Discard slows down painting. If using this function is too slow use Selective Replace instead with Color 2 set to a transparent color.

       
      Options: The Selective Discard Effect has the following Options Pane:

      Use Color 2:If set to a Red X then Color 1 is used for the range check. If set to a Green Check Mark then Color 2 is used for the range check. Regardless of how this is set, Color 1 is always the color being discarded. This controls which Color channel is used to determine whether or not Color 1 is discarded.
      Red Minimum:This value works together with Red Maximum to determine what range of colors to ignore (discard). When this is lower than Red Maximum, any colors between, and including, Red Minimum and Red Maximum will not be drawn to the Canvas. When Red Minimum is larger than Red Maximum, the test is inverted. Colors between the Red Maximum and Red Minimum are drawn to the Canvas, and values outside that range are not drawn.
      Red Maximum:This value works together with Red Minimum to determine what range of colors to ignore (discard). When this is lower than Red Maximum, any colors between, and including, Red Minimum and Red Maximum will not be drawn to the Canvas. When Red Minimum is larger than Red Maximum, the test is inverted. Colors between the Red Maximum and Red Minimum are drawn to the Canvas, and colors outside that range are not drawn.
      Green Minimum:This value works together with Green Maximum to determine what range of colors to ignore (discard). When this is lower than Green Maximum, any colors between, and including, Green Minimum and Green Maximum will not be drawn to the Canvas. When Green Minimum is larger than Green Maximum, the test is inverted. Colors between the Green Maximum and Green Minimum are drawn to the Canvas, and values outside that range are not drawn.
      Green Maximum:This value works together with Green Minimum to determine what range of colors to ignore (discard). When this is lower than Green Maximum, any colors between, and including, Green Minimum and Green Maximum will not be drawn to the Canvas. When Green Minimum is larger than Green Maximum, the test is inverted. Colors between the Green Maximum and Green Minimum are drawn to the Canvas, and colors outside that range are not drawn.
      Blue Minimum:This value works together with Blue Maximum to determine what range of colors to ignore (discard). When this is lower than Blue Maximum, any colors between, and including, Blue Minimum and Blue Maximum will not be drawn to the Canvas. When Blue Minimum is larger than Blue Maximum, the test is inverted. Colors between the Blue Maximum and Blue Minimum are drawn to the Canvas, and values outside that range are not drawn.
      Blue Maximum:This value works together with Blue Minimum to determine what range of colors to ignore (discard). When this is lower than Blue Maximum, any colors between, and including, Blue Minimum and Blue Maximum will not be drawn to the Canvas. When Blue Minimum is larger than Blue Maximum, the test is inverted. Colors between the Blue Maximum and Blue Minimum are drawn to the Canvas, and colors outside that range are not drawn.
      Alpha Minimum:This value works together with Alpha Maximum to determine what range of colors to ignore (discard). When this is lower than Alpha Maximum, any colors between, and including, Alpha Minimum and Alpha Maximum will not be drawn to the Canvas. When Alpha Minimum is larger than Alpha Maximum, the test is inverted. Colors between the Alpha Maximum and Alpha Minimum are drawn to the Canvas, and values outside that range are not drawn.
      Alpha Maximum:This value works together with Alpha Minimum to determine what range of colors to ignore (discard). When this is lower than Alpha Maximum, any colors between, and including, Alpha Minimum and Alpha Maximum will not be drawn to the Canvas. When Alpha Minimum is larger than Alpha Maximum, the test is inverted. Colors between the Alpha Maximum and Alpha Minimum are drawn to the Canvas, and colors outside that range are not drawn.
      Compare Alpha:If set to a Red X then the Alpha Channel will not be included in the range check. If set to a Green Check Mark then the Alpha Channel is considered in the range check.

      Example: To show the Selective Discard Effect we are going to combine a number of other Effects.

      We begin by have a source image on our Canvas and an Effect Image. The picture below shows our two source image:

      The image on the left was already painted onto the Canvas. It was created by the Sky with Clouds Effect with default values and Color 1 set to white and Color 2 set to a dark blue.

      The image on the right is our Arches National Park photo and was loaded into Slot 1 as a Texture with default values:

      So, we have the Sky with Clouds already on the Canvas, and our Arches photo in Slot 1 as a Texture. In Slot 2 we load the Selective Discard Effect with the following values:

      1. Red Minimum = 0, Red Maximum = 99
      2. Green Minimum = 32, Green Maximum = 255
      3. Blue Minimum = 64, Blue Maximum = 255

      When we paint the Canvas with this effect we get this result:

      Note how the Sky with Clouds effect has replaced the sky in the original Arches Photo.

      The colors in the photo had to be in the range of all 3 color channels (R, G and B) for it to be discarded.

      A good way to determine the range of colors you may want is to use the Color Picker Eyedropper feature.

       

      Previous SectionHide ContentsNext Section

    pena © 2014 by David Cook
    Apple®, the Apple logo, iPad, iPad Air, iPad Mini, iPod, iPhone, and iTunes
    are trademarks of Apple Inc., registered in the U.S. and other countries.
    Wacom®, and Wacom Intuos Creative Stylus are trademarks of Wacom, registered in the U.S and other countries.