pena © 2014 by David Cook
The RGBA Discard Effect is extremely important in Pena as it lets you ignore a particular range of color while painting. This is a simpler, and faster to setup, version of the Selective Discard Effect.|
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.
RGBA Discard takes a single Minimum value and a single Maximum value. When the Minimum is smaller than the Maximum, any colors that fall between (and including) the Minimum and Maximum are discarded.
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 RGBA 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 RGBA Replace Effect with Color 2 set to a transparent color.
Note that Discard slows down painting. If using this function is too slow use RGBA Replace instead with Color 2 set to a transparent color.
The RGBA 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.|
|RGBA Minimum:||This value works together with RGBA Maximum to determine what range of colors to ignore (discard). When this is lower than RGBA Maximum, any colors between, and including, RGBA Minimum and RGBA Maximum will not be drawn to the Canvas. When RGBA Minimum is larger than RGBA Maximum, the test is inverted. Colors between the Maximum and Minimum are drawn to the Canvas, and colors outside that range are not drawn.|
|RGBA Maximum:||This value works together with RGBA Minimum to determine what range of colors to ignore (discard). When this is lower than RGBA Maximum, any colors between, and including, RGBA Minimum and RGBA Maximum will not be drawn to the Canvas. When RGBA Minimum is larger than RGBA Maximum, the test is inverted. Colors between the Maximum and Minimum are drawn to the Canvas, and colors outside that range are not drawn.|
|Compare Red:||If set to a Red X then the Red Channel will not be included in the range check. If set to a Green Check Mark then the Red Channel is considered in the range check.|
|Compare Green:||If set to a Red X then the Green Channel will not be included in the range check. If set to a Green Check Mark then the Green Channel is considered in the range check.|
|Compare Blue:||If set to a Red X then the Blue Channel will not be included in the range check. If set to a Green Check Mark then the Blue Channel is considered in the range check.|
|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.|
|Invert Decision:||If set to a Red X then the decisions to discard are as described above. If set to a Green Check Mark then the decision to discard is reversed. That is, if the above settings would have resulted in a discard, it is not discarded, and vice-versa.|
To show some uses of RGB Discard we start by combining an image with two Effects.|
The image below shows our source setup. We have loaded our Arches National Park photo into the current Canvas as the Drawing (e.g., not a Texture Effect, but already placed on the Canvas). In Slot 1 we placed our Zebra Stripes Effect with default values and Color 1 set to white and Color 2 set to black. The image on the left is our Current Canvas, with the Arches photo. The image on the right is the current Zebra Stripes Effect:
We now load Slot 2 with our RGBA Discard set to default values. RGBA Discard has a default Minimum of zero, and a default Maximum of 64. This means any RGB colors that are between 0 and 64 will be discarded. Below is the result:
Now an example to show how a little change will make a big difference. We use the same setup as above... with the Arches already loaded into the Canvas. The only difference is we will keep the Arches as a Texture. So Slot 1 has our Arches photo as a Texture Effect. Slot 2 has our Zebra Stripes Effect. Slot 3 has our RGBA Discard Effect.
Keep in mind that the Arches photo is already on the Canvas... but it is also loaded as a Texture outputting to Color 1. That means that Zebra Stripes is going to take Color 1 from the Photo, and Color 2 will remain Color 2 (black). It will DISCARD colors between 0 and 64 (thus revealing the original Canvas with the original Photo):
In our final example we load Slot 1 with the Zebra Stripes with default settings except Fit To Brush is turned on. Color 1 is white and Color 2 is black. In Slot 2 we have our RGBA Discard set to default values.
The image below shows the resulting while painting in 3 different ways:
- On the left side we turned RGB Discard off. This is just Zebra Stripes, Fit To Brush
- In the middle we paint with RGB Discard turned on. You can see how different the effect of removing the black is on the result.
- In the final right side painting we added a rotation to the Brush, giving even more variation to the painting.
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.